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.
Power output from roomba and ground go to buck converter. Then output and ground from buck is connected to vin/v+ of the esp if it has 5V power input or to the 3v pin. If the buck converter only outputs a certain voltage connect it to the appropriate pin. 5V is preferred if possible for lower amperage.
The roomba output from 11-something to 20-something (not really sure the exact values) volts. Anything above 3/5 v (again depending on the power input you have on the board) will kill the esp immediately.
If you look at my picture, I have a 3v-5v convertor with 3 wires to the roomba for data. And a power convertor 6-36V to 5v switching power supply. This means the esp sees 3v on its data pins and 5V on power pin while the roomba gives out any voltage it wants for power (fluctuates with movement/charging) and it sees 5V on its data pins.
If you give more than 3v on data pins and more than 1V on analog pin or more than 5V on the 5V input pin or 3V on the 3V power pin you kill the board.
Also all grounds should be connected between them.
I am a self-taught electrician so take all this with a grain of salt. While I haven’t fried anything in the past 10 years I lack a good training in this stuff
For docking I’m putting an ir distance sensor on the dock with another esp. Seems the safest / best option of not waking up roomba all the time while charging. I’ll do that with an esp, this sensor https://www.pololu.com/product/1134 which reads 0 when beam is broken and espeasy. 5 minutes for project, 1 hour to make it look good
Seems the sleep mode goes into effect after error, stop commands. Not sure how it would drain any faster than normal. Also when docked it is not in sleep mode, at least the 5xx series. Before the wakeup routine I could issue commands when it was docked, even stop, it would flash off and back on again.
Yeah I couldn’t either so I started one. Built to work with my mqtt vacuum implementation. No Readme yet. It’s very much a work in progress but it mostly works now!
I’m having this gnarly issue I’ve seen others report online where 2016 and newer Roomba 650s go into a hard sleep after a minute of being on the dock. I haven’t been able to figure out the proper combination of pulsing the BRC pin and/or commands to prevent the sleep. Looks like Thinking Cleaner had a workaround in their firmware that would keep Roomba 650s awake so it has to be possible.
If anyone else is able to give this a spin I’d love to share notes.
This really sounds great!
So this should be compiled in platformio?
All the settings are in esp-roomba-mqtt/src/config.h ?
BRC_PIN is the one going to RX in roomba?
I hope with so many bright heads on this forum this project will receive support. Any chances of OTA firmware updates added?
It’s been a long time since I’ve been searching for my Roomba 650. Thank you.
I’m trying to upload your sketch to ESP12 board.
First attempt no success
(untouched code)
Second attempt success but I don’t know sketch is running. There is no new network IP address on my wifi network
(commented upload_port in platformio.ini file)
config and secrets file changed. there is no password issue, i think.
Additioanlly, getting this warning while uploading sketch:
Verbose mode can be enabled via `-v, --verbose` option
fatal: Not a git repository (or any of the parent directories): .git
You might need to modify the values in config.h (particularly MQTT_SERVER). BRC_PIN goes to pin 5 on the Roomba’s Mini Din connector (it’s used to wakeup the Roomba from sleep – though as mentioned it doesn’t work as such for newer 650s when they’re on the dock).
You’ll also need to copy secrets.example.h to secrets.h (e.g. cp src/secrets.example.h src/secrets.h) and change its values for you WIFI & MQTT credentials.
No need to set the RX/TX pins since I’m using the hardware RX/TX on the ESP8266 to talk to the Roomba. However, that also means you’ll need to first connect your ESP8266 to a computer to program it (modify upload_port in platformio.ini) before you connect it to the Roomba. After that you can program it over the air (ArduinoOTA support is built into the firmware). I’m not super sure about this, but I think you need an ESP8266 with a larger flash chip to support ArduinoOTA. I’m using an ESP12E which has 4M flash.
Wow, I didn’t think someone would get to trying it so quickly!
I assume you figured out to copy secrets.example.h to secrets.h? Which ESP12 board are you using? I’m using an ESP12E.
Did you clone the repo with git or download the source as a zip? There’s a part of the build_flags setting that compiles in the current Git SHA so you can check which version you’re running (-DGIT_REVISION='\"$(git rev-parse HEAD)\"' ). If you remove that flag it will probably get rid of your warning. I don’t think that would cause the build to fail however.
Awesome! Do you already have your ESP board wired into a Roomba?
If you want to test out the mqtt integration you could either check out my home assistant branch. Or manually send commands over mqtt (with a tool like mosquitto).
If you want to try to help figure out how to keep the Roomba 650 awake while on the dock, try out the telnet debugging interface (telnet roomba.local). With that you can log messages from code with DLOG and also send commands back that the code can act on. There’s a comment about what I’ve tried to this end at the top of the wakeup function)
Roomba on Dock and connected RX/TX pin to ESP Module. And here is my debug output.
(d) Failed to read sensor values from Roomba
(d) Failed to read sensor values from Roomba
(d) Failed to read sensor values from Roomba
(d) Wakeup Roomba
(d) Failed to read sensor values from Roomba
(d) Done waking up
(d) Failed to read sensor values from Roomba
(d) Failed to read sensor values from Roomba
(d) Failed to read sensor values from Roomba
I’m using High Sierra and telnet gone (I don’t know why) I’m using nc command:
nc roomba.local 23
When I remove the roomba from dock and long press to CLEAN button, roomba goes sleep. After that, esp12 waking up the roomba.
EDIT:
MQTT command works now
I can start/stop/return_base etc.
trying to get status (ı don’t know which status can be read from roomba?)
I know some mosquitto commands. With @johnboiles’s program I could send Mosquitto to Roomba. But I could not get the distance, chargingstate, voltage, current, charge, capacity on Roomba. I’m trying to figure out how to do this.