Giter VIP home page Giter VIP logo

Comments (16)

Daigaard avatar Daigaard commented on July 16, 2024 1

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.

se4n01 avatar se4n01 commented on July 16, 2024 1

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.

Iture avatar Iture commented on July 16, 2024

I have the same problem - Roomba 786p, NodeMCU. Commands work, telemetry doesn't. Looks like serial read times out.

from esp-roomba-mqtt.

andenmad avatar andenmad commented on July 16, 2024

hi

Anyone found a solution for this i expiriens same problem

from esp-roomba-mqtt.

mannkind avatar mannkind commented on July 16, 2024

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.

se4n01 avatar se4n01 commented on July 16, 2024

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.

mannkind avatar mannkind commented on July 16, 2024

@se4n01 - I am not using a voltage divider, that's correct.

from esp-roomba-mqtt.

johnboiles avatar johnboiles commented on July 16, 2024

I suspect this is a big reason the serial transmission seems unreliable.

from esp-roomba-mqtt.

johnboiles avatar johnboiles commented on July 16, 2024

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.

se4n01 avatar se4n01 commented on July 16, 2024

keep us posted, the 2N3906 did not work for me sadly

from esp-roomba-mqtt.

johnboiles avatar johnboiles commented on July 16, 2024

@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.

mannkind avatar mannkind commented on July 16, 2024

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.

johnboiles avatar johnboiles commented on July 16, 2024

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.

johnboiles avatar johnboiles commented on July 16, 2024

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.

 avatar commented on July 16, 2024

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.

Armadill0 avatar Armadill0 commented on July 16, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.