problem! Modify the connector!
Using a small-tip pair of long-nose pliers, carefully grab
the plastic stud and twist it until it snaps off. The
registration slots on the metal case of the connector will
properly align with the Roomba mini DIN connector, and
everything will work fine. See Figure 7 for a typical mini
DIN six-cable connector which clearly shows the center
plastic registration stud removed. (In Figure 6, I labeled all
of the pins but one — pin 6.
Table 2 gives the description for all of the pins,
whether we are using them or not.
Unless you have a mini DIN connector with seven pins,
you won’t be able to use pin 6 which will limit the current
that you can pull from the battery for this connection. For
our use with a low-power microcontroller, this won’t be an
issue. If you are going to try to power a PC104 board
(high current requirements), you might want to use a
separate battery and use pin 7 to make your grounds
common.
The iRobot SCI interface protocol is not in ASCII, so
you can’t use a terminal emulator to talk to it. Because of
this, iRobot thoughtfully did not require you to use an RS-
232 level translator to use the port; you can use the serial
output directly from your microcontroller to talk to the
Roomba.
Many people call the asynchronous output from a
UART on a micro “RS-232.” It isn’t. RS-232 refers to the
electrical specification that describes the signal levels that
appear on the other side of the RS-232 level translators
that you attach to your microcontroller. This causes some
confusion, so be the first on your block to correctly name
this.
The iRobot SCI specification states that this is a 0-5V
logic level, so if you are using a micro whose native output
is 3.3V, you will have to do a level translator which isn’t
hard. (See my October 2012 article about using a wireless
PS2 controller which gives a good circuit for doing this
voltage level translation.)
iRobot is pretty coy about their manuals for hacking
the Roomba, so you aren’t going to just navigate their site
to find them — at least I couldn’t find them by wandering
the site. However, you can find them using their search
window. Here are a few of the fun things that you can
find; some of them are for the iRobot Create, which is
their hacker hobbyist-only version of the Roomba. The one
that we’re interested in is the iRobot Roomba Serial
Command Interface Specification. Here are the manuals
that I found on their site:
Pin
1
2
3 Rxd
Figure 7
and start controlling the Roomba from an Arduino. Yeah,
I’m going to use the Arduino for a couple of reasons: It is
easy to use and I’m essentially lazy when it comes to reinventing a wheel. If someone has already written an SCI
command translator interface for the Arduino, I’m gonna
use it! The Arduino is a 5V microcontroller system, so we
can interface its UART directly to the SCI connector and
run.
I’ve looked through this manual a little and noticed
that you can set the Roomba to a variety of modes. You
can not only control its motors, but also get detailing
information about the state of its many sensors. It doesn’t
look too hard to use, either.
So, until next month, think about the possibilities or
jump the gun and write to me with your findings,
suggestions, or requests.
I’ve come to the end of another Mr. Roboto column
and it seems there is still so much more to do! That is the
wonderful thing about a hobby — especially this one.
There is always more to do! So, send me your emails to
roboto@servomagazine.com and I’ll do my best to answer
them. SV
Name
Description
Vpwr Roomba battery + (unregulated)
Vpwr Roomba battery + (unregulated)
0-5V logic level asynchronous serial input to
Roomba
• iRobot Roomba Serial Command Interface (SCI)
Specification
• iRobot Create OPEN INTERFACE
• iRobot Create OWNERS GUIDE
• iRobot Command Module OWNERS MANUAL
Go hunting at www.irobot.com.
Next month, we’re going to dig into the SCI manual
4
Txd 0-5V logic level asynchronous serial output from Roomba
5
DD Device detect input (active low) used to wake Roomba up
6 GND Roomba battery – (Not connected on a cable)
7 GND
Roomba battery – (Unregulated)
SERVO 01.2013 19