Shop OBEX P1 Docs P2 Docs Learn Events
If two CR servos shared the same pot — Parallax Forums

If two CR servos shared the same pot

xanaduxanadu Posts: 3,347
edited 2014-05-04 12:11 in Robotics
What if we used a connector between two CR servos to a single pot instead of individual pots? Better accuracy?

I only have one CR servo, if nobody posts I'll get another and try it out.

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-05-01 21:54
    xanadu wrote: »
    What if we used a connector between two CR servos to a single pot instead of individual pots? Better accuracy?

    I only have one CR servo, if nobody posts I'll get another and try it out.


    I don't really see what the pot has to do with accuracy in a CR servo? You just use the pot to calibrate the stop pulse. The speed variations, caused by gearbox and motor, between various CR servos would still be there even if you had some way of sharing a pot that didn't cause the servo problems.

    I'd think it's possible that a shared pot might not be able to calibrate both servos with a single setting and one or the other servo might drift a bit.
  • ercoerco Posts: 20,255
    edited 2014-05-01 21:54
    Not much to be gained is my guess. Adjusting an analog servo's internal pot to null at 1.5 ms pulses is a bit arbitrary, just a standardized way to account for internal component tolerances. Two servos will likely require two slightly different pot settings to null them. So assuming that the servos' electronics can electrically handle the common pot connection, the two servos may or may not be in sync or nulled at any given pulsewidth. But it's nothing that couldn't be handled in software to null. Maybe one servo requires a BS2 PULSOUT x,750 to null, and the other might null at PULSOUT y,761.

    Edit: Birthday boy Duane types faster than I do. :)
  • xanaduxanadu Posts: 3,347
    edited 2014-05-01 23:43
    True, no two motors are created equal. I guess encoders will solve the issue, however I've always wondered about two CR servos sharing a single pot. Time to try it I guess.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2014-05-02 07:55
    On a CR servo the potentiometer corrects for drift in the other internal analog components. The drift naturally differs between units, but also temperature and other factors. The setting of the pot or the inherent drift in a servo isn't generally enough to greatly affect resolution accuracy, since after warming up and calibration any further drift is under the dead band of the servo.

    The only way to improve accuracy of open loop motors is to make them closed loop.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2014-05-02 09:16
    Just remember that on some servos when you remove power but continue to provide pulses the servo may parasitically draw power from the signal line. So definitely for these include that 330-ohm to 1K resistor in line to the servo signal pin.
  • ercoerco Posts: 20,255
    edited 2014-05-02 10:16
    Another fun fact about CR servos is that when you are sending them a 1.5 ms pulse string for no motion, there is dynamic braking going on. As compared to simply stopping sending pulses, when there is no braking and the servo coasts to a stop. You might not be able to tell the difference in a quick bench test, but when you have a robot in motion and you want to stop quickly versus coast to a stop, it is very visible.
  • xanaduxanadu Posts: 3,347
    edited 2014-05-02 19:46
    Okay yeah I didn't really think that one through before asking.

    Another thing I've always noticed is that centering a CR servo on 1500 will never get them exact. I know that exact is going to be nearly impossible to achieve, but I did start using a method that gets them closer than centering them on 1500.

    Each servo seems to have a different dead band in the pot when centered. For instance;

    Center a servo as best you can on 1500. The send it 1501 pulses and 1499 pulses. Then send it 1502 and 1498 pulses. At some point it will start to move, each servo is slightly different. Use the number for the step below that don't cause it to move at all.

    So you end up with a range of dead band for a specific servo, say for instance Servo 1 doesn't move between 1499 and 1503. That is a range of 4, to center that servo pulse it centering that amount above and below 1500 (ie 1498 and 1502). When you pulse 1498 and 1502 back and fourth you'll notice that the pot becomes a little more touchy, however when you're done it will be centered much better.

    Then do Servo 2. Some are a few ticks off from others, it helps close the gap a bit.

    I need two servos to display it in a video, I'll pickup another sometime and do it.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-05-02 20:11
    xanadu wrote: »
    Another thing I've always noticed is that centering a CR servo on 1500 will never get them exact.

    I'm not sure what you mean by this. I always send the CR servo an 1500us pulse and then adjust the pot until it stops dead. I often substitute a multi turn trim pot for the normal post since the trim pot is easier to "zero". I know this is also a favorite trick of erco's (but I'm sure I invented it first).
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2014-05-02 21:13
    What I do to stop the servo is to first send 1500 ms pulses for at least a single 20ms frame, usually a couple of frames worth. I then remove the pulses, which -- as Erco points out -- causes the servos to free-wheel. I really don't have problems with creep because of servo drift.

    For making the wheels turn the same you need encoders. They're now cheap and simple enough to implement there's really no reason not to use them if your robot application calls for it. Obviously, not all applications do; you don't need encoders for the typical line follower, for example, as the line provides the feedback loop.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-05-02 21:44
    For making the wheels turn the same you need encoders.

    You can even stick them inside the servo.

    attachment.php?attachmentid=105438&d=1386432536

    Though I admit, I'm not convinced it's worth the effort. The resolution isn't much better than the ActivityBot's encoders.

    Edit: I reviewed my notes. The ActivityBot's wheels with quadrature encoders (not the stock encoders) would give 128 transitions per rotation. The internal quadrature encoders give 378 transitions per rotation. Maybe they are worth the effort. I still need to add them to a robot. I also need to write the code so they can be stopped at a given position so they're both CR and can sort of act like a normal servo.
  • xanaduxanadu Posts: 3,347
    edited 2014-05-03 13:46
    Duane Degn wrote: »
    I'm not sure what you mean by this. I always send the CR servo an 1500us pulse and then adjust the pot until it stops dead. I often substitute a multi turn trim pot for the normal post since the trim pot is easier to "zero". I know this is also a favorite trick of erco's (but I'm sure I invented it first).

    centerservo.jpg


    Blue = null zone
    Red = wiper

    Not sure I can type this without a video brb.
  • xanaduxanadu Posts: 3,347
    edited 2014-05-03 14:34
    Okay here's the Servo Super Center video -

    [video=youtube_share;gNsk7lqONZY]
  • xanaduxanadu Posts: 3,347
    edited 2014-05-03 14:39
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    '
    'Continuous Servo Super Centering
    '
    
    
    servo    CON 0           'servo connected to BS2 pin 0
    
    
    
    
              '746 - 751
    
    
    DO                        'loop 750 wide range
    
    
     PULSOUT servo, 747
     PAUSE 20
    
    
     PULSOUT servo, 753
     PAUSE 20
    
    
    LOOP
    
    
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-05-03 19:30
    xanadu wrote: »
    Okay here's the Servo Super Center video -

    Okay, I understand what you mean.

    With a multi turn trim pot, I kind of gauge how far I have to turn to pass through the dead band and then try to turn the trim pot to the center of the dead band. I'll need to try your method. Thanks for explaining it.
  • ercoerco Posts: 20,255
    edited 2014-05-04 07:40
    OT: @Xanadu, were you flying a quadrotor at Carlsbad beach ~12:30 yesterday? Somebody was as our club biked past.
  • xanaduxanadu Posts: 3,347
    edited 2014-05-04 12:08
    Duane Degn wrote: »
    Okay, I understand what you mean.

    With a multi turn trim pot, I kind of gauge how far I have to turn to pass through the dead band and then try to turn the trim pot to the center of the dead band. I'll need to try your method. Thanks for explaining it.

    I'm glad that made more sense, I just watched it and I said the wrong thing a few times haha, I gotta stop working the night shifts!
  • xanaduxanadu Posts: 3,347
    edited 2014-05-04 12:11
    erco wrote: »
    OT: @Xanadu, were you flying a quadrotor at Carlsbad beach ~12:30 yesterday? Somebody was as our club biked past.

    That's a heck of a bike ride. I wish I were flying anything yesterday, all work an no play lately...
Sign In or Register to comment.