56 SERVO 05.2016
• Watch streaming video from your robot after adding
• Have the robot send telemetry from its sensors.
• Develop your code interactively from a Python shell.
• Even run a desktop on your robot.
Not only can such a robot easily connect to existing Wi-Fi routers and hotspots, you can actually configure the
robot itself to be a hotspot, making it easy to connect it
with your tablet/phone/laptop. Please note that only some
Wi-Fi adapters work in “AP” mode, which is needed to
make a hotspot.
I used an inexpensive LEGUANG LG-N19 adapter that
supports AP mode. Be sure to check with the vendor you
order your Wi-Fi adapter from that it will support AP mode,
as some of these adapters change chip sets at times while
keeping model numbers.
The Pi Droid Alpha controller adds the L293D based
motor controller, 5V capable I/O, and eight channels of
analog inputs for sensors.
If you prefer to “roll your own,” you can use pretty
much any dual H-bridge based driver board. However, you
then lose the 5V compatible I/O and
analog-to-digital converter (ADC).
For a more powerful controller,
you could use a RoboPi. However, that
increases your costs because you
would also need a separate motor
driver (L9110S/L293D/L298N) since
RoboPi does not have an onboard
As you can see, connecting the
motors is made easy by the screw
terminals. From left to right:
• Servo power in
• Motor 1
• Motor 2
• Motor power in
I did not provide external power for servos, as I am
only using a single 9g servo that needs so little energy that
I can power it safely from the Pi’s USB power bank supply.
The left (port) motor was attached to the Motor 1
connector. The right (starboard) motor was attached to the
Motor 2 connector. The 4xAA NimH battery pack was
connected to the Motor Vin terminals (far right).
Ultrasonic Range Sensor
The HC-SR04 distance sensor is inexpensive and is
enough for a starter robot. Additional distance sensors and
bumper switches can be added later. To get your sensor
1. Connect HC-SR04 Vcc to a +5V terminal to servo 2’s
2. Connect HC-SR04 Gnd to servo 2’s Gnd pin.
3. Connect HC-SR04 Trig to pin 12 on the Pi header.
4. Connect HC-SR04 Echo to
servo 4’s Signal pin so it is divided
down to 3.3V.
As far as the battery packs go ...
you saw earlier that I prefer
independent power supplies for the
electronics and motors. For such a
simple robot, I tend to use 4x 1,800
mAh or higher rated NiMh batteries,
and a 5,000 mAh 2A capable USB
USB power bank for the electronics and
AA NimH batteries for the motors.
HC-SR04 mounted on servo pan head.
Pi Droid Alpha wired up on the robot.