I was lucky enough to get some financial support to design and prototype a robot controller. I got outstanding help and advice from Dr Tony Wilcox, Chris Evans and Roger Thomas of Birmingham City University. Chris did a lot of the PCB routing, and much of the board construction. Tony generously shared his wide experience of developing robot controllers, and embedded and electronic products. Roger was a font of knowledge on PCB design and manufacture, and electronics. Thanks also to Pete Harrison for his always helpful comments and suggestions.
I learned a huge amount from them. This is the result.
It is based around an ST Micro STM32F103CB Cortex-M3 microcontroller. This version has 128K Flash, 20K RAM, USB, CAN, 3xUSART (serial),15xPWM, 16xADC, 2xI2C, 2xSPI, and JTAG in a 64-pin package, all ticking along at 72MHz.
The board adds dual DC-motor drive, seven LEDs, two buttons, two servo sockets, as well as sockets for six analogue input, two quadrature encoders, and headers for JTAG and Serial. The two 30-pin 0.1″ headers (missing from the photo) gives access to all of the microcontroller signals and power on a veroboard friendly grid. The microcontroller can be powered over USB, or via an external power supply or batteries. The board also has independent on-board voltage regulation for the servo’s and motor drive chip.
Like an Arduino, it is ‘self-programming’ over USB once the bootloader has been installed. I installed the bootloader over the microcontrollers on-board serial interface using an ordinary FTDI USB to serial cable. So it doesn’t need JTAG or an in-circuit programmer, ever.
It is based on the Maple from LeafLabs. LeafLabs have built an IDE using the same Processing-derived IDE as Arduino. It sits on top of GNU GCC. They have also implemented most of the Arduino base-libraries, so Arduino programs may move across to Maple with minimal or sometimes no changes. To top it all, they have developed a bootloader which enables the STM32F103 to program itself over USB. The whole software environment, libraries and bootloader are Open Source, and runs on Windows, Linux and Mac OS X.
Maple is a magnificent piece of work. My board ‘came up’ in a couple of hours (after we found and fixed a couple of my PCB errors).
Chris did much of the construction; he has a very steady hand. We used the ‘Mini-oven SMD technique’. Paul Gardiner of Finham Park school in Coventry did a workshop a while ago, and this is the biggest board I’ve made using it.
I’ll describe some of our experiences, and where-to-next over my follow-up blogs.