Shop OBEX P1 Docs P2 Docs Learn Events
BOE-Bot Digital Encoder Question? — Parallax Forums

BOE-Bot Digital Encoder Question?

wshipleywshipley Posts: 2
edited 2009-11-03 17:25 in Accessories
First Question:· Can I use the BOE-Bot Digital Encoder to automaticly adjust my servos to keep my BOE-Bot driving in a straight line?

Second Question:· Does anyone have any guidance on how to do this, I have read most of the documentation on this site, and still don't know how to accomplist this.· You see the servos that came with my BOE-Bot are serverly mis-matched.

Thanks

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-30 06:10
    1) Sort of. The encoders help, but they're not perfect. Remember that the wheels themselves can slip on the floor and the encoders won't catch that.

    2) Have you looked at the "Downloads & Resources" part of the webpage for the wheel encoders? There's a quite involved discussion on using the encoders to correct for wheel motion and some sample code as well.

    Servos have quite a bit of variation in manufacturing from manufacturer to manufacturer, model to model, and servo to servo within the same model. The control pulse width is used to set the servo speed (and direction) and it's expected that you might need to use a different pulse width (PULSOUT) for each servo to get approximately the same speed. You can calibrate them by writing a simple program to make the BoeBot move forward, then adjusting the PULSOUT values to get the BoeBot to move in a straight line, at least for some reasonable distance (a few feet).
  • wshipleywshipley Posts: 2
    edited 2009-10-30 07:40
    Thanks for the quick reply, I will try looking through the documentation again, now I just need to figure out ramping, with the unbalanced servos, but I will ask that in another thread.
    Thanks.
  • C-BobC-Bob Posts: 19
    edited 2009-10-30 19:28
    1. maybe yes.
    idea: boe bot have calibration routine, in calibration mode send some pulse to servo and measure distance betwen pulses from encoder, try it with variable pulse lenght - finding zaro and max speed, try it for both wheel, (calculated value store to flash and use in normal mode).

    Output from this is also useable for ramping.

    Sliping on the flor is standart random variable smile.gif you can minimalize this by ramping (start and stop slowly).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    C-Bob

    Every problem·have at least one·nice, simply and·wrong solution.
  • ercoerco Posts: 20,256
    edited 2009-11-03 17:25
    http://forums.parallax.com/showthread.php?p=772850

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
Sign In or Register to comment.