distance measurement, dc motor vs stepper

Discussion in 'The Projects Forum' started by jcm2112, Jan 11, 2011.

  1. jcm2112

    Thread Starter New Member

    Jan 11, 2011
    6
    0
    Hi everyone,

    I'm building a small truck (controlled by a microcontroller) and I'd like to be able to measure the distance it travels. I'm wondering which choice of wheels below produces more accurate distance measurements and which is simpler to implement:

    1. DC motors (driven by an H-Bridge IC) with encoders to keep track of the number of revolutions
    2. Stepper motors so I can command the anglular displacement of each

    The truck should not need to move more than 10 cm/s and will weigh maybe 3-4 kg.

    Please let me know if I should provide more information. Thank you!
    jcm
     
  2. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Both systems have benefits, though the rotary encoder on the axle is a good solution no matter the motor type. Sometimes steppers will miss a step, especially when fast quarter stepping, and the encoder feedback keeps it going smoothly.

    Are you trying to measure a distance, or simply control speed? Ultrasonic or IR Rangefinders can give excellent distance measurements without needing to travel the entire distance.

    Just a thought.
     
  3. jcm2112

    Thread Starter New Member

    Jan 11, 2011
    6
    0
    Thank you for your reply thatoneguy,

    I considered measuring distance using IR (ultrasound is also a good idea) and will continue to think about it, but I may not always know in advance what kind of environment I will be in so a solution with the wheels seems more general.

    I will need to control both speed and measure distance, and the former I plan to do using pulse width modulation.

    Particularly because of your advice about steppers missing a step, I think I will go with DC motors / encoders, and am planning to use the LMD18200 H-Bridge IC to drive the motors. As I start looking for encoders, are there any inexpensive ones off the top of your head that you have experience working with or would recommend?

    Thank you again,
    jcm
     
  4. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    The cheapest source I've found, if you are using relatively small diameter axles, can be ripped out of old mice (the kind that had a ball). Grab the slot IR Interrupters out while you are at it and reuse them.

    Otherwise, you can order quadrature encoders from about any robot supply place, then put two 'slot type' opto-interrupters on each one. Then output from one interrupter is the clock, while the second indicates direction. You can get away with a single spoked wheel if you already know the direction, then only counting pulses is needed.
     
Loading...