Previous in Forum: Residential Circuit Debug   Next in Forum: Free Energy Motors
Close
Close
Close
10 comments
Rate Comments: Nested
Power-User
Hobbies - Automotive Performance - New Member Hobbies - CNC - New Member

Join Date: Jun 2008
Location: Long Island, NY
Posts: 326
Good Answers: 1

Possible Causes for Error in an Incremental Encoder

08/06/2010 1:16 PM

I just hooked up a new encoder I bought recently and I noticed I was getting twice the PPR I am supposed to be getting. Upon closer Investigation on a scope, I see that during a transition from a high to a low state, there is a very quick spike from low to high, just before where the actual transition is supposed to be happening. I also noticed that these spikes occur randomly, meaning that they do not occur at each and every edge. Furthermore, when they do choose to occur, they do so at inverse locations for two inverse channels. Meaning, that if CHANEL A double spikes at the rising edge, CHANEL A-bar double dips at the falling edge. What do you think are the possible causes for this? Has anyone seen this before? Or did I buy sh*tty equipment? Thanks for you help.

__________________
It is better to fail in originality than to succeed in imitation.
Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Anonymous Poster
#1

Re: Possible Causes for Error in an Incremental Encoder

08/06/2010 3:05 PM

Why don't you use pulse width triggering?

Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#2

Re: Possible Causes for Error in an Incremental Encoder

08/06/2010 7:35 PM

Just for clarification: Are you getting exactly twice the expected PPR? I'm trying to fit the "twice .." bit with the "random spikes".

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Power-User
Hobbies - Automotive Performance - New Member Hobbies - CNC - New Member

Join Date: Jun 2008
Location: Long Island, NY
Posts: 326
Good Answers: 1
#3
In reply to #2

Re: Possible Causes for Error in an Incremental Encoder

08/06/2010 8:13 PM

Not exactly twice, but there abouts. I saw the spikes on a scope and I was wondering if you know any way to get rid of them,

perhaps a thicker wire..

__________________
It is better to fail in originality than to succeed in imitation.
Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#5
In reply to #3

Re: Possible Causes for Error in an Incremental Encoder

08/07/2010 8:56 AM

Is this glitch resulting in an error in position tracking from the decoding circuit?

If the signal is as you've described, it shouldn't matter - i.e. the position should still be correctly read (within one encoder pulse).

The reasoning here is that the decoding circuit should behave as if the encoder was fitted to a stationary shaft. Phase A rising and falling repeatedly (while phase B is static) is possible if there is any vibration present, and it should only result in the count incrementing and decrementing, without accumulating a position error.

In normal circumstances this wouldn't matter. If the decoder output was connected to a display, the LSD would usually be changing too quickly when moving to notice any such jitter. The only time I can think of when it could be a problem is with a circuit (or software) designed to indicate a direction error when it is known that the count should be incrementing and it decrements (or vice versa).

I'm not saying that this is not a fault (excuse the double negative!), but that it wouldn't be noticed by a simple check such as "10 revs fwd - count correct ±1? Yes; 10 revs back - count back to original ±1? Yes".

I think you have a faulty encoder, but it shouldn't matter. As you bought it recently, I'd say "get it replaced". Had it been an old one, or one you'd been given, I'd say live with it (unless it is causing a problem).

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Guru
Engineering Fields - Electrical Engineering - Been there, done that. Engineering Fields - Control Engineering - New Member

Join Date: Dec 2008
Location: Long Island NY
Posts: 15601
Good Answers: 981
#4

Re: Possible Causes for Error in an Incremental Encoder

08/06/2010 9:20 PM

I've seen this symptom before and I think that I found that one cause was an optical alignment problem from the reading head and the encoder strip. This was only true if the A and B signals show the exact same double edge wave form for part of the travel. The other source I found was an unexpected loss of hysteresis in the edge detection circuitry for the A and B channels. That's all that I can remember off the top of my head.

Good Luck

__________________
"Don't disturb my circles." translation of Archimedes last words
Register to Reply
Power-User
Hobbies - Automotive Performance - New Member Hobbies - CNC - New Member

Join Date: Jun 2008
Location: Long Island, NY
Posts: 326
Good Answers: 1
#6
In reply to #4

Re: Possible Causes for Error in an Incremental Encoder

08/07/2010 4:46 PM

How did you troubleshoot these (2) very possible causes.

__________________
It is better to fail in originality than to succeed in imitation.
Register to Reply
Guru
Engineering Fields - Electrical Engineering - Been there, done that. Engineering Fields - Control Engineering - New Member

Join Date: Dec 2008
Location: Long Island NY
Posts: 15601
Good Answers: 981
#7
In reply to #6

Re: Possible Causes for Error in an Incremental Encoder

08/07/2010 10:46 PM

A storage oscilloscope and some long consideration of the mechanics of what the encoder was actually reading. (sub-micron resolution over a meter of travel is a bitch without a good coherent ultra-violet light source) Oh, but the hysteresis problem was easy to identify because the positive feed back resistors for the A and B channel happened to have noticeable cold solder joints.

__________________
"Don't disturb my circles." translation of Archimedes last words
Register to Reply
Power-User
Hobbies - Automotive Performance - New Member Hobbies - CNC - New Member

Join Date: Jun 2008
Location: Long Island, NY
Posts: 326
Good Answers: 1
#8
In reply to #7

Re: Possible Causes for Error in an Incremental Encoder

08/08/2010 8:38 PM

I am posting a couple of pictures just to show you what I am talking about. It seems that people like pictures much more than they like to read a detailed explanation of it.

As you can see, these spikes are 2microseconds apart and my micro-controller can easily count them as legitimate pulses.

By the way, ordered a couple of these encoders and I am getting the same result on both, so I do not think its the hardware itself. Maybe my set up is wrong.

__________________
It is better to fail in originality than to succeed in imitation.
Register to Reply
Guru
Engineering Fields - Electrical Engineering - Been there, done that. Engineering Fields - Control Engineering - New Member

Join Date: Dec 2008
Location: Long Island NY
Posts: 15601
Good Answers: 981
#9
In reply to #8

Re: Possible Causes for Error in an Incremental Encoder

08/08/2010 9:50 PM

Yes, I do like pictures because they often tell me more than the description of a waveform from somebody who is stumped over what is going on.

Unfortunately though what you should be showing is the simultaneous signals of A and B triggered by the same event. If during the four large spikes of the top trace A, the B trace was instead making no transitions at all then no more than one LSB toggle should occur.

But the waveforms you're showing suggests to me that you have some cabling reflection problems here. This is typical of the exponential decaying envelope these spikes show of a reflecting high frequency oscillation bouncing back and forth. This can happen from two likely conditions. First, improper oscilloscope probing can produce false ringing signals like this. One should use a compensated oscilloscope probe that is grounded to the circuitry. But I don't think that this is what your trace is showing me because the rising edge does not have this ringing. Second, the transmitter and receiver do not have the similar impedances when the output is low. This implies to me that the encoder transmitter is expecting a lower resistive load than what exists and that the transmitter is a source only transmitter. For a starter resistive load I would try a 510 ohm resistor. (Sourcing 4 mA should not be too much of a problem.)

If this does not help, examine and/or post the two channel waveform with A and B signals on them.

__________________
"Don't disturb my circles." translation of Archimedes last words
Register to Reply
Guru
Engineering Fields - Electrical Engineering - Been there, done that. Engineering Fields - Control Engineering - New Member

Join Date: Dec 2008
Location: Long Island NY
Posts: 15601
Good Answers: 981
#10
In reply to #9

Re: Possible Causes for Error in an Incremental Encoder

08/08/2010 11:25 PM

Sorry, that's 2V per division so you'd be sourcing about 8mA with a 510 ohm resistor. Still not an excessive current to source, but I would want to verify the encoder driver circuitry can source that.

__________________
"Don't disturb my circles." translation of Archimedes last words
Register to Reply
Register to Reply 10 comments
Copy to Clipboard

Users who posted comments:

Anonymous Poster (1); Economist (3); JohnDG (2); redfred (4)

Previous in Forum: Residential Circuit Debug   Next in Forum: Free Energy Motors

Advertisement