Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: mohamed on June 17, 2011, 11:15:05 AM

Title: Measuring the angle of motor rotation using Encoder shaft and PIC 16f877a
Post by: mohamed on June 17, 2011, 11:15:05 AM
i want to know the the angle of rotation of a motor using the pulses coming from an encoder by using microcontroller PIC 16f877a
thank you
Title: Re: Measuring the angle of motor rotation using Encoder shaft and PIC 16f877a
Post by: waltr on June 17, 2011, 12:25:52 PM
Count the pulses and the angle is #count / #ticks per rev * 360°.
Title: Re: Measuring the angle of motor rotation using Encoder shaft and PIC 16f877a
Post by: growler on June 18, 2011, 12:36:24 AM
Encoder pulses represent rotational translation, time is well, time.

So measure encoder pulses and time, then divide one by the other as said above and you get a speed value. Hell, with quadrature encoders you get a velocity.