Go Down

Topic: Rotary Encoder Error (Read 1 time) previous topic - next topic

budder8818

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.

johnwasser

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?
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

ckiick

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,
Chris J. Kiick
Robot builder and all around geek.

budder8818


Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:

shortcuts: alt+s submit/post or alt+p preview