Hey there,
I have been working in a dc motor control project. So far I got the motor running open loop pretty good (clockwise and counter clockwise), and now I wanna implement a closed loop speed feedback. I tried using the quadrature decoder to read the pulses coming from an quadrature incremental encoder. So this is what I read at approx. 1720 rpm
Pulse Count
33133033
Speed
-17034
Speed Radians:
-36.43
Pulse Count
33130475
Speed
-17296
Speed Radians:
-36.16
Pulse Count
33127931
Speed
-17003
Speed Radians:
-36.05
Pulse Count
33125396
Speed
-16801
Speed Radians:
-37.98
Pulse Count
33122854
Speed
-17035
Speed Radians:
-36.73
Pulse Count
33120307
Speed
-16784
Speed Radians:
-36.69
It is negative because its rotating counter clockwise. Why is it too inaccurate? I have attached my project just in case someone wants to take a look at it.
Thanks,
code02.zip
P.D. The motor runs at 4000 rpm max. Encoder specs: 1000 ppr. A, B, and I.