Curious about rotary encoder pulses and detents

Last year I worked on a project which used a Bourns quadrature rotary encoder from the PEC11R series. It had 18 detents per revolution and 18 pulses per revolution - just a basic two-switch incremental encoder. At each detent both switches are open, and between any two detents both switches go through a full close/open cycle. But I noticed that the data sheet:

formatting link

says that this encoder also comes with 12 and 24 pulses per revolution, and either of those can have 12 or 24 detents. So you could have 12 pulses with

24 detents, or 24 pulses with 12 detents.

I would like to understand why one would use an encoder where the pulses and detents don't match. I can see that having fewer pulses than detents would still allow the full number of effective pulses since you could just process each half-pulse as an increment or decrement, with perhaps some additional complexity in the software. But I'm having trouble understanding why you would use one of those in preference to a 12/12 or 24/24. And I'm particularly puzzled by the idea of having more full pulses than detents - two full pulses per detent.

I assume Bourns wouldn't offer these non-matching options if there were no use for them, so could someone explain what use cases there would be for them?

Reply to
Peabody
Loading thread data ...

Study the _relative_phases_ for CW and CCW rotation. A proper decoder has two outputs... one pulse per "detent" and a "0" or a "1" depending on CW or CCW. ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| STV, Queen Creek, AZ 85142    Skype: skypeanalog |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
     It's what you learn, after you know it all, that counts.
Reply to
Jim Thompson

Possibly to save power. The pullup/pulldown resistors could be low values but not use current if both switches are open at detents.

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

Den mandag den 27. november 2017 kl. 21.46.07 UTC+1 skrev Jim Thompson:

coder

per

t

ough

and

with

and

uld

cess

al

u
-

no

a proper encoder has two outputs in quadrature and a simplistic decoder tha t uses one signal as clock and the other as direction rather that decoding quadrature is why sometimes when you turn a knob it jumps in counts and som etimes i the wrong direction if you don't turn it just right

Reply to
Lasse Langwadt Christensen

A good decode algorithm always gets it right. It can dither one count at the transitions, as the switch bounces... that's all.

My Tek DPO2024 scope misses about 10% of the knob detents, just ignores them. Three clicks clockwise then three CCW should get you back where you started, but often doesn't.

Piece-o-junk. I'll get a Rigol next.

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

Rigol has a special on now. Buy the 4-ch 350 MHz scope, and get the upgrade to 500 MHz and some serial decode stuff for free.

Seems like a sort of always-on special maybe.

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

It's a great application for a simple lookup table.

The approach I've used takes as input the two quadrature bits from the current sampling, the two from the previous sampling, and one bit of stored state ("I was going up" or "I was going down"). The output is one new bit of state to store, and a three-way "increment, decrement, no change" delta for the accumulator.

With this approach it can dither back and forth across a quadrature boundary (as frequently as "every sampling time"), without the accumulator value changing. Only when there are two successive quadrature transitions in the same direction will the accumulator change.

Easy to do in even a very simple low-speed microcontroller, or in a tiny little PLD if anybody's still making those.

Reply to
Dave Platt

Yes, but I was asking whether there is ever a reason to select an encoder which has different pulses and detents per revolution. So far, nobody has mentioned one.

Reply to
Peabody

These look cool:

Reply to
bitrex

Well if it's any consolation to you, I have the same problem with my DSO150 Shell scope kit. I figure - if you can get bad encoder servicing routines for $21, why pay hundreds of dollars more for the same thing. :-)

Reply to
Peabody

I would hope so; for the scopes without digital channels the price jump from the 2 channel 350MHz model to the 4 channel is wacky.

The DS4032 seems to be the price/performance sweet spot

Reply to
bitrex

I kinda like decoding it by ... feeding a stepper motor. An old-school mouse or trackball makes a good remote control for a variety of gotta-make-adjustment gizmos. Just amplify the outputs and it drives the motor.

Reply to
whit3rd

You can usually get the 4-channel 500 MHz scope for very close to $4K. I just ordered one.

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.