Decision #1: How to interface
5V inputs and outputs to the
3.3V GPIO pins.
I wanted to interface 5V servos and 5V digital sensors
to the Pi safely and as simply as possible for the lowest
possible cost.
The Broadcom processor on the Pi has 3.3V GPIOs, and
while servos can be controlled by a 3.3V signal, we should
limit the current the servo can draw from the Pi to guard
against damaging the GPIO.
What is cheaper and simpler than passive components?
We have to handle:
1) Input — Reading a 5 VDC signal safely with a
3. 3 VDC Pi GPIO.
A. A voltage divider is a great approach.
B. We can use a nice SIP bussed resistor for the
resistors to ground.
2) Output — Controlling devices that expect a 5 VDC
control signal.
1. Most such devices can be driven by a 3.3V signal.
2. The only potential concern is drawing too much
current from the Pi's GPIO.
3. A current-limiting resistor solves that.
SPRITE
Simple Pi Robot Interactive
Testbed for Experiments
I have been following the Raspberry Pi since
before it was available — other than the sheer
"WOW" factor of a credit card sized $35
computer, I've been wanting to use a Pi as the
"cerebral cortex" for some of my robots.
What I really like about using the Raspberry Pi
as a robot brain is that I can easily have a Wi-Fi
connection to it using an inexpensive USB Wi-Fi
adapter and SSH into the robot, or even run the
desktop remotely. Cutting the programming cord
is a huge leap forward.
Think about it — programming your robot, on
your robot, from any computer, iPad, iPhone, or
Android device!
I decided to make a robot controller for the
Raspberry Pi that would be as simple as possible
for students and hobbyists to build — one that can
be used as a testbed for experimenting with
robotics, and expanded as needed.
By William Henning
mikronauts@gmail.com
Post comments on this article and find any
associated files and/or downloads at
www.servomagazine.com/index.php/magazine/
article/january2014_Henning.
In this article, I will show you:
• How to build a simple robotics add-on shield for your
Raspberry Pi using an inexpensive prototyping
shield and a handful of parts.
• How to set up your Raspberry Pi so you can connect
to it over Wi-Fi.
• How to write code for your Wi-Fi Pi robot.
There are many ways of building a robot (and robot
controller), so I will list each major decision point,
then show the alternatives I considered and the choice
I ultimately made.
56 SERVO 01.2014
Photo 1: Meet SPRITE — my first Raspberry Pi based robot.
Cute little feller, isn't he?