Asked — Edited

Irobot Create Movement Panel Firmware Update! :(

Alright so, before I updated the firmware I was able to move my Irobot wirelessly via EZ-b. This older version had an option for ports and now it is gone. I used to use D-8 and now it looks like its preset on D-0. Im stuck and so is my robot! Please help ASAP. This is a senior project.. eek

I tried moving my servo cable to D-0 but I had to kind of jam it in.


ARC Pro

Upgrade to ARC Pro

With Synthiam ARC Pro, you're not just programming a robot; you're shaping the future of automation, one innovative idea at a time.

#9  

Hello Richard,

I have already shared my adventure bot project and replied to other posts so I have already contributed. Certainly not as much as yourself and others but again have only been with ez-robot a short time. Again will share roomba project as it progresses in the future. Maybe I will start another thread to try and get an answere as to why the uart ports 1 and 2 have an issue with 115kbaud. Right now I am using port D5 at 115 kbaud and it works fine where as port D0 doesn't. It seems of all the ports available that the uart ports 0,1 and 2 should work at 115 kbaud. It all stems from DJ's statement above regarding ports and processes. Just want to understand what he means by this better? Thanks again and thanks for the help you have provided..Rick

#10  

I wouldn't open another thread if I were you.... Tomorrow I will try to control my Create 2 using D0 and UART port 1 and 2 (since UART 0 obviously works fine)... I will let you know....

Are you using UART port 1 ( which is D5/D6 with UARTWrite) or SendSerial command on D5?... There is a distinction here...

#11  

Hello Richard,

Thanks much and I appreciate your efforts ! I will get that information and get back with you very soon (within a couple of hours). I created a little mobile app and used the direction buttons for movement and added a script to each of the four directions. Also added buttons to init robot and to go into docking mode, etc. I will check which method I am using to send serial data and get right back to you.

I mentioned also in a previous post above, that there is a pesky issue with the roombas and create robots in that they go to sleep after @ 5 minutes of inactivity. When it is in sleep or off mode the only way you can get it back into OI Mode is to depress power (clean) button and issue (128). In the full mode (132) the robot never sleeps but you can't recharge the battery on the docking station. I have seen where some have used pulsing on the BRC line of the robot every so many minutes but this is messy and doesn't work reliably. I have done some testing and I have come up with a solution that I think will be very reliable. Will use small relay contacts across the power (clean) button and control the relay with a digital output on ez-bv4 controller. I will have to modify the create 2 but that is the fun of it all. Maybe. Again, normally the sleep or stop issue wouldn't be a problem so much but in my application the robot will be operated while I am away from home remotely for periods of time and need a reliable way to deal with the pesky sleep issue. I have come up with what I think is a good hardware/ command structure that will resolve this issue. Would be interested to hear if you have experienced these sleep/stop issues and what you think of my solution?

I will get back with you very soon and again Richard thanks for your help ! Rick

#12  

Richard,

I first init using (uartInit (0,1,115200), then I sleep for 500ms then use (uartWrite (0,1,137,0,100,128,0). This is for the forward command. This seems to work but again have to deal with the sleep issue when not in full mode (132). I use uartWrite to send serial data. Have not tried to get data back from robot on D6 yet.

In the future would still like to try and dig into the roomba Movement Panel in ARC to try and customize it for my needs as an educational exercise. Would I be correct in assuming that I would need the free version of microsoft visual studio and some knowledge of c#? I have some knowledge of c# but it has been a looong time ago. This way I might be able to modify the roomba Movement Panel that maybe could be incorporated into ARC?

Thanks again for your help and quick responses ! Rick

#13  

Ok, so I did some tests and here is what I found.... all the UART ports work perfectly with the Create 2 (I have a Create 1 white version too but have not tested it). However using the SendSerial command (@115200) on ports D0 and D5 gave me issues.... Sometimes the Create would move, sometimes it wouldn't... I usually use the UART ports so this is not really an issue for me.... Saying that I have not tried the sendserial command at 57600 baud with my Create 1 yet....

I find if the create won't charge when issuing a docking command, sending it a reset command (uartWrite(0,0,128,7) after it docks which seems to start the charging cycle...

This is all I got for now... I actually prefer using the old Create 1 because of the better IO interface... For instance you have more access to the wheel encoders. Meaning you can make precise 90 and 180 deg turns or move a certain distance with just commands. Secondly using pin #3 on the 25pin bay port of the Create you can at will (by toggling it high/low) wake up and put the create to sleep.... There are a few more reasons but those 2 are the main reasons I really prefer the old Create model to the new Create 2.... Saying that however, the Create 2 has a much better docking routine.... The Create 1 struggles sometimes to dock properly...

#14  

Hello Richard,

Thanks for all your testing and help ! Am I good to go using uartWrite instead of sendSerial? I would assume so? Also, I modified the Create 2 last night and very carefully soldered a couple of wires to the power switch (clean) and brought the out nicely through the top of the robot. Had to take the create 2 apart but was pretty easy. Brought wires out through one of the screw holes that I left out.

Have you managed to input the data packets and access the various sensor data, etc. With ez-robot scripts. If so it would be helpful to see how you did that. I used the cable that came with create 2 and Realterm on my laptop to try and read the data with no luck. It looks like the command to get the data is (142) but not sure how to read it from ARC script? Any ideas would be helpful.

Thanks again for all your help ! Rick

#15  

I have been able to get at a few sensors, not all at the moment... Below is what I have done. It is specific to my project but I am sure you can adapt it for your use if you wanted to. It's not complete so it probably needs some tweaking...

Bump and IR sensors


$speed=100
:top
  uartWrite(0,0,137,0,$speed,0,0) #forward movement
  repeatuntil(0)

    uartWrite(0,0,142,45) # Read Roomba IR sensors single byte
    sleep(10)

    uartWrite(0,0,142,7) # Roomba Bump and wheel drop sensor single byte
    sleep(10)

    uartWrite(0,0,142,58) # Stasis (Is Rommba moving forward) single byte
    sleep(10)

    $rx = UartAvailable(0, 0)
    if ($rx>2)

      # print("Bytes in buffer: " + $rx) checks how many bytes are in the buffer

      $RX_DATAd = UARTRead(0, 0, 3) #places all the bytes RX into $RX_DATA
      # read 3 data bytes
      $RX_0d=GetByteAt($RX_DATAd,0)
      $RX_1d=GetByteAt($RX_DATAd,1)
      $RX_2d=GetByteAt($RX_DATAd,2)
    endif


    if ($RX_0d!=0 or  $RX_1d!=0)
      if ($RX_0d>12 or $RX_1d=1) #ir and bump sensors
        uartWrite(0,0,137,0,$speed,0,1) #turn left
        sleepRandom(1000,3000)
        goto(top)
      ELSEif ($RX_0d<12 or $RX_1d=2 )
        uartWrite(0,0,137,0,$speed,255,255) #turn right
        sleepRandom(1000,3000)
        goto(top)
      ELSE
        uartWrite(0,0,137,255,125,0,0) #reverse
        sleepRandom(1000,2000)
        uartWrite(0,0,137,0,$speed,255,255) #turn right
        sleepRandom(1000,3000)
        goto(top)
      endif

      print($RX_0d+" IR light object detected")
      print($RX_1d+" bump detected")
      if ($RX_1d>0)
        # uartWrite(0,0,137,0,0,0,0) #stop roomba

        # halt()
      endif
    endif


    print($RX_0d+" IR light object detected")
    print($RX_1d+" bump detected")
    print($RX_2d+" Roomba is moving forward")
   # uartinit(0, 0, 115200) #have to have this to clear the buffer
    sleep(100)
  ENDrepeatuntil

Voltage and charge state


$volt_check=1
$voltage=0
uartinit(0, 0, 115200) #may or may not need
sleep(500)
$dock_flag=0
repeatuntil(IsConnected(0)=0)

  $RX_DATA=0
  uartWrite(0,0,142,22) # Volatge check
  sleep(100)
  uartWrite(0,0,142,21) # charge state
  sleep(50)
  uartWrite(0,0,142,34) # charge source available
  sleep(50)
  $rx = UartAvailable(0, 0)


  if ($rx=4)
    $RX_DATA = UARTRead(0, 0, $rx)
    $MSB=GetByteAt($RX_DATA,0)
    $LSB=GetByteAt($RX_DATA,1)
    $Charge=GetByteAt($RX_DATA,2)
    $Charge_source=GetByteAt($RX_DATA,3)
    $voltage=Round(($LSB+(256*$MSB))/1000,2)

    Print("Battery Voltage is: "+$voltage+"V")

    $R_batt=abs(17.5-$voltage)
    if ($R_batt<1)
      $R_batt=1
    endif
    $R_batt=100/$R_batt
    $R_batt=Round($R_batt,0)
    print("Charge level = "+$R_batt+"%")


    if ($Charge_source = 0)
      print("Not Docked")
    ELSE
      print("Docked")
    endif
    if ($charge=0)
      $dock_flag=0
      print("Not charging")
    ELSEif ($Charge=1)
      $dock_flag=1
      print("Recondioning charging")
    ELSEif ($Charge=2)
      $dock_flag=1
      print("Fast charging")
    ELSEif ($Charge=3)
      $dock_flag=1
      print("Trickle charging")
    ELSEif ($Charge=4)
      # $dock_flag=0
      print("Waiting to charge")
    ELSEif ($Charge=5)
      print("Error not charging/Fault")
      halt()
    endif

  endif

#16  

Thanks much Richard, that helps alot !? Rick