Robot - how to add Raspberry, Servos

Hello all,

I am considering to get me the new Arduino robot, and I would like to learn more about how it can be extended.

The are some digital I/Os. Can one attach servo motors there (as to an Arduino board)?

One interesting option might be to mount a Raspberry Pi plus a camera to enhance the visual and computational capabilities. Can it use the robot’s power or better it’s own power source? Can the Raspberry be connected to the robot by USB while the robot is running? And can a camera be connected to the Raspberry at the same time (maybe using an USB hub)?

Kind regards

First off, let me say that I don't own an rpi - so just hear me out, then do some further research of your own (and listen to others who do own one as well):

geeek:
I am considering to get me the new Arduino robot, and I would like to learn more about how it can be extended.

I'm pretty sure there are boards available for the rpi that makes this fairly easy; that said, they vary in price and you may find them out of your budget. One option you might consider is to treat the Arduino as a "slave" device on the SPI/I2C bus - and use the rpi as the "master" device. This is more complex, you will lose some of your analog I/O pins on the Arduino (but that could be made up for in other ways) - and you still might need level conversion (more on that in a moment).

geeek:
The are some digital I/Os. Can one attach servo motors there (as to an Arduino board)?

You might try it (for real servos or continuous rotation servos ONLY) - as long as the digital i/o is supplying the PPM signal for the servo (and the servo is connected to it's own separate power supply - tie the ground of that supply and supply of the rpi together, just like on the Arduino) - it might work; I am not sure what the signal level range is for a standard servo (but if you have some quality servos with spec sheets, you might be able to look that up).

This is the issue of the rpi - it's i/o lines are 3.3v level tolerant only - whereas the standard Arduinos have 5v (TTL) tolerant i/o lines; that means the rpi outputs a logic HIGH as 3.3v (logic LOW is still 0 volts) - this is within the range of TTL logic to read as a HIGH level (barely), but the rpi can't take a logic HIGH level from the Arduino (5v TTL) and read it (it expects a 3.3v level).

This is what those converter boards typically do to connect 5V TTL level devices to the rpi - the better ones ($$) use converter ICs to boost the 3.3v output signal to 5v or lower the 5v input signal to 3.3v for the rpi. Lower cost ones will leave the rpi's output alone, and use a pair of resistors as a voltage divider for the input conversion (this only works so well - at high speeds it can fail - not that there will be damage, just that it stops working or is reliable for data transfer at those higher speeds).

You could build such a conversion circuit yourself - the ICs and resistors are available; there are other methods available as well (the ICs tend to SMT devices; you can find DIP versions though if you look - you can also do logic level conversion using transistors and other parts if you are inclined).

geeek:
One interesting option might be to mount a Raspberry Pi plus a camera to enhance the visual and computational capabilities. Can it use the robot's power or better it's own power source?

It could - that would work fine; just make sure you tie the grounds of your power sources together. Better, though, would be to have a single source of power for everything (with a high-enough voltage and current rating to power everything), then split the power supply for each component from that. If you need lower voltages for certain components (that aren't tolerant of the higher voltage of the battery), use voltage regulation (in some manner - linear or switching; whichever works best for your application) to drop the voltage down. You might also want to add some fuses to each of these "rails" to help protect against damage if something shorts or whatnot.

For your robot's motors, try to obtain motors which match your battery; because motors tend to draw a lot of current, trying to use a voltage regulator to drive them can be an exercise in frustration. Servos on the other hand, tend to have fixed voltage levels (a common level is 4.8v - 6.0v); if you have, say, a 9.6v R/C battery or something, you typically need a 5.0v or 6.0v BEC/SBEC to power the servos (also note that if you use a 5.0v SBEC - you can use that to power the Arduino directly - bypassing the on-board voltage regulator, as the SBEC should have one in it).

geeek:
Can the Raspberry be connected to the robot by USB while the robot is running? And can a camera be connected to the Raspberry at the same time (maybe using an USB hub)?

For this one, I am going to defer to other's opinions; I'm not sure how the power supply is handled by the rpi when it comes to USB. I think (?) that the rpi always requires an external power supply to power it (that is, it doesn't use the USB for power like the Arduino can - the USB is only for data). If that is true, then the answer to your question should be "yes". Just make sure that your power supply has the current handling capability for both the rpi and the camera (and potentially the Arduino - if you want to power it thru USB instead) at the same time.

As you can see (and are probably thinking) - the power capabilities and possibilities between the rpi, Arduino, camera, usb hub, and the rest of the robot - are slightly daunting. With some research, understanding, and help from others, though - you should be able to figure out the best workable solution.

Hope this helps - again, I don't own an rpi - so wait to see what others say before diving in further!

Good luck with your project.

:slight_smile:

Thank you cr0sh, your hints probably help to save my hardware :grin: