Our resident expert on all things
robotic is merely an email away.
roboto@servomagazine.com
Tap into the sum of allhumanknowledge and get your questions answered here!
From software algorithms to material selection, Mr. Roboto strives to meet you
where you are — and what more would you expect from a complex service droid?
by
Dennis Clark
Correction from the
January Column
First off, I need to start out with
a correction. In Figure 6 back in the
January 2013 issue, I mislabeled the
Roomba serial control mini DIN
connector. The pin that is marked as
pin 6 is actually pin 7. Table 2 at the
end of that same article which lists
the functions of the pins is correct.
Fortunately, both of these pins
are the Roomba’s battery minus pins,
so no matter how you connected
them, there wouldn’t be any
problems.
Spring is just around the corner, but winter doesn't seem ready to let go yet. There is still plenty of time to spend indoors with our robots, preparing for the next competition. That is certainly what I'm doing. The 2013 Critter Crunch is coming up in just a few months! (Ahh!)
For this column, I'm going to do some more with Roomba controlling with an
Arduino UNO in the hopes that this project will boost me well on my way to a
new 20 pound Critter to compete with those other critters that still use
"wetware" as the controller! Which, I have to admit, is pretty much all of them.
Eventually, my robots will win the majority of its combats, and then win them
all! Bwahahaha! Ahem.
Anyway ... This bit of Roomba controlling is a bit late, but better late than
never (someone once said ... does anyone actually know who first said that?).
Anyway, on with the show!
Now, back to our Roomba control
round-up ...
More on the
Hardware
Speaking of Roomba power
connectors, you can’t just plug your
Arduino into it without some
preparation. The output of the
Roomba battery can run as high as
20V while charging; while it is
running, it is over 17V.
If you plug that power into the
input jack of your Arduino, you will
overheat your regulator and probably
blow one of the voltage comparator
chips! You need to step this voltage
down to use it.
Here, you have two choices: You
can either build a power board using
a 7812 style voltage regulator and
plug that 12V into your Arduino
power input jack (which handles up to
12V safely); or you can step the
voltage down to 5V and plug that into
your Arduino 5V connector.
I didn’t have any 12V linear
regulators, but I did have some Power
Trends PT78ST105 5V switching
regulators. These will take from 7V to
27V input and provide 1.5 amps of 5V
as output. Just add two capacitors
and you’re done!
Figure 1 shows my setup with
the 5V regulator board and Arduino
UNO board sitting on top of my
“FrankenRoomba” robot. The one
main problem with this setup is that
power is always available at the SCI
connector so the Arduino comes on
and wakes up the Roomba as soon as
it is plugged in.
How the
Firmware Works
Take a look at the source code
listing and use that as a reference to
my following explanation of the very
simple code: RoombaScoot. You can
grab the zip file from the article link.
You must use at least Arduino 1.0 or
later for this program.
Let’s break the code down by
sections and discuss what is going on.
SERVO 03.2013 13