Odd encoder/counter anomaly

Thread Starter

strantor

Joined Oct 3, 2010
6,798
The symptoms and waveforms you posted match exactly to a simple open-collector encoder type where the +rail supplying the pullup resistors is not able to supply enough current and drops the voltage a bit. :)
I think you're exactly right. Now, why didn't I think of that? ;).

the wave will only get sine-like at higher RPMs (an encoder with more "lines" will get sine-like at a low RPM than an encoder with less lines)
This was my thought too, right after Max dumped the sine wave epiphany on me. But (remember, I haven't done any bench testing yet, just conjecture) if I re-read his statement...
the field or the light intensity gradually intensifies as the sensor approaches the target or window, reaches a peak and then decreases as the sensor moves out of the window.
... I am more inclined to think that it really has nothing to do with speed. You could turn the encoder incredibly slow, 1 rev per day, and still get a sine wave, since the output of the phototransistor is going to be analog, in proportion to the amount of light it recieves. Just like we have dawn and dusk, the phototransistor will experience the same.

...or are you talking about a sine wave coming from the actual output transistors, possibly due to switching time?
 

MaxHeadRoom

Joined Jul 18, 2013
28,688
... I am more inclined to think that it really has nothing to do with speed. You could turn the encoder incredibly slow, 1 rev per day, and still get a sine wave,
Agree entirely, the likes of Heidenhain that use the natural sine wave without squaring use the arc-tangent function in their motion controllers.
I am talking of the signal from the photo-cell.
BTW the 'shutter' I mentioned earlier moves at the rate of the resolution of the encoder, but if the scale or line height is 1/4" then the 'shutter' would alternate 1/8th light, 1/8th dark and move Perpendicular to the motion of travel, in the right circumstances it can be seen with the naked eye.
IOW, if the scale passed the head in a horizontal fashion, the apparent 'shutter' would be rotating up or down, depending on the direction of the scale disk.
There is a rather crude, not quite accurate account in this PDF. P23.11
Max.
 

Attachments

Last edited:

THE_RB

Joined Feb 11, 2008
5,438
...
This was my thought too, right after Max dumped the sine wave epiphany on me. ...

... I am more inclined to think that it really has nothing to do with speed. You could turn the encoder incredibly slow, 1 rev per day, and still get a sine wave, ...
Nope, it depends on the size of the line (gap) of the encoder vs the size of the sensing element chip and time to saturate the sensing element. I have some nice old 3" dia by 6" DC servomotors here with glass encoders and they definitely produce a "square" wave at low speeds. I think they are 144 line encoders (576 quadrature counts per rotation).

With respect to Max and his 35 years experience I think he is accustomed to higher cost, higher resolution, high performance modern encoders. I saw enough encoders in industry in the early 80's on the scope (lots of squarewaves), and occasionally others through the years but in my experience they had less lines and were simpler/cruder devices than what Max is describing as standard these days.

Your waveform seems pretty square at 1200uS (833Hz) so it could have a driver IC to square it up, or it might just be an old low-lines encoder that will be fairly square anyway at that lowish speed. Really, you need to pop that encoder open and check what is inside. :)
 

Thread Starter

strantor

Joined Oct 3, 2010
6,798
Really, you need to pop that encoder open and check what is inside. :)
Sorry, this has been strictly theory discussion since post #1. I wish I could go back, this is on a customer's machine that is working just fine now. I can't just waltz in and ask them to shut her down for a bit while I satisfy my curiosity.
 

MaxHeadRoom

Joined Jul 18, 2013
28,688
Well I CAN claim to have used one of the most common encoders used with General purpose servo motors made in N.A., this being Renco, who were taken over recently by Heidenain, these encoders have been used by Reliance, Electro-Craft and Allen-Bradley, Cleveland Motion Control (CMC), just to name a few.
Renco made their encoders as I described.
Originally the likes of Fanuc, Mitsubishi and all the large systems manufacturers used encoders incorporating this method, now for some time, the majority have used some form of proprietary serial communication.

If you look inside the encoder and there is a small grating plate mounted onto the front of the LED, if it has, it will certainly be the Moiré effect type.
As to the sine wave, I am not referring to the encoder output, but the signal at the output of the photocell, this sine wave is processed for output, TTL etc by the internal driver.
In any case the only encoders I have seen that do not use the Moiré effect are <=100 lines.
Also the common way of increasing the resolution by X2 or X4 is to read two or all the edges of the two quadrature
output pulses.
Quadrature: Pulses 90° apart pulses.
Quadrature Pulse 'A' or 'B' x 4 = pulse count.
Max.
 
Last edited:

THE_RB

Joined Feb 11, 2008
5,438
...
In any case the only encoders I have seen that do not use the Moiré effect are =>100 lines.
...
Sorry Max but did you mean <= 100 lines? That seems about right, I would say about <=150 lines or so.

I was working with a perforated metal disc encoder on a nice small Japanese servo a couple of weeks ago, it was about 140 lines (140 perforations).
 

MaxHeadRoom

Joined Jul 18, 2013
28,688
Sorry Max but did you mean <= 100 lines? .
Yes, Correction: <=100 lines.
Incidentally for a 1.5" dia encoder disk with 100 lines, the max width between the aperture at the outer edge is only .023"
The reading head has to distinguish this width of line.
Max.
 
Last edited:
Top