The pinout for the Roomba is rather easy and is mentioned in the create2 reference document.
But you can also see it up in this topic: (click)
In my schema’s I’m using a lot of labels to decouple the different components of the hardware design, but these four pictures should add some clarity:
Well, for some reason my Roomba serial port died.
I have no clue why.
After removing my chip and re-inserting it again a few minutes later (was working on a cover for the roomba), I think it short-circuited.
During the next day, somehow the Roomba battery got drained as it was still on the base station.
The ESP chip got hot, as well as the switching voltage regulator (TSR-1-2433) that supplies the 3.3V to my ESP.
After taking the custom PCB out of the Roomba again and placing the Roomba back on the base station, it began a battery recovery with a fast orange flashing clean button.
Then I put the custom PCB back into the serial port, but I can no longer send commands or receive data.
I also tried to put my prototype on the breadboard back in, but that doesn’t work either.
So it’s not the custom PCB, but the Roomba serial port that is broken.
I think the only way to resolve this is to repair the motherboard of the Roomba, or get a used one from a donor Roomba.
If anyone has any tips or advice, I’d like to hear it.
Furthermore, I added the schema and gerber files to my repo.
Check out the schema and gerber folders.
I am a noob… but I’d try with an oscilloscope (no experience though).
Or leveraging another UART - like the raspi one - in order to check if the serial still works.
Which model Roomba is that?
I never knew there were Roomba models with the serial port over on the top left .
(Seen from the top).
My serial port is on the right of the clean button.
Anyway…
Looks good! Well done.
Which voltage regulator did you choose eventually?
I’ve merged both UART support and some black magic from good old johnboiles’ repo to avoid BRC pin issues on Roomba 650 (in order to prevent this model to fall into a deep sleep that can be interrupted only manually pressing the CLEAN button or with an ugly relay).
So far so good: after two weeks no issues.
I also would like to understand how to use the buttons. Can you explain to me how the commands are supposed to work? I see the code, but I don’t understand how to use it
passing the command name to the service. i.e. the following example is for using the paper-buttons widget (please note I renamed the roomba component to vacuum here so the service name became esphome.vacuum_command)
I’ve experimented a bit and seen that this way - passing true to the 4th param just added - the controller actually prevents the Roomba to fall asleep, so the CLEAN button light is always on, the serial port active and all registers available. I must admit I’ve not tested it yet passing false as I was interested in the logic to prevent the deep sleep.
Probably this is not the best solution, though I’ve noticed no performance nor battery degradation so far (only 2 weeks testing as of now).
The original code comes from johnboiles repo, and for my vacuum it works, provided that the Roomba is awake at ESP boot time or you wake it up manually in order to let the ESP take control and prevent the deep sleep.
I must say most of the time my Roomba is on the dock - so I should test it more exhaustively - but at least the gathered data is consistent and it always reacts to commands.
When the Roomba is on the dock, the CLEAN button light is always on, and the serial port is active
I don’t see the same once the Roomba IS NOT on the dock, the CLEAN button light is off, and the serial port goes passive (I guess)
@davidecavestro , do you think that I can remove the wakeup and wake-on-dock buttons? I think that if the Roomba is in deep sleep, they don’t work at all. correct?
If you want to configure the icon directly in the esp
I’ve not seen it in deep sleep so far with lazy650Enabled = true, as the brc_wakeup keeps it awake. OTOH I expect that if/when it reaches a deep sleep the only way to wake it up is pressing the physical buttons or with a relay under them, given that I consider deep sleep a machine state which completely turns off the serial port (including the BRC pin).