Funny… I did exactly the same in April I didn’t want to see the Wemos on top of the Roomba
But I also just can use the functions start/stop/dock so far
I see you used a dc power shield @nicohirsch. I am looking to do the same, how did you a guide on how you connected it?
Hi there,
anyone thinking about rewriting the roomba component to support mqtt - and then update the wemos to support mqtt?
Hi, I have a Roomba 555 and pilot through Broadlink RM PRO.
I do not always manage to return to the base because when I send the command is hidden behind a mobile, but no problem is going to start. Simple and easy.
Plus me in a generic MQTT esp8266 will be extremly fun
@HickHackerz I connected the input pins of the power shield to the unregulated power pins of roomba (1 / 2 for power and 6 / 7 for ground)
Reading the current “sensor” gives an idea of its position or action - positive value = in dock, more than a use of 500mA(-500) signales movement, around -100mA active but not running.
I have arduino 1.8.3 and after uploading to esp, it crashes. Is 1.6.5 mandatory?
wdt reset
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09f0c112
~ld
On a side-note: does anyone know if the 780 can be controlled over infrared?
Thanks!
Nope compiled it on 1.8.3 with no problems
Turns out the esp was broken. Used another unit and it worked fine. Did a small fork, added spot and stop commands.
void handle_roomba_spot() { mySerial.write(128); delay(50); mySerial.write(131); delay(50); mySerial.write(134); Serial.println("Spot cleaning"); handle_root(); } void handle_roomba_stop() { mySerial.write(128); delay(50); mySerial.write(131); delay(50); mySerial.write(133); Serial.println("STOP"); handle_root(); }
My roomba goes to sleep after some time, do you know how to wake it up? (model 780).
You can wake up the Roomba by sending a low pulse to pin 5 (Device Detect input)
void wakeUp (void)
{
setWarningLED(ON);
digitalWrite(ddPin, HIGH);
delay(100);
digitalWrite(ddPin, LOW);
delay(500);
digitalWrite(ddPin, HIGH);
delay(2000);
}
Source: https://www.hackster.io/mjrobot/controlling-a-roomba-robot-with-arduino-and-android-device-56970d
Thanks. That did wonders! Now I just have to minify my setup to fit inside somehow
I didn’t see your fork with the changes, so I did a fork with the changes made.
I’m little lost on adding the wakeup. Its pretty essential since the goal I had was to have roomba power back on when stuck and lost in the house. Seems to happen in same spots.
Thanks for posting the link to the modified version. Hopefully it will evolve and maybe sensors and mqtt will be added at some point…
Diff here: https://github.com/yahat/roomba-esp8266/commit/45bd636c9946d20e31b79dc3830a2476e00f8cf7
Fork here: https://github.com/yahat/roomba-esp8266 - but you only need the above file.
#define Wake_Pin 16
String roombacontrol = "<a href='/roombastart'<button type='button' class='btn btn-default'><span class='glyphicon glyphicon-play' aria-hidden='true'></span> Start</button></a><a href='/roombastop'<button type='button' class='btn btn-default'><span class='glyphicon glyphicon-stop' aria-hidden='true'></span> Stop</button></a></div><a href='/roombaspot'<button type='button' class='btn btn-default'><span class='glyphicon glyphicon-search' aria-hidden='true'></span> Spot</button></a></div><a href='/roombadock'<button type='button' class='btn btn-default'><span class='glyphicon glyphicon-home' aria-hidden='true'></span> Dock</button></a></div>";
in setup
pinMode(Wake_Pin, OUTPUT);
digitalWrite(Wake_Pin,LOW);
server.on("/roombaspot", handle_roomba_spot);
server.on("/roombastop", handle_roomba_stop);
void handle_roomba_wake(){
digitalWrite(Wake_Pin, HIGH);
delay(100);
digitalWrite(Wake_Pin, LOW);
delay(500);
digitalWrite(Wake_Pin, HIGH);
delay(100);
}
void handle_roomba_start()
{
handle_roomba_wake();
Serial.println("Starting");
mySerial.write(128);
delay(50);
mySerial.write(131);
delay(50);
mySerial.write(135);
Serial.println("I will clean master");
handle_root();
}
void handle_roomba_dock()
{
handle_roomba_wake();
mySerial.write(128);
delay(50);
mySerial.write(131);
delay(50);
mySerial.write(143);
Serial.println("Thank you for letting me rest, going home master");
handle_root();
}
void handle_roomba_spot()
{
handle_roomba_wake();
mySerial.write(128);
delay(50);
mySerial.write(131);
delay(50);
mySerial.write(134);
Serial.println("Spot cleaning");
handle_root();
}
void handle_roomba_stop()
{
handle_roomba_wake();
mySerial.write(128);
delay(50);
mySerial.write(131);
delay(50);
mySerial.write(133);
Serial.println("STOP");
handle_root();
}
Hardware pic
- esp8266 - adafruit huzzah
- 3v-5v logic level convertor - https://www.pololu.com/product/2595 (cheap and works fine up to 18v logic levels)
- power convetor: https://www.pololu.com/product/2843/specs (up to 36V in, 5V out)
Image:
Thats pretty clean. I used the Wemos d1 mini with the DC power shield, removed the DC barrel jack and soldered directly on.Voltage divided the RX and left tx as is
big thanks to @quasar66, I implemented the wakeup routine and added in max cleaning (??) to my fork
I can finally issue commands after it gets stuck and lost under the bed, couch. I only wish the page could display the status , cleaning, error, docked. But I am really happy with the outcome.
I’m working on running the command to get status stream and navigate it remotely, but first Im trying to integrate it with mqtt via a new espeasy module, the the other two.
What I’m worried is draining the battery under the minimum limit. I’ll try adding a safety for minimum voltage
Also I will try to add tomorrow the play song functionality to find it easier under furniture
How did you wire this? I see you only soldered 6 wires, but how does the buck converter play into what you did?