Shop OBEX P1 Docs P2 Docs Learn Events
Arlo drifts one way... — Parallax Forums

Arlo drifts one way...

Hello,
So I have the Eddie/Arlo robot base with the HB25 and the aluminum drive motors set. First off, Id like to know which sode of the base is really considered the front?
I have the power distribution panel mounted also and its mounted to what I consider the rear of the platform. When I tell the robot to move forward, I've noticed that it tends to drift to the left more. Yet when it goes in reverse, it does seem to be going straighter. I'm using EZrobot as my controller, and have tryed to program different speeds to see if that would help but no luck. Also I not using the built in encoders at this time.
Any thoughts here would be great.
Thanks :)

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2016-05-17 03:19
    Using the encoders would solve your problem. Without encoders, it's nearly impossible to balance the movements of two independent motors. With proper programming, the encoders will harness the motors together into a team.

    -Phil
  • The problem you are encountering is quite common when you are driving a platform with two motors without feedback. Providing identical PWM settings to two motors will almost always result in one motor running slightly faster than the other, hence the "drift". The PWM settings for each motor must be dynamically adjusted in order to maintain straight travel. By using the encoders the controller can determine which motor has to be adjusted. One method I have used is to monitor each encoder for how many transitions occur during a specified period and compare that to a set point I derived by trial and error. The difference between the set point and the number provided by the encoder function will allow the controller to adjust the PWM for each motor. For instance, I have a certain forward speed with a set point of 40 pulses per 30 milliseconds. Each encoder is monitored for 30 ms and the difference from the set point adjusts the PWM up or down individually for each motor.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2016-05-17 04:51
    My robot may not look like a conventional Arlo, but the wheel spacing is the same as the Arlo and it uses Arlo hardware including the HB25 motor controllers.

    Here's my robot performing a test 1 meter by 2 meter rectangle.



    I thought the robot did pretty well considering it was driving on carpet.

    I haven't used an EZrobot controller but if the controller can issue serial commands, you could use a Propeller Activity Board to act as a bridge between the EZrobot controller and the motors/encoders.

    For example, to drive in a 2 meter by 1 meter rectangle, the EZrobot controller would issue the following commands:
    DECIN 1
    MM 2000 50
    TURN -90 50
    MM 1000 50
    TURN -90 50
    MM 2000 50
    TURN -90 50
    MM 1000 50

    Each line needs to end with a carriage return.
    The command "DECIN 1" tells the firmware to expect numbers in decimal format rather than hexadecimal (the default interface uses hexadecimal but it's easier for me to think in decimal).
    The command "MM 2000 50" tells the robot to travel 2000mm at a speed of 50% speed. The command "TURN -90 50" tells the robot to turn 90 degrees to the left at 50% speed.

    The EZrobot controller may have a way to monitor the encoders directly but I don't know enough about the system to know how one does this (if it's possible).

    Here's a link to a thread about the Arlo/Eddie firmware.

    There's firmware for both the original Eddie control board and the Propeller Activity Board. While these are the only two Propeller boards supported by the firmware, just about any Propeller board could be used with the Arlo hardware you're using. Do you have a Propeller board? If so I could help convert the firmware for use with whichever board you have.
  • ercoerco Posts: 20,256
    Another awesome demo, Duane. I know just how much up front work it takes to get a demo that nice!
  • ercoerco Posts: 20,256
    Throwback Tuesday: My homebuilt plywood robot (Arlo sized) from 2010 had good consistency even before I added encoders. First video was my first demo. It went on to become "Retrobot" (second video) with encoders. The BS2 controlled relays for "speed control", which was nothing but switching the motor from 12 to 18 volts using two gel cells aboard.



  • I've often thought about your cool Retrobot. I really like the way you could record you inputs for later playback.

    Since it's "Throwback Tuesday", I'll post my input recording attempt.



    Since the PropBOE had a SD card slot, I had lots of room to record the inputs from the remote at a full 50Hz. I was pleasantly surprised how well the technique worked.

    My path recording bot was directly inspired by Retrobot's path recording ability.
  • Hello guys,
    Thanks for the insight, well appreciated. I might look into getting a DE Sabertooth and Kangeroo Controller to use for motor control and encoding instead.
    Also, still curious, which side of the Arlo is really front or back? :)
  • Stampy wrote:
    Also, still curious, which side of the Arlo is really front or back?
    There are casters on both ends, so it doesn't much matter. Think of it in ferry boat terms: fore is the leading end during whichever way you decide to move forward, aft is the other end. You're in charge, Captain!

    -Phil
  • Stampy wrote: »
    I might look into getting a DE Sabertooth and Kangeroo Controller to use for motor control and encoding instead.

    I don't know enough about those controllers to know how well they work but as I mentioned earlier just about any Propeller board could be used to read the encoders and control the motors using the HB-25 controllers.

    Do you live in the US? If so, send me a PM with your address and I'll send you a Propeller board you could use as a controller.
    Stampy wrote: »
    Also, still curious, which side of the Arlo is really front or back? :)

    I don't think it really matters but I've always considered the motors long side to point toward the back of the robot.

    Here's another photo of my robot.

    attachment.php?attachmentid=111999&d=1416204358

    You can see how the cutouts to allow the motor to stick through the board are behind the axle.

    Here's a side view.

    attachment.php?attachmentid=112001&d=1416205066

    The front of the robot is pointing to the right of the photo. The right motor has a grey wire and the left motor has a black wire.
  • Oh, there aren't casters on both ends? In that case the caster is aft, methinks.

    -Phil
  • Duane DegnDuane Degn Posts: 10,588
    edited 2016-05-18 03:39
    Oh, there aren't casters on both ends? In that case the caster is aft, methinks.

    -Phil

    The normal Arlo has two casters. My robot only has one.

    I kept the distance between the wheels on my bot the same as the distance between the Arlo wheels so the navigation equations worked out the same.

    Here's my bot superimposed on the Arlo platform.

    attachment.php?attachmentid=112002&d=1416207007

    (Ignore the "Smartarm". I was just curious about spacing.)

    As you can see, my robot is smaller than the Arlo mainly because I kept the base in between the two wheels instead of having the wheels recessed.

    I was following the advice given by Dave Anderson

  • ercoerco Posts: 20,256
    edited 2016-05-18 04:31
    Amazing repeatability in that PropBoeRecord demo, Duane! No encoders, right? If so, that's still open loop and a testimony to your bot's consistency. I couldn't drive my car the same way twice over the same route half as well as your bot did!

    The servo pulse record/playback option reminds me of Makezine's TRS Drawbot project. Someday I'll build one.

    http://makezine.com/projects/trs-drawbot-2/

  • My Arlo does use the two casters. When I first got it I was using the Stamp BS2, and still like using it. But found then found out it cant process the encoders fast enough, and that was a few years ago. Since then I've moved on to Ez-Robot. Its an awesome platform, so no more stamps, and not a fan of ardinos,uno, or propeller. Ez-robot does interface with the Sabertooths and the HB25, which I use more.
    My next thing will be to see if Arlo will work well outdoors. I need an indoor/outdoor platform
    that can run slow inside and fast when outside.
    This is how I am using the Arlso for now....
  • Stampy,

    Your Cy robot is awesome, great use of the Arlo platform.

    Thank for sharing your video.

    Do you have a web page that explains more about Cy?
  • hey Zappman, Thank you. I do have a place that describes a little bit more about Cy, and I
    still have more info to add later on. If you visit Ez-robot.com and look up Cybot2.0 you will see a couple more short video links as well (my first videos ever too).
  • I read up on EZrobot and DE's Sabertooth a bit.

    It looks like EZrobot sends the Sabertooth commands in what they call "simple serial".

    This gives you 64 levels of speed in each direction.
    Stampy wrote: »
    not a fan of ardinos,uno, or propeller.

    You're not a fan of the Propeller but do you have one?

    If you have one, it could act as a speed control device to balance the speed of the two Arlo motors. It would use the pulses you normally send to the HB-25 as input and combine this with information from the encoders and then send a modified signal to the HB-25. The program would change the signal from a "power control" signal to a "speed control" signal. The Propeller would do all this automatically and wouldn't need input from your main controller other than the pulses you'd normally send directly to the HB-25 controllers.

    I've modified the Eddie firmware to use pulses as inputs. I haven't tested it yet but I'm sure I can get this sort of program to work. Let me know if you're interested in using the the program and I'll make some time to test what I've written and make sure it works as I expect it should.



  • No I dont have a propeller.Id prefer to avoid all things assembly, C, C# :-) I hate programming as it is,and its been some years now since Ive played with basic. I started liking the Ezb stuff more since its more of point and click( but there is some script writing still).
    While I would like the robot to move abit more straight, its not a show stopper for me. all the ultrasonic sensors and bumper switches are to help avoid most walls and such. Building CY has been a fun project, just something to do. Im more for the hardware side of building and am already planning my next project.
  • If you send me your address, I'll send you a programmed Propeller board which uses pulses you normally send to the HB-25 and the Arlo encoders as inputs.

    The output will be pulses to control the HB-25. The output pulses will be almost the same as the input pulses but the pulses will be modified to take into consideration the actual speed of the motors.

    A while ago someone gave me some of used Propeller boards. I'm like to send you one of these with the above mentioned program installed. It shouldn't change the way you interface with the motors.
Sign In or Register to comment.