Skip to content | Skip to navigation
Powered by RSPowered by RSPowered by RS

ARM Powered m3pi mbed Robot - Review

pauljclarke

United Kingdom

When is electronics exciting? Well most of the time people outside this world of electronics don't see flashing LEDs very exciting unless its on a tree at Christmas. However if you put some wheels on the side of your board and have it skidding around the floor, suddenly electronics and programming gets exciting. And for us in the would of electronics its get all very geeky and very, very exciting too. So getting my hands on the ARM mbed m3pi robot got lots of people in the office all very over excitable, including me. But just how good is it?

Image

The m3pi is built on top of the exciting 3pi robot from Pololu. This contains a on board ATmega328, 5 reflective sensor, buzzer and a 8x2 LCD display along with some other bits. Normally this can be programmed via a AVR programmer, however can be set up to work as a slave unit to the mbed. So to this you can get the m3pi expansion board that allows you to directly plug in a mbed and talk to the base board.

I was supplied the fully assembled kit but you can get a cheaper option if you want to solder and build the expansion board yourself. Not much to add in my view so I would have saved myself the extra cash and built the board. You also get in the box a programming lead, few extra LEDs, some jumpers and fixings.

So powering up the 3pi on its own you get a Demo program that allows you to see the Battery voltage, control the motors, check sensors and play a tune (if you so feel complied to do so!). I then started working my way though the process of getting the mbed connected and working. Now I fell into a hole on this one as from the documentation I first read suggested that I needed to program the base unit with the slave code. So not having a programmer for the AVR I stated looking into this. I felt a little cheated at the time that this did not come as part of it. Now the fact is that the board comes with the slave program on it - however I can’t conform that because I went to the effort to re-program the board.! That was not simple either as I finally found some code on the mbed web site that said you can use the mbed to re-flash the AVR with the slave code. At first this did not work and had to fault find it etc. In all not a great start to what I wish had been blindingly obvious as a unneeded step! However if you do want to re-program the AVR on the 3pi, I can confirm that you only need the mbed. My fix to make this work was to change the reset pin in the code to pin 23. However as I said - Pololu say that the slave code is part of the demo code, so you don't need to do anything

Documentation wise I think I got swamped with information. There is a great guide on the Pololu web site for the 3pi that will show you all the electronics and also shows you example code and a worked example of a maze solver. This is a great document but not what I needed for the mbed, m3pi. This I found else where on the site and is what helped me get the AVR programmed and allowed me to better understand the kit, but even this was over detailed at first. I guess I would have liked a much more simple getting started guide. Both the longer documents have great detail, better than lots of kits I have seen. But reaching my aim of getting the kit up and running in less than 30 minutes was lost in paperwork and confusion. I would say however don’t be put off, as you will see you will not be disappointed.

m3pi User Guide : http://www.pololu.com/docs/0J48/all

Ok so now I have a robot that can be controlled by the mbed, however the expansion board is not just about plugging in a mbed. The board also carries sockets for plugging in a XBee / Wixel or Bluetooth model allowing for off robot communications. The layout has also been designed so you can still see the LCD on the base 3pi and get access to the programming connector. You will also find the power button has been cloned for easy access and you will also get a USB A connector as well as 8 LEDs. There are even some level shifters to allow connecting between the two logic levels on the PCB (3.3 and 5volts). In all the expansion board offers lots and is a great starting point. I did I have to say feel a little cheated on I/O. Much of the mbeds I/O is pre-connected to hardware making their use limited. I think I would end up putting extra electronics on the kit to allow me to break out more hardware I/O so I could add bump switches, camera and other sensors, but the kit is at least expandable.

I’m not going to spend a lot of time talking about the mbed itself as both myself and my son has posted examples of what you can do and this review is more about the robot powered by the mbed. So first off lets take this bad boy for a run and look at where most popular starting point for robots - the line follower. There is a great example code on the mbed site that gives two example line following programmes. The first is nothing fancy but demonstrates the classic fixed error correction. I tweaked my code a little as the robot was going to slow for my liking so I increased it by 50% and adjusted the correction value to handle the extra speed on the tight bends.  From the video below you can see it starts by calibrating itself to the line and then off it goes. All pretty good!

However the issue with systems line line following is that stuff happens quick and you need to predict what is going to happen next and also adjust the amount of correct. Thankfully having a mbed and on the top means we can very quickly have PID control. This code again was taken straight off the mbed site and in the demo video below is unmodified.

So as you can see the little m3pi is a real whizz of a robot and a great starting point of hobby electronics or robot fans at getting started.

For more information on ARM and the m3pi people check out the links below:
Whats in a Cortex? http://www.designspark.com/content/use-your-cortex-arm-jungle
mbed m3pi http://mbed.org/blog/entry/Pololu-release-m3pi-mbed-robot/
mbed m3pi Maze Solver http://www.youtube.com/watch?v=mJV-KDqHgDQ