Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Motor Feedback

  1. Nov 1, 2014 #1
    Hello all,

    A bit of background. We are communicating with a microcontroller through a desktop computer. The desktop computer controls direction of rotation of the motor, and it can prompt a step in the motor causing a rotation. However, what can I do in terms of feedback? I have not taken controls (I will be in my final semester), but I do want a way to ensure the motor is indeed rotating the predetermined amount.
  2. jcsd
  3. Nov 1, 2014 #2
    Hello SB -- I think you thinking is backwards? The uC controls the motor and the desktop issues commands to the uC - am I correct?

    Typically the uC is controlling the motor and regulating the speed (a basic controls problem) however "to ensure the motor is indeed rotating the predetermined amount" is usually a secondary control loop - and this an be at many levels, But the key is how are you measuring the speed? Can this signal be measured / read by the PC directly or in a background by the uC supervisory loop. What time response is needed? etc...
  4. Nov 1, 2014 #3

    jim hardy

    User Avatar
    Science Advisor
    Gold Member

    Optical mouse wheel mechanically coupled to motor shaft ?
  5. Nov 1, 2014 #4
    My apologies, that was a typo. The computer merely issues the commands, and the uC controls the motor.
    The motor will not be constantly running. A user promts it to rotate 5 degrees at a time.
  6. Nov 2, 2014 #5


    User Avatar
    Science Advisor
    Gold Member

    Oh, neat. I have a similar application this may work on. Thanks Jim. :)
  7. Nov 27, 2014 #6
    We did consider the mouse application, however, we decided against it. We are providing freedback to the microcontroller's A/D via mechanically coupling a potentiometer to the shaft of the motor; each discrete voltage will coincide with a relative angular position of the shaft.
  8. Nov 27, 2014 #7


    User Avatar
    Gold Member

    Ok so simply convert that value from the A/D from volts to meters (or whatever measurement you have on your input).
    Then subtract your input (desired value) from the feedback (measured value). If there is a difference, apply a voltage to the motor such that it moves either forward or backwards. This process continues until the two values are equal.

    note: you might want to set a condition where if the motor is "close enough" then the motor won't move.

    does that make sense?

    so looking at the above link,
    feedback elements would be your potentiometer, the ADC, and your conversion factor to meters, inches etc,
    control elements would be where you decide if the motor is close enough and the motor driver. the plant is the motor, the output is the motors position, and the input is the desired motors position.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook