Pages: [1]   Go Down
Author Topic: Rotary Encoder Error  (Read 1433 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I recently measured two rotary encoders for two motors spinning at the same speed. I have a question. I attached a plot, I will refer to. So my setup I had to motors spinning freely and I decoded the rotary quadrature encoder signal for both motors whilst sampling twice faster, than half the period of one of the quadrature phases. My problem is that the encoders even though they are spinning at the same rate, the left encoder seems to increase much faster than the right one. I took both the incremental counts, and plotted an error vs. a time.


* error plot.bmp (227.46 KB, 560x414 - viewed 16 times.)
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8975
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How fast are the motors turning?  How many counts per turn in the encoders?  How do you ensure that the motors are turning at the same speed?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Austin, TX
Offline Offline
Full Member
***
Karma: 2
Posts: 182
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A couple of points

1) Just because you supply the same amount of power to each motor does not mean they will be turning at the same rate.  In fact, you can pretty much assume that they will not.

2) Do you need to debounce your inputs?  If the encoders are a little "jiggly" then you might get several pulses for each transition, which will artificially inflate the encoder counts.

3) If you are using the encoder signal as an interrupt, then you might need to clean up the
signal.  I have found that a Schmitt trigger does the trick.  The part number is 74LS14 - they are cheap and easily available.

HTH,
Logged

Chris J. Kiick
Robot builder and all around geek.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks you
Logged

Pages: [1]   Go Up
Jump to: