Shop OBEX P1 Docs P2 Docs Learn Events
Roomba interface — Parallax Forums

Roomba interface

davidcdavidc Posts: 1
edited 2006-11-03 04:34 in BASIC Stamp
Hello Members,

Anyone conducting research on interfacing the BS2 microcontoller to the Roomba Vac/ROBOT? Read the archives and didn't see anything recent. The BS2 outputs at 9600 baud, while the Roomba communicates at ~19K and `57K baud. Could this have an impact on design and software development? I'm also aware of the research currently being conducted on the Roomba with Javelin Stamp and Java, however, I'm not yet equipped with the hardware resources (Javelin Stamp with Pro Dev. board on Xmas wish list) to jump to that level.

Now the challenge:

Can the BS2 micro_ be programmed to send serial date to the Roomba based on the Roomba's Serial Command Interface
(SCI) Specification?

For example:

" Roomba mini-din Pin Name Description
1 Vpwr Roomba battery + (unregulated)
2 Vpwr Roomba battery + (unregulated)
3 RXD 0 – 5V Serial input to Roomba
4 TXD 0 – 5V Serial output from Roomba
5 DD Device Detect input (active low) – used to wake up
Roomba from sleep
6 GND Roomba battery ground
7 GND Roomba battery ground
The RXD, TXD, and Device Detect pins use 0 – 5V logic, so
a level shifter such as a MAX232 chip will be needed to
communicate with a Roomba from a PC, which uses rs232
levels.

Full Command opcode: 132 Number of data bytes: 0
Enables unrestricted control of Roomba through the SCI and
turns off the safety features. The SCI must be in safe mode to
accept this command. This command puts the SCI in full mode.

Motors Command opcode: 138 Number of data bytes: 1
Controls Roomba’s cleaning motors. The state of each motor is
specified by one bit in the data byte. The SCI must be in safe
or full mode to accept this command. This command does not
change the mode.
Serial sequence: [noparse][[/noparse]138] [noparse][[/noparse]Motor Bits]
Motors data byte 1: Motor Bits (0 – 7)
0 = off, 1 = on
Bit 7 6 5 4 3 2 1 0
Motor n/a n/a n/a n/a n/a Main
Brush
Vacuum Side Brush
Example:
To turn on only the vacuum motor, send the serial byte
sequence [noparse][[/noparse]138] .

Can the above example commands be written in PBASIC and sent to the Roomb via BS2 serial port after level shifing?

The complete Roomba SCI can be retrieved at www.irobot.com, the Roomba's official website.

Thanks,

D_

PS: Please overlook any typo's this time. I'm in a hurry and didn't cut/paste into my spellchecker (-;

Added subject Dave A.

Post Edited By Moderator (Dave Andreae (Parallax)) : 10/20/2006 9:23:38 PM GMT

Comments

Sign In or Register to comment.