controlling stepper with absolute encoder

Discussion in 'General Electronics Chat' started by farz61, Feb 4, 2013.

  1. farz61

    Thread Starter New Member

    Feb 4, 2013
    6
    0
    Can anyone offer any advice on how I can manually control my bipolar stepper motor with an absolute encoder? Ive built a control circuit using a L293D with an incremental encoder and it works great but the stepper loses its position very easily ie if you turn the encoder shaft rapidly, force the stepper to move or once powered down. Im thinking perhaps an absolute encoder on the stepper shaft for feedback and another for control (unless theres an easier way)? the turn ratio would be one turn encoder = one turn stepper, basically picture placing encoder knob at the 1 oclock position and the stepper follows...stepper has to return to knob position even after stepper is forced in one direction or another...any advice would be much appreciated.
     
  2. BillB3857

    Senior Member

    Feb 28, 2009
    2,400
    348
    How many total revs of the encoder will you need to track? Worked on old N/C (now called CNC) machines that used 10 turn pots for position feedback.
     
  3. farz61

    Thread Starter New Member

    Feb 4, 2013
    6
    0
    average track rotation of +-20degrees but the setup has to be able to track at least 5 revolutions. My setup now uses an incremental mechanical encoder to sense movement which translates into stepper movement, there is no position feedback from the stepper.
     
  4. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    in it's classic form, the motor driven pot drives toward the reference signal. Implementing a stepper would be no different, other than your driver. Your error amplitude could drive a VCO which becomes your step rate, with plus/minus being your direction.
     
  5. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,015
    1,531
    What voltage are you driving the stepper at? If steppers are driven with label/name plate voltage, they will almost always lose steps. The voltage used on the motor is usually rated way above the label voltage. The usual voltage on steppers is found by multiplying inductance of motor by 32. So if your not giving the motor the proper voltage it may not be your feedback system that is at fault.
     
  6. farz61

    Thread Starter New Member

    Feb 4, 2013
    6
    0
    my stepper run at 12 vdc, nothing wrong with the design, it works like its supposed to. my problem is im using an incremental encoder to control the stepper and if i move the encoder shaft one direction or another rapidly the signal "slips" and the stepper loses its original position. also, if the device is powered down and for any reason the encodershaft moves, the stepper does not reposition itself to the encoder position after power up, it just takes the current position, i need something intelligent enough to translate a given encoder position to a specific stepper position.....in other words if i rotate the encoder shaft to the 3 oclock position, stepper should move to that same position. If i power down the device, then turn the encoder shaft to a new position, stepper must readjust itself to that position upon re powering up the device...ratio im using is always 1:1 stepper/ encoder
    thanks in advance
     
  7. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    The problem you are getting is because you are not sampling the encoder fast enough. If you sample the encoder at a frequency higher than the rate it can change 2 counts then it can never lose position.

    How are you sampling the encoder position?
     
  8. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    Having the motor follow the encoder even if the latter moves when there's power off is a challenge, especially if the encoder can travel more than 1 turn. For that feature, you'd need to gear the encoder so one turn of the input shaft moves the encoder a fraction of a turn. My experience is that incremental encoders aren't very expensive, and absolute ones cost plenty. Would a 10-turn potentiometer be acceptable?

    You may or may not need an encoder on the motor. It depends on how much it's subject to unpredictable loads and how fast you need to travel and accelerate.

    Edited to add, your requirement "stepper has to return to knob position even after stepper is forced in one direction or another" means you need feedback from the motor as well as an input control. You're looking at something fairly complex here.
     
    Last edited: Feb 6, 2013
  9. farz61

    Thread Starter New Member

    Feb 4, 2013
    6
    0
    the encoder is wired to an L293D chip directly, the stepper moves anytime the encoder is manually turned..I currently have no feedback in my system, so im not sure how to samplethe encoder faster..perhaps I should use another chip?
     
  10. farz61

    Thread Starter New Member

    Feb 4, 2013
    6
    0
    my setup uses a gymbal that rotates on the x and y axis so a 10 turn pot would not work as it would eventually reach its limit.
    Basically i want to mount an encoder to the shaft of my stepper for feedback, then a seperate encoder for control and have them "talk" to each other so that they always remain in synch...thats the solution, i just dont know how to do this...
     
  11. BillB3857

    Senior Member

    Feb 28, 2009
    2,400
    348
    Last edited: Feb 6, 2013
  12. farz61

    Thread Starter New Member

    Feb 4, 2013
    6
    0
     
Loading...