Introduction: Inspector Roomba

Most of us use iRobot Roomba robots only for vacuuming, but few know that it is a great base for a new robotic projects. All makers should try the Roomba Open Interface (OI) to find out how easy it is to control this robot. In this instruction you will learn how to add some useful features to your Roomba. At the beginning I will describe how to remote control of Roomba via bluetooth and Android app. Later I will show you how to run video streaming based on the RPi and finally I outline the plan for further development of this project.

Parts needed in this project:

  1. BTM-222 bluetooth module or other working at 115200 baud rate x1
  2. 5V Step-Down Voltage Regulator D24V6F5 x1
  3. mini breadboard x1
  4. A few wires

version with casing:

  1. 8 pin mini DIN connector x1
  2. power switch x1
  3. led 3 mm x1
  4. resistor 10k x1
  5. small casing 50x40x20 mm x1

extended version:

  1. Raspberry Pi 3 x1
  2. RPi copper heat sink x1
  3. USB WiFi adapter x1
  4. micro SD card 8GB or greater x1
  5. RPi camera - Fisheye Lens x1
  6. Case for RPi x1
  7. High capacity battery pack 5V (at least 10 Ah) x1
  8. A piece of plastic bracket x1
  9. Nuts and bolts M2 x4

Step 1: Connection of Electronic Parts

This time, this step is very simple because we only need to connect two modules to be able to control our Roomba. The first is a Bluetooth module that can operate at 115200 bps. The second is 5V Step-Down Voltage Regulator D24V6F5. Charged Roomba battery has a voltage of about 14.4V and our bluetooth module need 5V so we need to reduce battery voltage to the level of 5V using voltage regulator. The D24V6F5 regulator has efficiency between 80 and 90% that is very good value compared to classic linear regulators that typically have an efficiency below 40%. The easiest way to connect these two modules is putting them in mini breadboard and wiring according to the wiring diagram as above. In addition, all connections are shown in numbered photos. Be careful when connecting to the battery terminals. Accidental short circuit may damage the battery!

Step 2: Using the Android Control App

I've developed an Android app that allows you to control Roomba 500 series robotic vacuum via bluetooth. You can download my app for free from Google Play - Roomb Control. It works with both smartphones and tablets.

How to use Roomb Control App:

  • tap the upper right corner of the screen (3 vertical dots)
  • select the tab "Connect"
  • tap on the "BTM222" tab and after a while you should see the message "Connected to BTM222"
  • after connecting, you can control your Roomba
  • if you don't see your bluetooth device tap "Scan for devices" button
  • on the first use of your bluetooth module please remember to pair it with your smartphone by entering the default code given in bluetooth module specification

Step 3: Roomba Open Interface in Examples

In this step you will find examples of common commands used to control the Roomba series 500. You can find more information about Roomba Open Interface in this document.

Roomba 500+ can operate in one of four modes:

  • Full mode gives you complete control over Roomba (no safety restriction as it is for Safe and Passive mode)
  • Safe mode introduces some safety-related exceptions when you can not control all the actuators:
    • detection of a wheel drop
    • detection of a cliff while moving forward or backward
    • charger plugged in and powered
  • Passive mode allows you to request and receive sensor data, but in this mode, you can not control Roomba actuators (motors, lights, speaker)
  • Off mode when power is first turned on or after a battery change (waiting for Start command)

A secure and fully functional operation mode is Safe mode that is the preferred mode for remote control. To run safe mode firstly we need to send command 128 that starts the Open Interface and then command 130 (or 131) to put Roomba into Safe mode. If we want to run one of the built-in cleaning modes (clean, spot, dock, etc.) we should send the third command with appropriate code (Clean-135, Spot-134, Dock-143). The full serial sequence for these modes are as follows:

  • Set Safe Mode - (128, 130)
  • Spot - (128, 130, 134)
  • Clean - (128, 130, 135)
  • Dock - (128, 130, 143)

If the Roomba is in the Safe mode we can control Roomba's drive wheels using command 137. The full 5 bytes serial sequence is as follows: (137, Velocity high byte, Velocity low byte, Radius high byte, Radius low byte). Examples of the serial sequences for Roomba motion control:

  • Go Forward - (137, 100, 0, 128, 0)
  • Go Back - (137, 254, 12, 128, 0)
  • Turn Right - (137, 100, 0, 255, 255)
  • Turn Left - (137, 100, 0, 0, 1)

Alternatively to control robot motion we can use command 146. This command let us control PWM (Pulse-Width Modulation) for the right and left wheel: (146, Right PWM high byte, Right PWM low byte, Left PWM high byte, Left PWM low byte). Example of PWM control:

  • Move Top Right - (146, 0, 130, 0, 255)
  • Move Top Left - (146, 0, 255, 0, 130)

The command 139 control the LEDs colors. We can change the Clean/Power LED color by setting the the value of Color byte in serial sequence: (139, LED Bits, Color, Intensity). If Color byte is set to 0 we get green color. By increasing this value we get intermediate colors (orange, yellow, etc) and red color for the maximum value 255. Examples of LED's control:

  • green - (139, 0, 0, 128)
  • orange - (139, 0, 128, 128)
  • red - (139, 0, 255, 128)

The last command that I would like to mention is the command 140 that allows you to play simple songs. Examples of the serial sequences for playing songs:

  • song 1 - (140, 0, 5, 72, 32, 74, 32, 76, 32, 77, 32, 79, 32, 141, 0)
  • song 2 - (140, 1, 5, 69, 16, 71, 16, 72, 16, 74, 16, 76, 16, 141, 1)

Step 4: RPi Remote Webcam

To be able to view video streaming from the camera on any devices connected to my local network (PC, smartphone, tablet, etc) I have installed Motion webcam serwer. You can find details of how to do this in this Instructable. The main steps are as follows:

  1. Edit: sudo nano /etc/modules - add at the end of the file: bcm2835-v4l2
  2. Install Motion: sudo apt-get install motion
  3. Open motion.conf file by typing: sudo nano /etc/motion/motion.conf and set video parameters (e.g.: daemon on, width 640, height 480, framerate 30, webcam_localhost off)
  4. Enable the Daemon (service): sudo nano /etc/default/motion and find and change start_motion_daemon=yes.
  5. Start service: sudo service motion start or sudo motion -n -c /etc/motion/motion.conf
  6. Now open web browser on your computer or smartphone and type: RPi IP:8081 (where "RPi IP" is IP of your Raspberry Pi and 8081 is the default port). Example: 192.168.1.14:8081. If everything works well after a while you should see the view from your camera in your web browser.

Step 5: Plans for Further Development

Currently my Roomba is equipped with a small robotic arm described in this instruction. This robotic arm can be remotely controlled via bluetooth from the Android app. In the next step I'm going to use view from camera for remote gripping and moving objects to the marked space (operation in the semi-autonomous mode).

If you would like to see my other projects related to robotics please visit:

Step 6: Connection of Electronic Parts - Version 2 With Casing

If you would like to build your own removable receiver to control the Roomba this extra step is for you. We add a few more elements and will close them all in a slim casing. The main component which we will need in this step is a 8 pin mini DIN connector. In addition, we will need the power switch and indicator based on LED and resistor 10k.

Now you don't have to worry about sticking out wires. The bluetooth receiver is closed in a small housing with dimensions of 50x40x20 mm. When you don't want to use it then you can easily remove it from your Roomba pulling the mini DIN plug.

Comments

author
AaronBGMeritt made it!(author)2017-02-13

Hi I was curious what Roomba series can I use for this instructable?

author
AdamS301 made it!(author)2016-06-01

Hey, I need some help finding a good bluetooth module. I purchased a HC-06 module from ebay, and I while it connects to my phone just fine, it will not seem to talk to my roomba.

author
silver_a made it!(author)2016-06-02
author
silver_a made it!(author)2016-06-02

Hi,

The HC-05 and HC-06 seem to be unstable above 9600 bps. There are a number of bluetooth modules that can work with 115200 bps, for example: https://www.sparkfun.com/products/12577

author
bratan made it!(author)2016-05-24

Great instructable! I also hacked my roomba once and was able to control it via Arduino over WiFi, but never completed that project... Main goal was to monitor my pets when I'm on vacation and also fix small issues (i.e. stuck feeder, etc. for which robotic arm would come in handy). That was long time ago, now portable routers got much more compact, I think I'll give it another try :)
BTW what is the purpose of the 5V battery pack? Roomba already provides power...

author
silver_a made it!(author)2016-05-24

Thanks, You're right, one option is to use step-down voltage regulator with higher power and powering RPi from Roomba battery. However, in the next step, a small robotic arm will be supplied from this source and additional electrical load like RPi will quickly discharge the Roomba battery.

author
stringstretcher made it!(author)2016-05-12

great instructable! is there such a thinh as roomba racing?

author
silver_a made it!(author)2016-05-12

I haven't heard about Roomba racing contest, but it would be interesting especially for children https://www.youtube.com/watch?v=3SfTUV_xymA

author
kavish+laxkar made it!(author)2016-05-12

cool

author
silver_a made it!(author)2016-05-12

Thx

About This Instructable

7,996views

128favorites

License:

Bio: I'm an enthusiast of robotics :)
More by silver_a:Remote Controlled Smart Robotic ArmInspector Roomba4WD All Terrain Arduino Robot for Everyone
Add instructable to: