-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to read sensor values from Roomba #2
Comments
I have the same problem - Roomba 786p, NodeMCU. Commands work, telemetry doesn't. Looks like serial read times out. |
hi Anyone found a solution for this i expiriens same problem |
We have found that if you use an ESP8266 module (Eg: WEMOS D1 Mini or NODE MCU), with a 470 Ohm (or equivalent) resistor mounted on the TX pin, this resistor needs to be removed in order to get the sensor values to the ESP. As this resistor pull's the TX pin to 3.3V. By removing this resistor you can no longer program the module trough USB. |
For what it's worth, my Wemos D1 Mini couldn't read the Roomba sensors either. I found this snippet in an iRobot Create 2 Doc
I used a 2N3906 and following the circuit as described in the PDF; I can now read sensor values from the Roomba! |
So instead of removing the 470O resistor you used the 2N3906? I tried adding it to the voltage divided RX/TX line and it did not work. Did you remove the voltage divider? |
@se4n01 - I am not using a voltage divider, that's correct. |
I suspect this is a big reason the serial transmission seems unreliable. |
I'll try the 2N3906 thing in a couple days. Looks just as simple if not simpler to wire than the voltage divider. |
keep us posted, the 2N3906 did not work for me sadly |
@se4n01 interesting thanks for the tip. Maybe the best route is to use a bidirectional level shifter and do this right. That way we can eliminate any uncertainty about voltage levels being the cause of issues. I think I have a couple of these laying around https://www.sparkfun.com/products/12009 I’ll have to move to a wemos d1 mini or some other board with a 5v rail but that’s not the worst thing |
It's unclear to me from @se4no1's post and I'm not an expert in this stuff, but the 2N3906 does require a resistor (~ 1-10k) between the base pin and the mcu pin. |
Cross-posting here. I tried the bidirectional level shifter and it did not work. I have no idea why it didn't. I wrote in a bit more detail about it here. |
Hi guys, thanks for sharing that HA thread, it's very informative, thank you! Shame the level shifter did not work but I think it's for the best to use it anyway. I also in the end tried removing the 470Ohm resistor, it also did not work. I will try playing around with the code this weekend when I have some time. As an aside, NiMH batteries actually like to be deep discharged, partial discharging causes them to lose the memory of the zero and will reduce capacity with time. |
Interesting to know about the deep discharge. I think 10.8v is a deep-ish discharge for the roomba battery right? |
Hi folks, just sharing another data point for troubleshooting the Rx sensor issue. Thanks for writing the code! It's been a fun project so far (my first microcontroller project) but the lack of sensor data has been a disappointment. I have it integrated with the MQTT vacuum component in Home Assistant and can get it to respond to all commands over MQTT but it would be nice to have the battery level information to set up automations to send it back to dock to charge and then send it back out when it's done. Platform: Roomba 400 series (model 4225) ** I have also tried wiring with a logic level converter between the NodeMCU board and the Roomba on both Rx and Tx instead of using the PNP transistor (2N3906) and, like the PNP transistor wiring, can Tx to but not Rx from Roomba. platformio.ini file:
I also had to set the baud rate to 57600 in the main.ccp file for the 400 series Roomba to respond to commands:
I see no payload at all when monitoring the 'vacuum/state' MQTT topic :( I've also tried using the Arduino sketch written by the The Hook Up in his Roomba setup and, again, Roomba will respond to commands but I can't get sensor data. Any ideas are greatly appreciated but mostly wanted to share my experience. Thanks again! |
@dinkyshaw Got my Roomba 780 perfectly working with a nodemcuv2 using this wiring: https://github.com/thehookup/MQTT-Roomba-ESP01/blob/master/schematic.JPG |
Platform: Roomba 780
board: d1_mini
Used PlatformIO to build the code.
Start/stop/return_to_home seems to work just fine but unfortunately no telemetry. Connecting back to telnet debug port getting repeating:
(d) Failed to read sensor values from Roomba
Happy to provide any necessary information
The text was updated successfully, but these errors were encountered: