ARM Cortex M3 based autonomous robot “rob01″

This is my first robot project. Primary goal of the project was to build a small robot which is able to drive autonomous as well as remote controlled by a human. The result is rob01 which currently has the following features:

  • Drives autonomously, tries to avoid obstacles. To detect obstacles, two distance sensors are used.
  • Also the average wheel turns are measured continuously to detect if the robot is stuck.
  • The robot also provides a shell to which one could log in through a wireless connection. On the shell the internal robot parameters could be monitored or set, and the robot could be driven remote controlled.

Programming of the robot firmware was done completely by using open source tools. For compiling, the ARM gcc form the "Summon ARM Toolchain" is used, and as a kick start for accessing the STM32 hardware functionality, "libopencm3" is used.

For more pictures, videos, firmware (incl. doxygen docs) and schematic see the project page on my blog!

Test setup with breadboard

Final robot, top view

Wiring

Sensors for measuring the wheels RPM

Drives autonomous, avoids obstacles by using IR sensors, an measuring the wheels rpm. Could also be remote controlled through XBee.

  • Actuators / output devices: 2 gear motors
  • Control method: autonomous, or remotely by logging into a shell on the robot through XBee (ZigBee)
  • CPU: STM32VL Discovery (ARM Cortex-M3)
  • Operating system: none - bare metall
  • Power source: 2 9V blocks
  • Programming language: C
  • Sensors / input devices: 2 Pololu QTR-1RC IR sensors for rpm measurement, 2 Pololu GP2Y0D805Z0F IR sensors as bumper sensors
  • Target environment: indoor

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/arm-cortex-m3-based-autonomous-robot-rob01

Very nice, I have been using

Very nice, I have been using STM32 and have to say I like it.  I’m currently using CooCox CoIDE (including the GCC toolchain) and while it isn’t open source it is free and works well with an ST-LINK JTAG programmer/debugger and doesn’t have commercial limitations.  Is there any advantage to using libopencm3 instead of libstm32? I’m under the impression there isn’t any commercial limitations with libstm32 and most of the code is available for reading.

I wondered if anyone else

I wondered if anyone else was able to get a dream board as well…looks like someone did.   :slight_smile:

I haven’t done anything with mine…in fact one of the guys at work is using it since it was sitting on my desk collecting dust…

advantage of libopencm3

Tank you. Basically what I like about libopencm3, beside it is beeing GPL3 licensed, is, that it is more “lightwight”, and more clear (at least to me) then the libstm32. I heard about that CooCox CoIDE too (I also use that IFLAT-32 baord form ITEAD) together with X-Link JTAG -  works also pretty well with linux, and the cheap X-Link could be used with the STM32VL too.

ITs a nice board indeed

over here (Netherlands) I could buy this baby for about 11 euro at farnell.com

I made a 4legged creature with it https://www.robotshop.com/letsmakerobots/node/31852

I used Keil uVision (cracked) and the ST firmware library which ST provides for free. Actually I think my code was small enough to not walk into the 32kb code limit with the free Keil uvision but I cracked it because I had another project involving a TFT screen and FAT system, the code got too big.

This Coocox is also very interesting, just bought the Embedded Pi board of Coocox, dont know if you people heard already about it but its an STM32F103 based board which can connect directly to the Raspberry pi. So the Pi can send commands via a link to the STM32 or you can use the embedded pi standalone. And last but not least, the stm32 board is compatible with arduino so you can make a Pie of pi-stm32-arduinoshields :slight_smile: When I find the time to start with the Embedded Pi I will checkout the coocox IDE