Comments (16)
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.
from esp-roomba-mqtt.
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.
from esp-roomba-mqtt.
I have the same problem - Roomba 786p, NodeMCU. Commands work, telemetry doesn't. Looks like serial read times out.
from esp-roomba-mqtt.
hi
Anyone found a solution for this i expiriens same problem
from esp-roomba-mqtt.
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
In some cases, the drive strength of a Roomba TX line is not enough to drive the RX line of another board (for example, in some revisions of Arduino). In this case, a simple PNP transistor (2N2907A, 2N3906, or 2N4403, among others) can be used to provide enough “drive” for the Arduino.
I used a 2N3906 and following the circuit as described in the PDF; I can now read sensor values from the Roomba!
from esp-roomba-mqtt.
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?
from esp-roomba-mqtt.
@se4n01 - I am not using a voltage divider, that's correct.
from esp-roomba-mqtt.
I suspect this is a big reason the serial transmission seems unreliable.
from esp-roomba-mqtt.
I'll try the 2N3906 thing in a couple days. Looks just as simple if not simpler to wire than the voltage divider.
from esp-roomba-mqtt.
keep us posted, the 2N3906 did not work for me sadly
from esp-roomba-mqtt.
@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
from esp-roomba-mqtt.
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.
from esp-roomba-mqtt.
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.
from esp-roomba-mqtt.
Interesting to know about the deep discharge. I think 10.8v is a deep-ish discharge for the roomba battery right?
from esp-roomba-mqtt.
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)
board: NodeMCU LUA CP2102 ESP-12E
wiring diagram
** 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:
[env:d1_mini]
platform = espressif8266
board = nodemcuv2
framework = arduino
lib_deps =
RemoteDebug
PubSubClient
ArduinoJson
upload_port = roomba.local
build_flags = -DLOGGING=1 -DMQTT_MAX_PACKET_SIZE=512
I also had to set the baud rate to 57600 in the main.ccp file for the 400 series Roomba to respond to commands:
// Roomba setup
Roomba roomba(&Serial, Roomba::Baud57600);
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!
from esp-roomba-mqtt.
@dinkyshaw Got my Roomba 780 perfectly working with a nodemcuv2 using this wiring: https://github.com/thehookup/MQTT-Roomba-ESP01/blob/master/schematic.JPG
from esp-roomba-mqtt.
Related Issues (20)
- TX and BRC HOT 6
- Wiring Scmatics for ESP 01 HOT 1
- Not Working after Upload to D1 Mini HOT 2
- Roomba wakes up and restarts every 10 seconds HOT 12
- Warning: control reaches end of non-void function
- Roomba 770 Responds to clean message, but no others. HOT 1
- Roomba 521 HOT 1
- Debug mode keeps disconnecting HOT 1
- config of secrets.h file HOT 2
- build problem HOT 4
- Problems installing on ESP01
- Not Compatible with the newest hass.io integration
- Compiling using Arduino IDE (passing build_flags)
- howto rename Roomba HOT 2
- Disable default wifi hotspot HOT 3
- Readme.md Electronics picture, GPIO 15 wrong HOT 2
- Roomba 560 no control
- Using it with domoticz ?
- Strange Thing taking from Roomba HOT 2
- D1 Mini restarting every 11 seconds
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-roomba-mqtt.