2017-04-28 10:52 PM
Hi
I connect the encoder to TIM3 CH1 and CH2
everything fine
my encoder has 9 pulse per round
I want to calculate the speed of encoder to calculate the rpm of motor
but I don't know how?
please help me
2017-10-03 08:03 AM
Hello!
To calculate the RPMs use : Counts*60 / (Time*9)
Counts= the result from timer.
Time =
the time interval that pulses were measured (in seconds).
A very simle implementation is to use a timer to make a time base to have an interrupt every T time.
Inside ISR it can calculate the RPMs with above method.
Regards
vf