Measuring Motor Rotation with a Desktop Computer

AI Thread Summary
The discussion centers on measuring motor rotation using a desktop computer and microcontroller (uC) setup. The desktop issues commands while the uC controls the motor's movement and speed. Feedback is crucial for ensuring the motor rotates the desired amount, which can be achieved by mechanically coupling a potentiometer to the motor shaft to provide voltage readings corresponding to angular position. The feedback loop involves converting the potentiometer's voltage to a measurable unit and adjusting motor movement based on the difference between desired and actual positions. This control method ensures precision in motor rotation and allows for adjustments until the motor reaches the specified position.
sandy.bridge
Messages
797
Reaction score
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.
 
Engineering news on Phys.org
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...
 
Optical mouse wheel mechanically coupled to motor shaft ?
 
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.
 
jim hardy said:
Optical mouse wheel mechanically coupled to motor shaft ?
Oh, neat. I have a similar application this may work on. Thanks Jim. :)
 
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.
 
sandy.bridge said:
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.
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,
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.
 
Back
Top