United Kingdom
Asked — Edited

Irobot 530 Quick Advice

Hi guys.

I am currently looking at a Roomba IRobot 530 on a popular auction site I want to get. I don't wish to appear rude but I need some quick advice before I place a bid, as the clock is ticking. eek

Does the 530 have a comms port to connect the EZ-B4?

Is the 530 compatible with the EZ-B4?

I've never had a robot vac so it's all new to me. I know DJ does reference the iRobot but there's no mention on models.

Cheers.:)

User-inserted image


ARC Pro

Upgrade to ARC Pro

Subscribe to ARC Pro, and your robot will become a canvas for your imagination, limited only by your creativity.

#73  

@Steve... just tested my script below and it works fine on my Roomba 530


REPEATUNTIL(1=2)
    uartWrite(0,1,142,45) # Read Roomba IR sensors single byte
    sleep(10)
    
    uartWrite(0,1,142,7) # Roomba Bump and wheel drop sensor single byte
    sleep(10)
    
    uartWrite(0,1,142,58) # Stasis (Rommba moving forward) single byte
    sleep(10)
    
    $x = UartAvailable(0, 1)
    IF ($x>2)
      
      # print("Bytes in buffer: " + $x) checks how many bytes are in the buffer
      
      $RX_DATA = UARTRead(0, 1, $x) #places all the bytes RX into $RX_DATA
      # read 3 data bytes
      $RX_0=GetByteAt($RX_DATA,0)
      $RX_1=GetByteAt($RX_DATA,1)
      $RX_2=GetByteAt($RX_DATA,2)
    ENDIF 
    IF ($RX_0!=0 or $RX_1!=0)
      uartWrite(0,1,137,0,0,0,0) #stop Roomba
     # or whatever you want the Roomba to do when seeing or bumping an object
    ENDIF 
      
      
    print($RX_0+" IR light object detected")
    print($RX_1+" bump detected")
    print($RX_2+" Is moving forward")
    
    sleep(250)
  ENDREPEATUNTIL

and this works as well


REPEATUNTIL(IsConnected(0)=0)

  uartinit(0, 1, 115200) #have to have this to clear the buffer
  sleep(1000)
  $RX_DATA=0
  uartWrite(0,1,142,22) # Volatge check
  sleep(50)
  $rx = UartAvailable(0, 1)
  
  
  IF ($rx=2)
    $RX_DATA = UARTRead(0, 1, $rx)
    $MSB=GetByteAt($RX_DATA,0)
    $LSB=GetByteAt($RX_DATA,1)
    $voltage=($LSB+(256*$MSB))/1000
    # $voltage=$LSB+(256*$MSB)
    
    print($voltage)
  ENDIF 

  IF ($voltage<13.9)
    uartWrite(0,1,143)
    print("Low battery, attempting to dock")
    halt()
  ENDIF 
    sleep(9000)  
ENDREPEATUNTIL

#74  

@Steve Are you in passive, safe or full mode? I am using full mode with the above code, maybe that makes a difference...

uartWrite(0, 1,128,132) # Places Roomba in full mode

United Kingdom
#75  

@Richard.

When I tried it yesterday it was in full mode. When it hit the wall the motors stopped fine but it did hit the wall with a bit of a thud, where as on a normal cleaning cycle it would detect the same wall and slow down bumping it softly.

Same thing with the cliff sensors. It was in full mode and ran the sensor script, put it on a work bench but didn't detect when it fell off (I was waiting to catch it) and the motors were still running so had to hit the stop button on the movement control. That's why I thought the running IR sensor script included the cliff sensor too. The battery check script is golden and works well.

I'll give the revised script a try and report back.

Cheers.

#76  

You could try it in safe mode if you want, but I think the Roomba will take over control of the sensors as opposed to my scripts....... So my script basically only reads the bump, stasis and light IR bump sensors. That's kind of it... It would be up to the user to do whatever with the data received back.... For instance if bump sensor returns a 3 it means the Roomba hit something in the middle of the physical bumper.... In full mode you would have complete control. It would be up to your programming to read the sensors and keep it from getting stuck, banging into things hard and or falling down the stairs...

Place your Roomba on the table (it shouldn't move because my script doesn't have a drive command in it) or somewhere you can read your pc and press the roombas physical bumpers and or hold objects in front of the light bumpers at the same time. Run the script in post #75... Now use your hand and press the roomba's bumpers... you should see numbers from 0 - 3 in the print window depending on where you press on the bumper...

United Kingdom
#77  

@Richard.

Thanks again buddy. I'll give that a try later on today. Just went to try it but the thing wouldn't move and the red light came on. Turned out that even though it was on the dock all night, it didn't charge. Got a quick pulsing orange now so it's going to be a few hours before I can try it.

Thanks again for your help (and your patience). It's really appreciated.:)

#78  

No worries Steve, keep us posted... We'll get this working for you... Quick pulsing charge light indicates your Roomba is attempting to recondition your battery... Could take up to 16 hours to complete...

United Kingdom
#79  

Quote:

Safe Mode When you send a Safe command to the OI, Roomba enters into Safe mode. Safe mode gives you full control of Roomba, with the exception of the following safety-related conditions: Detection of a cliff while moving forward (or moving backward with a small turning radius, less than one robot radius). Detection of a wheel drop (on any wheel). Charger plugged in and powered. Should one of the above safety-related conditions occur while the OI is in Safe mode, Roomba stops all motors and reverts to the Passive mode. If no commands are sent to the OI when in Safe mode, Roomba waits with all motors and LEDs off and does not respond to button presses or other sensor input. Note that charging terminates when you enter Safe Mode.

So please correct me if I'm wrong, but if I have the Roomba in "Safe mode" I have full manual control of the motors, but cannot manually control the sensors which I take to mean that all the sensors, bump, light touch, cliff ect will all be on, and when it detects when it's going to hit a wall or fall down the stairs the sensors take over and over rides manual control. So what I need to do is write a "Safe mode" init script to run the Roomba via a Movement Panel ect with all the sensors automatically set to "On". Is that right?

#80  

In safe mode, the Roomba won't hurt itself and will navigate around safely like it usually does... I think you can still read the sensors via scripts in safe mode... However, say you want the Roomba to back up if it hits something in the centre bumper, but the Roomba's safe mode programming wants it to turn left... There would be a conflict and whoever issues the last command (you or the Roombas OI) would win control and override the previous "do this" command....

In full mode (which I usually use)... You have to do all the thinking for the Roomba... If it senses a cliff and you don't tell it to stop, backup or turn, well the poor little guy is going to commit suicide by attempting to drive down the stairs...:D