Let's Make Robots!

A custom Pi shield or an Arduino?

As more and more people get a Pi they are asking how to interface it to their robot. I do not own a Pi but I looked at the GPIO pins available for interfacing. Apart from general digital I/O pins you have I2C, SPI and Serial interfacing available. I assume there is a library or something that allows these pins to be easily access from within the Linux operating system.

So the question becomes do you just use another MCU such as an Arduino to provide the necessary I/O functionality or do you use a custom shield?

Because the Pi has Serial, ISP and I2C available it is very easy to have it control an Arduino controller which then provides the ADC, PWM, Servo and digital pins. The disadvantage is the Arduino will probably cost as much as the Pi and wont stack neatly.

Some distributors such as Adafruit are already working on a number of interface boards (Pi plates) and accessories.

So I want to know, Should I be designing a robot sheild or are there enough options already?


At this point I will get a Pi and explore the issue further. I have lots of ideas but I need to see what will work.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Gonna pickup my PI from the post office, first thing in the morning. It is going to be used in a homebuilt robot. I'll post something, when it happens...

The Mini Driver board like really nice and cheap for a simple first PIBot and I am probably buying it for that. I have stronger motor in mind, could I solder the MOSFETs off and solder the 4 MOSFET gate to more powerfull (offboard?) MOSFETs running of a seperate batteries? Soldering skills are rusty, but (was) rather good ;)

I think the above board is a nice starting point for a RasPiRoboPlate (RP)², but I would like a few more PWM and as above seperate voltage for the motor drivers and exchangeable MOSFETs for different voltages. And use I²C for comm, to save the rasPI serial for other stuff. Remove the voltage regulator, power swicth and usb (?) and used the $$$ and space to add 3v3<->5v conversion on the interface pins.

Im gonna play with the raw RasPi for awhile, before I decide on periphal :) The above, a 'Duino or a XMega128A1 (once they come with a bootloader) are the main contenders.

FrankNeon's picture

might be a good project to look at too. 



They are taking lots of time in development (as they should, I guess) but have been very willing to share their notes with those asking nicely. 

I've needed the same type of functionality and had to make my own, but would have paid the money to anyone saving me four hours of time. 

Features in support of stacking shields, or all in one fix for general purpose robotics are what I'm targeting.

Below is a shield that I've been kludging together for a rover project, I'll be adding three pin headers for for servos/ESC's, and for analog IO as well. Nothing fancy, just room bor a bit of jumpering and everything on the 'duino broken out.

RobotFreak's picture

I thought about the same question today. Seems that OddBot can read my minds. The a la mode board seems to be best choice so far, but doesn't include a motor controller. It is connected via the serial port to the Raspberry. Cool, you can install the Arduino IDE on the RasPi and develop and upload the scripts direct to the 'a la mode'. Existing Arduino shield can be added, too.

The DoodleBot board is a great robot controller and has anything on board to control a robot. The only thing missing is a RTC for the RasPi. I would definitely buy an ATmega based Raspi Robot shield.


6677's picture

I think the main thing most of these expansions are missing is expandability. Personally I would like it to just stack straight onto the pi, in the event that it doesn't fit the case then I can use a ribbon cable to extend it. Might also be a reason to use I2C, stackable expansion boards.

6677's picture

The raspberri pi foundation have released their own expansion board already. Its a little heavyweight for some applications though. It seems to be able to do god damn everything. The onboard uC is preloaded with the arduino bootloader though.

http://www.raspberrypi.org/archives/1734 pi is on the right and dwarfed by the board.

Links to the user manuals are also contained there.


Another link:



I think you might find some good info there that can carry across to your board. The only thing to be aware of is that the GPIO layout I think is slightly different on the revision 2 boards, not 100% certain on whether its just which ports are broken out from the CPU or whether its an actual rearrangement of the GPIO pin ordering though. I2C or serial are probably the best ways to integrate expansion boards.



The standard library used on most pi's for GPIO is wiringpi. Its originally a C library although has bindings for most other languages included in a default rasbian installation (default pi operating system). There are other GPIO libraries but they mostly rely on reading to and writing from a file which is slow. Wiringpi I believe uses direct hardware access (and as a result root permission on installation I believe) so should be much much faster. The textfile used for GPIO state is accessible from all languages if you wish to handle reading and writing to/from it yourself though so languages that don't yet have wiringpi available can still use GPIO.



Adafruits distro is built off of rasbian however I think targetting rasbian (from the software side of things anyway) is probably the best bet as its probably the most commonly used distro now. Assuming it works on rasbian then it should work fine on adafruits distro anyway.


Hope thats all of some use to you. I don't own a pi although did help 2 different friends getting theirs running and helped one of them make a little game in python. Otherwise I would have probably been able to offer assistance with making a python module for your board.

OddBot's picture

I think the Gert board must be designed for students to assemble themselves as it seems to use mostly through hole components that are easier to solder.

There are quite a few options already, that is why i started this forum. To find out if existing shields hit the mark.

Maxhirez's picture

Adafruit isn't likely to make their shield especially for robot makers, so I think a Dagu shield would be a good idea.  If you could put all the in/out options of the micro magician (and I'd like to see a 298 for the H-bridge because I like bigger motors) on a "plate" plus a dozen or so PWM outs and an easier analog access (3-pins so you can power and ground them  all) I think you'd have a winner.  Maybe the accelerometer isn't necessary but I wouldn't say no to it.

OddBot's picture

I am trying to decide if people want a shield or not.

Bite your tongue! I would never use L298's! They are extremly ineficient and reduce the torque of your motors. They are not really designed for low voltage motors. I cannot believe that so many engineers would use them in their designs. I can only assume it's out of lazyness or ignorance. The FET driver circuit used on our Mini driver can handle up to 4A per motor, has much lower on resistance and cost far less. I am testing a new design that also offers electronic braking.

A 3-axis accelerometer is very cheap (less than a dollar). The only thing I would consider changing (if the price was right) would be to use an I2C version. I think accelerometers are ideal for any robot as they have so many uses.

I had considered using all I2C interface IC's but to be honest, for the price I am probably better using an ATmega1280. That gives you 16 ADC, 14 PWM, 4x Serial, up to 48 servos and a ton of digital I/O for LCD displays, keypads etc.

There is also 6 external interrupt pins, 6x timer/counters and lots of Flash memory, EEPROM and SRAM for I/O service routines, walking gaits etc.

Power supply is a consideration, I would probably use a switch mode power supply similar to the one I used with the Spider controller. The input voltage can then be anything from 7V to 32V and you can draw a couple of amps for sensors, servos, etc.

To be honest, I think a Spider controller with a motor driver shield would be almost perfect.

Maxhirez's picture

I tend to drive bigger motors though.  I've burnt out every board designed for 293s and 754410s I've ever used.  However I must admit I've never tried the FET approach-one day I promise to get a Magician just to have it.

Again, I like the "translator shield" idea: something you can stack a Pi under and an Arduino shield of any kind on top of.  An MPC3008 could handle the ADC and a PCA9685 could control some serious PWM-it could almost be a Mega shield at that rate.  I don't know about the extra SPI channels though, so maybe stick with the Dumillanove/Uno/Leonardo form factor on top. Put a 3.3v regulator on it and you're set.  Now maybe this isn't the same thing I was talking about earlier, but it is another option and one worth considering.  I don't know why the Pi foundation didn't just make the Pi Arduino-shaped with all the support out there and the OH aspect of it.

Once again, I still haven't even gotten mine booted yet, but that has more to do with being so tired the last few days.

OddBot's picture

I used L298's before I came to China and was very dissapointed. They did not supply full power to the motors and got very hot even at half of their rated load. I tried using one for the original Mr. Tidy and unless you had a heatsink the size of a brick then it just overheated.