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:
iRobot Roomba 675 Robot Vacuum-Wi-Fi Connectivity, Works with Alexa
advertising – amazon.com
Things used for the project:
Programmer USB to ESP-01 Adapter ESP8266
MP1584EN DC-DC Buck Converter Adjustable Power Supply Module
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_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.
Then remove the bumper, snap out the top cover plate, and remove the bolts underneath. The 2 screws on the handle can remain.
Remove the cover.
Build the hardware according to the drawing below.
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.
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.
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!
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.
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.