cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate quad encoder speed in stm32f429 disc

Ehsan Malayjerdi
Associate
Posted on April 29, 2017 at 07:52

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

1 REPLY 1
Posted on October 03, 2017 at 17:03

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