Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited
Resolved Resolved by DJ Sures!

Roomba 500 Locks Up Using Ezb4 With D0

Testing the Roomba 595 using the EZB4 connected to D0 does not work very well. Sometimes the selection boxes for turning on the side brush, brush motor or vacuum will not turn on the selected motor. Or the motor will run but cannot be toggled off. Other times the port seems to hang and then the Roomba will reset.

When using the UARTWrite commands with the Roomba connected to UART 0, all motor commands work correctly.

I suspect a signal level issue, possibly lower than 3.3vdc vs 5vdc Roomba ttl. when using the digital D0 port.

Would it be possible to change the EZ-B GUI Roomba control from using D0 to UART0 ?


Upgrade to ARC Pro

Synthiam ARC Pro is a cool new tool that will help unleash your creativity with programming robots in just seconds!

AI Support Bot
Related Content
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
Hey Doc have you tried using UART 1 (D5) or 2 (D18)? The V4 daIa sheet states the UART TTL signal level is 3.3v as well... i am going to test the v4 on my Create this morning and see how it goes.
So basic controls on the Create work from D0 as expected ... That would be basic driving etc....Since the Create isn't a vacuum I can't test the other controls like side brush, main brush etc...
Ok, so I was also able to send driving commands to my Create using UART 1... I was able to call "Cover and Dock" routine no problem... So I went a step further and used a modified version of DJ's UART example code to query the Create's battery temp... I chose it as it only requires a simple single byte return (in Deg C)... It was a no go, however... I couldn't get anything sent back from the Create... Below is my code...


# Using UART port 1 TX on D5 RX on D6
uartinit(0, 1, 57600)
uartWrite(0, 1,128,132) #Init iRobot create and place in full mode
uartWrite(0, 1,142,24) #Roomba Battery temp in DegC... single byte from -128 - 128

$x = UartAvailable(0, 1)

print("Bytes in buffer: " + $x)

$y = UARTRead(0, 1, $x)

print("Received: " + $y)
For some reason the R2 model Roombas (includes Dirt Dog, and Create) seem to work without issue using the EZB4 in conjunction with the pre-defined controls that use the Digital port D0. However I tested using several of the R3 Roomba models, 510, 535, 560, and now a brand new 595 and they all exhibit the same results of not responding correctly to button selections using the "Roomba movement" choice.
R3s use 115600 baud, whereas the R2 use 57600, correct?
The R2 model Roombas use 57,600 baud and the R3 Roomba use 115,200 baud as the default start-up baud rate.
I may have found a solution to the possible difference in the serial signal voltage levels between the Digital port on the EZB4 and the TTL levels within the R3 Roomba. I've ordered a couple of these Logic Level Converters from Sparkfun.com and will do further testing when the hardware arrives.

User-inserted image
That's awesome Doc, let us know how you get on...I am going to keep trying to figure out how to read packet data using the UART...
Got the Sparkfun logic level units in and wired one up to the EZB4 and a 500 R3 Roomba. Set up two power control boards to supply (High voltage +5) and (Low voltage +3.3) and wired them into the serial logic level board. Connected all grounds together including the ground connection of the EZB4 D0 port. The logic board had the +5vdc connected to the Roomba Rx lead and 3.3vdc connected to the EZV4 D0 signal lead (white). Powered up everything, established a WiFi connection, loaded Roomba control panel GUI, powered up the Roomba, sent the Init command to the Roomba, the Clean LED went dark (good sign) and then begin selecting the individual motor activation choices. It appears that the issue has improved but the Roomba still has some response timing issues. If the side motor is turned on and then immediately de-selected, the motor keeps running. Then if the vacuum motor is selected it will start up and if then de-selected both motors will stop. If the brush motor is selected it turns on and off correctly and then all motors can be turned on and off without issue as long as there is about a 5 second delay between commands.

The drive commands never worked in earlier tests without the logic level board and now seem to almost work correctly. Forward button will run the Roomba forward but sometimes the Stop button will not work. If additional time of waiting about 5 seconds is done between commands then the drive controls seem to control the Roomba.

Final testing will resume tomorrow after double-checking the wiring just to make sure and then a final field test (Roomba actually running on the floor) will be attempted.
you should not need a level shifter. Many 3.3v devices (including arduino) will work the iRobot products. The TTL requires anything above around 1v to be considered HIGH.

According to your tests of receiving data, it is sending back code.

I saw somewhere that someone said they received the letter Q. Well, the iRobot Roomba does not return a string of bytes to create an ascii human readable value - instead it (like most all ttl protocols) returns a single byte. That single byte value looks like the letter Q,

You want to use this function to turn the byte into a readable ASCII string..


GetByte( value )
Returns the ASCII Ordinal value of a byte or byte array.
Technically, this function returns a number and not specifically a byte.
The number of bytes in the variable will determine the size of the integer returned. If one byte is passed, an 8 bit number is returned. If two bytes are passed, a 16 bit number is returned. If 4 bytes are passed, a 32 bit number is returned. If 6 bytes are passed, a 64 bit number is returned.
If the variable contains 0x37, this function will return an integer value of 53. Use this function to convert data read by i2c into ordinal values.
Example: $value = GetByte("H")
Example: $value = GetByte($x)

As for the "locking up" - i do not have any suggestions other than to check your wiring.
Thanks for the response DJ, Richard R. is the poster discussing using a UART port for two way serial communications and attempting to read a single byte returned.

I'm attempting to get an R3 Roomba, 5XX model to operate using the D0 port and the EZ-B Roomba movement GUI. This setup without the level shifter works great when connected to an R2 Roomba (Discovery, Dirt Dog, Create, 4XXX)

The issue only seems to effect the R3 models. I've tested using a 500, 700, and 800 model Roomba. None of them will operate like the earlier R2 models.
Getbyte... thanks DJ, will give it a try later....
Ok DJ, your tip worked... I can read a single byte returned from the Roomba... Believe it or not, I was looking for something (like GetByte) to convert the information received from the Roomba, but I didn't know exactly what I was looking for so I never found it.. I looked through the GetByte commands, but still unsure how to use it to read 2 bytes... (High byte and Low byte)...
Going to close this thread even though I have not been able to run an R3 Roomba without using a level shifter when using the EZB4.
Level shifting not needed on the R2 Roomba