Shop OBEX P1 Docs P2 Docs Learn Events
HB25 & Position Encoder question — Parallax Forums

HB25 & Position Encoder question

DiverBobDiverBob Posts: 1,116
edited 2012-06-19 15:14 in Propeller 1
I was running a simple program to just run a gear head motor for 100 steps and it works just fine most of the time. It ramps up and then ramps back down as expected. The problem is that sometimes when the motor ramps down it then oscillates back and forth rapidly. Has anyone else run into this type of problem? It happens enough that it makes the movement unreliable and I haven't been able to come up with a solution so far.

Bob

Comments

  • kwinnkwinn Posts: 8,697
    edited 2011-10-30 19:23
    Two possibilities spring to mind. First there may not be enough torque for the motor to overcome friction and complete the step, second the steps are coming too fast.
  • DiverBobDiverBob Posts: 1,116
    edited 2011-11-02 14:39
    The motor is a fairly substantial motor, no issues with friction. It's running on 12v from a charged battery. The system ramps up and runs correctly and then ramps down. It's just as its ready to come to a stop that it then reverses, spins a small amount and then reverses again it continues this until power is removed.
    I'm going to try adjusting the positioning of the encoder closer to the encoder wheel and see if that makes a difference.

    Bob
  • W9GFOW9GFO Posts: 4,010
    edited 2011-11-02 16:55
    I had this problem with my wheelchair based robot. My wheels' mass is substantially greater than the wheels used on the MadeUSA robot which the controller was designed around. The PID values hard coded into the firmware do not work well with my wheels. The solution is to use the position encoders for tracking the position only - not controlling the HB-25s.
  • DiverBobDiverBob Posts: 1,116
    edited 2011-11-03 16:21
    Thanks for the info, I want to Try few other ideas out before I give up on this, I see you can adjust the ramp speed, maybe going to a slower ramp will help
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2011-11-04 09:06
    In case you haven't seen it, the source code for the position controllers is available near the bottom of the product page for them:

    http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/position/List/0/SortField/4/ProductID/665/Default.aspx

    It should show what all the initial hard coded values are.

    Robert
  • DiverBobDiverBob Posts: 1,116
    edited 2011-11-06 10:00
    I removed the encoder from its mounting location and by just holding it in position it works great. It stops with no hunting each time. But if I try to hold it in the same area where I mounted it then I get the hunting again? I have tried several positions and orientations that work so long as I hold it, mounting the encoder doesn't want to work. Now I'm really confused...
    I'm taking a break and will give it another shot later, maybe I'll see something I haven't thought of before.
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2011-11-06 13:54
    Is it just one wheel with the problem? If so can you swap the position controllers from side to side to see if the issue appears on the other motor? Maybe you have a bad controller.

    Robert
  • DiverBobDiverBob Posts: 1,116
    edited 2011-11-07 09:26
    This setup uses a Pittman gearmotor that is coupled to a ball screw to make a linear actuator, no wheels involved! I only run at full speed (no speed control really needed, the faster the better). I'm going to do some more experimenting today and see if I can figure out what is going on. I just got a second encoder in the mail so I'll try swapping it in and see how that works.
  • VovikVovik Posts: 4
    edited 2012-06-17 20:44
    Hi DiverBob, did you resolved the problem?
    I have experienced same and it is really frustrating... I have two Morot Mount and Wheel with position controller. One wheel works fine (sending serial signal from arduino) but the other one just run full speed for a few seconds and then start jerk back and forth...
    Please share a solution if you have found a one?
  • DiverBobDiverBob Posts: 1,116
    edited 2012-06-19 15:14
    I was never able to figure out a solution so I ended up going a completely different route instead. I'd still like to know what the problem is but haven't had the time to figure it out. In the meantime I have 2 perfectly good encoders sitting on the shelf...
Sign In or Register to comment.