# Motor Feedback

1. Nov 1, 2014

### sandy.bridge

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. Nov 1, 2014

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...

3. Nov 1, 2014

### jim hardy

Optical mouse wheel mechanically coupled to motor shaft ?

4. Nov 1, 2014

### sandy.bridge

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.

5. Nov 2, 2014

### dlgoff

Oh, neat. I have a similar application this may work on. Thanks Jim. :)

6. Nov 27, 2014

### sandy.bridge

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.

7. Nov 27, 2014

### donpacino

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?

http://nuclearpowertraining.tpub.com/h1013v2/img/h1013v2_117_3.jpg
so looking at the above link,