Skip to main content

Posts

Sipeed Maix Bit, a 64-bit dual core RISC-V AI development board

Sipeed MAIX is one of the cheapest RISC-V development boards in the world. It is a dual-core module capable of running at 400MHz (can be overclocked to 800MHz) and has Neural Network  Accelerators topping at 0.5 TOPS with Tensorflow Lite support. Unable to resist, I backed the  Indiegogo campaign  and received the boards couple of weeks ago. One more feature of this $12 super-spec-ed development board is that it supports MicroPython. It was time for a  "Hello World" program. Components Sipeed MAIX Bit development board USB Type-C data cable Linux Laptop (I used Arch Linux ) The development board has CH-340 chip, the infamous USB-Serial adaptor. So once you connect the USB Type-C cable to your host computer, it will be enumerated as a usb serial device. Note the  QinHeng Electronics HL-340 USB-Serial adapter. That is our Sipeed MAIX device's USB-Serial interface. Now this comes pre-programmed with the default firmware. You can find a...

Building a 49cc Street Legal Motorized Bicycle

Hello everyone! Almost 6 months ago, I moved to Oregon for my work and started looking at cheaper modes of transport to work. The transit and MAX worked for sometime but the bus stops and stations are simply too far from my home and I found myself spending at least 30 minutes everyday for a 3 mile commute to work and another 30 minutes back to home. Buying a car was not on my budget and new motorcycles were expensive too.  That is when I started looking at cheaper options like a bicycle, skateboard, electric scooter, e-bikes, segways etc. It was my dream to build an electric vehicle since my teenage. Finding an opportunity here, I started scouting for resources related to electric bikes and skateboard building. Among all the forums and resources I found online, 99% of them suggested that the batteries are expensive and the range of electric vehicles is limited.  And I stumbled upon a forum post which suggested that a motorized bike might be a better option. Though I ...

Programming STM32 ARM microcontrollers in Arch Linux

Once upon a time, not so long ago, the 8-bit microcontrollers were ruling the hobbyist embedded world. But today, the 32-bit ARM Cortex Microcontrollers are so inexpensive and power efficient that there is no good reason to ignore them. Here, let us see how to program a STM32 ARM cortex Microcontroller in Linux environment. The specific microcontroller used here is an STM32F103C8 (ARM cortex M3) programmed in Arch linux. Components Generic STM32F103 board (blue pill) STLINK-V2 (STM32 programmer) Female-Female connectors All the above components can be bought from ebay for less than $10 total. The STLINK-V2 is optional since you can use any of USB-SERIAL converters like FT232, CP2102, PL2303, CH340 and the built-in UART bootloader of STM32 chip to program. So if you already have any of the above serial converters, you don't really need STLINK to program the STM32F103 microcontroller. But STLINK helps if you plan to use in circuit debugging functionalities. Software The...

ESP8266 - WiFi + Speech Controlled Hexapod Robot

WiFi modules for projects were out of reach for lot of budget hobbyists like me for many years. But things changed when the Esp8266 module from Espressif Systems was released in 2014. Maker community went crazy over this module for the price tag (around $2 for the basic module) and within few months, toolchains, arduino libraries and so many development boards based on Esp8266 started popping up. Esp8266 is a low cost WiFi SoC manufactured by Espressif Systems. It is a 32-bit Tensilica microcontroller with 160KB RAM, support upto external 16MB flash and tons of peripherals like Timer, PWM, UART, I2C, SPI, ADC and so on. Given the cost of the module, the maker in me couldn't resist buying at least 4 different Esp8266 modules to experiment with. The community support for Esp8266 was simply superb though I had some troubles with setting the module in boot mode.  The opportunity to use Esp8266 in a major project came in the form of course project for "Real Time Embedded ...

My badge Hack at Hackaday Superconference 2015

  November was a good time for many hackers and makers around and outside California who got to attend the Hackaday's Superconference 2015. Power-packed with technical workshops, project presentations and badge hacking , this Superconference was one of the best platforms for the best minds around the world. It was my first hardware conference in United States and I was super-excited to attend. The most awaited event - Badge hacking started with a blast. Right side of the presentation room were full of people who were soldering and modding their badges for the badge hacking contest. I too joined the group of geeks and started my work. What did I do?   There were tons of free development boards, components and tools available at the table for us to use in our badge. I took a teensy LC which had a 32-bit ARM Cortex M0+ freescale microcontroller powerful enough to design what I had in my mind. I had an idea of making a platform independent USB game controller which can work ...

Arietta G25 - an Atmel ARM9 board

While I own a Raspberry Pi already, I was looking for a bare minimum ARM development board capable of running Linux and offers a good amount of I/O peripherals which the R-Pi lacks. I finally stumbled upon Arietta G25, a really tiny ARM board from acmesystems. This teeny tiny board costed just $35 from microcontrollershop.com . Arietta G25 Arietta G25 Features: ARM9 @ 400Mhz 128MB or 256MB DDR2 RAM UART, ADC, I2C, USB and lot more peripherals! My Setup: My laptop which will be the host here runs Arch Linux. The first step would be loading the image for Arietta in the microSD card. I downloaded Debian Wheezy Grip 7.7 image from  here  and wrote the image to a 4GB microSD card. The next step would be to setup an SSH connection between the Laptop and Arietta G25. Before that, let us disable the dhcp service in Arch Linux(Host). sudo systemctl stop dhcpcd.service If the image is correctly loaded into the microSD card, the red LED on Ariett...

RTL Design & Implementation of a RISC Processor and Peripheral Multiplexer -Part II

  Here is the second part of the RISC Processor Design. I have implemented this Processor as a part of my ASIC Design Lab project  "Programmable Controller/Router and Peripheral Design with peripheral I/O multiplexing".  This project focuses of peripheral multiplexing to the GPIO pins of the processor in runtime. An example case will be a Pulse Width Modulated wave switching between any I/O pins during processor execution or an UART Transmitter pin routed to a pin based on board design without the need of external multiplexers.   The processor can access the peripherals via register write instructions. Similar to register file, the peripherals support two data reads and one data write simultaneously. Since I have used custom instructions, a custom Instruction Set Architecture (ISA) is also designed. BLOCK DIAGRAM: 16-bit Instruction Format : 1. Register Instruction: OPCODE [15:12] DEST[11:8] SRC_1 [7:4] SRC_2 [3:0] ...

RTL Design & Implementation of a RISC- Single Cycle Processor -Part I

  Low cost FPGA development platforms and Hardware Description Languages like Verilog & VHDL have not only made lives of Front-end VLSI  Engineers easier but also hobbyists' . I have been experimenting with a 40$ Xilinx FPGA development board for couple of years and its real fun. And now, a part of my project for ASIC Design Lab course at University of Minnesota requires me to design and implement a microprocessor. Armed with my FPGA board and a new-found enthusiasm amidst my busy schedule at the U of M, I sat up to design a minimalistic CPU in Verilog. Tools Used: Verilog/VHDL Simulator (ModelSim, Icarus Verilog, Xilinx ISE,etc) A decent Code Editor (VIM) A Xilinx FPGA board (optional) ARCHITECTURE:   I chose Load/Store Architecture for my microprocessor design since most RISC machines like ARM, MIPS,etc are based on this architecture. Besides that, quicker prototyping and better understanding of computer architecture was on top priority in my list...

JTAG - Test Access Port (TAP)Controller based Xilinx FPGA configuration using Raspberry Pi

JTAG - Joint Test Action Group is an IEEE 1149.1 standard used in many silicon devices for programming and debugging purposes. Xilinx FPGAs support this JTAG protocol for their configuration. Here I have designed a JTAG FPGA bitstream programmer using Raspberry Pi which programs the bit file into FPGA in fraction of seconds!  JTAG physical bus has four lines: TMS (Test Mode Select) TDI (Test Data In) TDO (Test Data Out) TCK (Test Clock) Components Used:  Raspberry-Pi Xilinx Spartan 3E FPGA (XC3S250E in Papilio One) Jumper wires BLOCK DIAGRAM: TAP CONTROLLER: The TAP(Test Access Port) controller is a state machine inside the FPGA which changes it's state based on TMS input. For instance, let us assume that the state machine is in " Test-Logic-Reset " state. Now if I drive the TMS pin low and toggle the TCK pin, the state machine will go to " Run-Test/ Idle " state. This is how we move to different states.  Note ...

Audio Playback using ZPU-Soft Processor in FPGA

Having worked with a variety of microcontrollers from AVR to ARM Cortex controllers, I bought a Xilinx FPGA dev board(papilio One) which around $40 to experiment. After getting comfortable with Verilog HDL, I implemented few data encoders-decoders, communication blocks and played around a while. Then my attention turned towards implementing a Soft-core Processor in FPGA. But I need my own instruction set and a Compiler for my soft-processor too. Besides, intensive googling taught me that there are tons of Soft-processor cores. Finally,I settled with ZPU which a 32-bit softcore processor for xilinx FPGA with good amount of peripherals ranging from timers to communication blocks like UART, SPI etc. It has support for VGA screen drivers too. PROJECT: This project was aimed to implement a system to play a small snippet of audio from FPGA's memory using ZPU - soft-core processor. Components used: Papilio One board- Xilinx Spartan XC3S250E A speaker Misc- Resistor...

Shell Scripting to Display Bar Graphs in Linux Terminal

 This week was quite hectic for me with course assignments and their merciless deadlines. One such assignment in Advanced Computer Architecture  was simulation of various benchmarks in alpha architecture in simplescalar , a well-known computer architecture simulator. I was supposed to run a total of 4 benchmarks with different configurations of cache memory, instruction issue widths, commit widths, in-order execution modes, etc and I had to plot the required performance parameters for every benchmark. A conservative estimate would be around 40 plots!  Since the simulation platform was Linux, I could breathe a sigh of relief since most things can be automated using a powerful tool called shell. Scripting made my life easier here since I can automate a bunch of simulations without having to keep an eye on each and every simulation which would take anywhere from 20 minutes to 20 hours.  The problem arose when it came to plotting the performance results. Becau...

Won 2nd place in National Level Electronics Design Contest !!!

Last month could have been never better without the "Electronics For you " design contest ' s results announcement. I was delighted to find my name at the 2nd place in the winner's list under Raspberry Pi category for my project named "Smiley-Pi". Very surprised that my previously discussed project in my blog turned out to be a prize winning project. So what is it?   Smiley - Pi   is a tiny Nokia caller LCD(extensively discussed here & here ) based status notifier for Raspberry-Pi. The name is derived from a mode of operation where it uses various smiley images to indicate system information like temperature. The tiny 0.9", 96x65 monochrome caller LCD of Nokia 2760 is interfaced through bit-banged SPI to the Raspberry-Pi. The base driver application is coded in C and higher level in shell & Python scripts. The user application can use any language which can invoke the driver binaries in it.   Many times we would have ...

Capacitive Touch Sensing using a Coin & ARM Cortex M4

Couple of years ago, I bought a Capsense add-on from Texas Instruments for MSP-430 Launchpad. It worked right out of the box as expected but a closer observation showed me that the board was nothing but a colored copper plate PCB with catchy SMD LEDS beneath. Curiosity drove me to internet and books which taught me the concept of Capacitive touch sensing. Armed with the following tools, I set myself to make my own capacitive sensor circuit. Components Used: Stellaris LM4F120XL ARM Cortex M4F board Resistors - 2 x 2.2 M ohm Wires + Conductive surface ( I used a Coin) PROJECT:  The aim to design a simple capacitive touch sensing circuit and code an ARM cortex microcontroller to sense the capacitance change when a human touches the sensor. STELLARIS LM4F120XL:  The Stellaris launchpad from Texas Instruments is the main processing core of the project.  The following are its features ARM - Cortex M4F core ( Floating point) 256 KB Flash and 32 KB ...