Archive for August 28th, 2009
Friday Night Robotics – iRobot Gearing?
This is actually from last Friday, August 28th!
I recently ‘inherited’ an iRobot Create. It’s a Roomba, but without a vacuum, and made specifically for hobby robotics.

Getting it to work with an Arduino was excruciatingly hard at first. It does come with a controller on board, but the instructions for that were more sparse than just using plain serial commands. Or, maybe I misread them and they are the same things…
In any case, I used the DIN connector to connect to the Arduino so that it can send and receive commands, as well as be powered by the iRobot!



Sending commands to the iRobot is interesting… you start off with a number from -500 to 500 in mm/s, then…
1. Take the absolute value
2. Convert this to a hexadecimal number
3. Split the hex into two
4. Add a sign bit infront of the first part
5. Convert the two parts into bytes
This works very well for 500 mm/s and -500 mm/s.
However, when trying it with -100mm/s and 100mm/s, the -100mm/s goes faster than the 100mm/s!
I believe this is the code where we got the -100mm/s to be almost the same, even though it made no mathematical sense…
-
Serial.print(145, BYTE);
-
delay(50);
-
Serial.print(1, BYTE);
-
delay(50);
-
Serial.print(244, BYTE);
-
delay(50);
-
Serial.print(1, BYTE);
-
delay(50);
-
Serial.print(244, BYTE);
-
delay(50);
-
-
delay(5000);
-
-
Serial.print(145, BYTE);
-
delay(50);
-
Serial.print(241, BYTE);
-
delay(50);
-
Serial.print(244, BYTE);
-
delay(50);
-
Serial.print(241, BYTE);
-
delay(50);
-
Serial.print(244, BYTE);
-
delay(50);
-
-
delay(5000);
The only thing we can think of is that the gearing of the wheels is different for driving backwards.
We’re going to keep playing with it, next time we’ll be seeing if we can get some sensor data from the bump and IR sensors!





