I connect the encoder to TIM3 CH1 and CH2
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
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.
Retrieving data ...