Both the robot and the controller use a Propeller chip
mounted on a Propeller prototyping board. I chose a
Propeller chip because there are a number of things that
had to happen simultaneously, and the Propeller chip has
eight 32-bit cores (called cogs) that allow for true parallel
processing and would allow for future feature expansion.
The Propeller chips are also able to simulate in code a
number of things that would otherwise require additional
components. Communication between the controller and
robot is accomplished using two Series 1 XBees.
On the robot, I made things simple by having a
separate power supply for the wheel motors (the large,
black lead acid battery in the abdomen), servo motors (6V
Ni-MH), Propeller prototyping board (six AA), and a 9V for
the camera. That’s a lot of batteries. I had originally
intended to power everything from the 12V lead-acid
battery, but that’s a project for a different day.
The benefit of each system having its own power
supply is that one system doesn’t affect the other, such
as the wheel motors straining and causing the voltage
to drop momentarily which would then cause the
microcontroller to think that you’re resetting it. The
important thing to remember is that all of the different
power supplies have to share a common ground.
Otherwise, things won’t work correctly. That got me
when I was just starting out.
Remember, voltage is the electrical potential
difference between the high (+) and the low side (-)
and everything in your system needs to have a
common reference point to work properly. That
common reference point is ground (-).
The Propeller prototyping board on the robot can
be divided into three sections: 1) servo connectors;
2) HB- 25 motor controller connectors; and 3) the XBee
(Figure 10). The six servo connectors get their power from
the 6V Ni-MH battery mentioned before, and are connected
to pins 18-23 on the Propeller chip using a 3.3KW resistor in
between. The resistor protects the Propeller chip from
accidentally shocking. The HB- 25 motor controllers are
similarly connected to pins 2 and 3; again with 3. 3 KW
resistors in between. The XBee is directly connected to pins
0 and 1. Each pin is also connected to a 220W resistor, an
LED, and 3. 3 volts.
A detailed look at setting up and using XBees can be
found in the book, Getting Started with XBee RF Modules.
I highly recommend the book or getting the kit that the
book comes with. As of this writing, the book is available as
a free download on Parallax’s website.
The controller also uses a Propeller prototyping board
(Figure 11). The controller board can be divided into three
sections, as well: 1) the XBee; 2) mini arm inputs; and 3) the
“press to start moving” button mounted on the plexiglass
shield. Part 1 explained how the simple capacitor decay
circuit worked, so I won’t go into detail on that, but in a nut
shell, the Propeller sets a pin to output and then outputs a
voltage that fills a capacitor.
The Propeller then changes the same pin to input and
times how long it takes the capacitor to drain through the
variable resistor. In this case, the variable resistor is the
potentiometers in the mini arm’s joint and the time value
given the position. Using a small capacitor like a 10 nF allows
this whole process to repeat more than a hundred times per
second. The XBee circuit is the same as on the robot; the
button is just a button.
For the wireless video camera, I used an inexpensive
2. 4 GHz color model that had a microphone. There are a
number of different kinds that you can choose from, mostly
depending on your budget. I chose this one because the
camera was small and light weight, and the entire
50 SERVO 04.2014
Figure 11. Close-up of remote control Propeller demo
board with the large "press to start moving" button mounted
on the Plexiglass shield.
Figure 10. Close-up of robot Propeller demo board. Notice the
Tx (transmit) and Rx (receive) LED indicators next to the XBee.