Roomba voice control with Alexa and Belkin-Wemo emulator

You can start the iRobot Roomba with a voice command or send it to the dock. In an earlier post , I showed how to give a command to the robotic vacuum cleaner through an ioBroker server. The example in this article does not require an ioBroker server. It uses a Belkin-Wemo emulation to connect directly to Amazon Echo.

If you don’t want to do it yourself, there is a ready-made solution:


Things used for the project:

ESP8266-Esp-01 Module

ESP-01S Breadboard Adapter

Programmer USB to ESP-01 Adapter ESP8266

MP1584EN DC-DC Buck Converter Adjustable Power Supply Module

Amazon Echo 4th gen.


You can issue commands to Roomba via a serial port. This is a mini DIN 7-pin connector for the “iRobot Roomba® Open Interface” found under the top cover.

iRobot Roomba® Open Interface
iRobot Roomba® Open Interface

iRobot_Roomba_500_Open_Interface_Spec.pdf

Let’s dismantle the Roomba. Remove the dust container and brushes. After removing the 4 screws, lift off the bottom cover and remove the battery.

Disassembly of iRobot Room, lower part
Disassembly of iRobot Room, lower part

Then remove the bumper, snap out the top cover plate, and remove the bolts underneath. The 2 screws on the handle can remain.

Disassembly of iRobot Room, upper part
Disassembly of iRobot Room, upper part

Remove the cover.

Roomba with the cover removed
Roomba with the cover removed

Build the hardware according to the drawing below.

Roomba and ESP8266-01 circuit V2
Roomba and ESP8266-01 circuit

Remember to set the output voltage on the MP1584EN voltage stabilizer module using the potentiometer marked with an arrow. It is a small module (22 x 17mm) with adjustable input voltage: 4.5 V to 28 V and adjustable output voltage: 0.8 V to 20 V.

MP1584EN voltage stabilizer module
MP1584EN voltage stabilizer module

Program the Esp8266. Use the download directory below, in this writing debug to serial port is commented out because it can interfere with communication with Roomba.

ESP8266BelkinWemoEmulator.zip

Open the Arduino application. In the following sketch, enter your Wifi connection details and you can also change the name of Roomba, this name will appear in the Alexa application.

/**************************************/
//  https://myhomethings.eu           //
//  Generic ESP8266 module            //
//  Flash size: 1M (no SPIFFS)        //
/**************************************/

#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <WiFiUdp.h>
#include "Switch.h"
#include "UpnpBroadcastResponder.h"

const char* ssid = "SSID";
const char* password = "Password";
const char* RoombaFriendlyName = "iRobot Roomba";

Switch *switchRoomba = NULL;
UpnpBroadcastResponder upnpBroadcastResponder;

void setup_wifi() 
{
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) 
  {
    delay(500);
  }
}

bool switchRoombaOn()
{
  Serial.write(128);  // start command
  delay(50);
  Serial.write(131);  // safe mod
  delay(50);
  Serial.write(135);  // clean
  return true;
}

bool switchRoombaOff()
{
  Serial.write(128);  // start command
  delay(50);
  Serial.write(131);  // safe mod
  delay(50);
  Serial.write(143);  // dock
  return false;
}

void setup()
{
  Serial.begin(115200);
  setup_wifi();
  
  upnpBroadcastResponder.beginUdpMulticast();
  switchRoomba = new Switch(RoombaFriendlyName, 80, switchRoombaOn, switchRoombaOff);
  upnpBroadcastResponder.addDevice(*switchRoomba);
}

void loop()
{
  upnpBroadcastResponder.serverLoop();
  switchRoomba -> serverLoop();
}

When done, find a place for the circuit and then reassemble the Roomba in the reverse order of disassembly. Pay attention to wires!

Reassembled in Roomba, as if nothing had happened
Reassembled in Room

Now open the Amazon Alexa app on your phone and add the new device, the iRobot Roomba robotic vacuum cleaner, or ask Alexa to explore the devices.

iRobot Roomba and the Alexa app
iRobot Roomba and the Alexa app

From now on, with the help of Alexa, we can also control Roomba with our voice.

If you are interested, you can easily create a Virtual Wall for Rome with arduino nano.