Maker Pro
Maker Pro

Rotary encoder bounce problem ( repost )

A

Adrian Jansen

Jan 1, 1970
0
Repost - didnt seem to turn up the first time:

I have used mechanical rotary ( quadrature ) encoders for years in various
applications, always the type where the detent position leaves the lines
high, so each detent corresponds to 1 full cycle of lineA high - lineA low -
lineB low - lineA high - line B high, and of course the reverse for rotation
in the other direction. Normally these need about 100 us of debounce on
both lines, which we do with both some RC, and software - keep reading the
lines until we get a stable repeat. Easy, and it always works.

Recently we changed over to one of the Piher 11mm encoders with 30 detents
and 15 cycles per rev. (Piher part number CL11CTV1Y22LFACF). These leave
the lines alternately hi and lo on each detent, which is ok with a minor
software change, but seem to have terrible contact bounce, which is a major
problem. I used the recommended debounce circuit from Piher, 100k pullups
on the lines, 100k series feed to the processor line, and a 1n cap to earth.
But the contact bounce lasts for at least 2 msec, and often you get
disturbance on the *other* line when one does a hi-lo transition. At 2 msec
delay, you can spin the encoder fast enough by hand to miss pulses, which is
a real niusance.

We want to use these where its critical that we never miss a pulse, or get
false extra pulses at low speed, but also where we dont miss too many pulses
at high speed, so scrolling through around 10-50 pulses setting a number
works reasonably well. So far I cannot see how to do this effectively with
these encoders.

Has anyone measured the contact bounce on this type of encoder from other
sources, eg Alps, Tenrod, etc, and also whether there is any difference
between the 30 detent/15 cycle versions and the 20 detent/20 cycle version.
?

Anyone with other experience on these encoders is welcome to comment.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control


--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 
I

Ian Stirling

Jan 1, 1970
0
Adrian Jansen said:
Repost - didnt seem to turn up the first time:

I have used mechanical rotary ( quadrature ) encoders for years in various
applications, always the type where the detent position leaves the lines
Recently we changed over to one of the Piher 11mm encoders with 30 detents
and 15 cycles per rev. (Piher part number CL11CTV1Y22LFACF). These leave
the lines alternately hi and lo on each detent, which is ok with a minor
software change, but seem to have terrible contact bounce, which is a major
problem. I used the recommended debounce circuit from Piher, 100k pullups
on the lines, 100k series feed to the processor line, and a 1n cap to earth.
But the contact bounce lasts for at least 2 msec, and often you get
disturbance on the *other* line when one does a hi-lo transition. At 2 msec
delay, you can spin the encoder fast enough by hand to miss pulses, which is
a real niusance.

Are these simple mechanical switches?

I can think of no reason to get the other line bouncing.
Are you sure that the other side of the switch is tied down properly?
Have you put a scope on it?
 
T

The other John Smith

Jan 1, 1970
0
Adrian Jansen said:
Repost - didnt seem to turn up the first time:


(snip problem description)

Anyone with other experience on these encoders is welcome to comment.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control


Hi, Adrian -

See AN2123 at http://www.cypressmicro.com/support/appnotes/appnotelist.html

I realize it is specific to the Cypress microcontroller but the ideas
presented may be helpful.

Good luck.

John
 
M

Mikael Ejberg Pedersen

Jan 1, 1970
0
Has anyone measured the contact bounce on this type of encoder from other
sources, eg Alps, Tenrod, etc,

I have a little bit of comments, but not much. Recently I've made a
small hobby project, involving a rotary encoder. And I had a friendly
chap at the other side of the earth helping me with beta testing it.
He had quite a lot of problems with the encoder, while I had none.
I tried a few different types, including a ddt Hopt+Schuler (the only
one I can remember the name of right now).
He used a Piher, like yours.

I know this isn't much to go on, but perhaps it would pay off to try
an encoder from another vendor.
 
A

Adrian Jansen

Jan 1, 1970
0
Ian Stirling said:
Are these simple mechanical switches?

I can think of no reason to get the other line bouncing.
Are you sure that the other side of the switch is tied down properly?
Have you put a scope on it?

Thanks Ian, yes the other line definitely bounces when a line changes
state. Seen it with a scope, and its high enough to trigger the IRQ
on a processor, even with 100 K pullup and feed, and 10 nf filter cap.
The only explanation I can see is that these encoders use the contact
springs also to act as the detent mechanism, and they are both
physically on the one shaft, so as you go over the detent, one spring
bounces against the shaft enough to trigger the other contact as well.
 
B

Ben Bradley

Jan 1, 1970
0
Thanks Ian, yes the other line definitely bounces when a line changes
state. Seen it with a scope, and its high enough to trigger the IRQ
on a processor, even with 100 K pullup and feed, and 10 nf filter cap.
The only explanation I can see is that these encoders use the contact
springs also to act as the detent mechanism, and they are both
physically on the one shaft, so as you go over the detent, one spring
bounces against the shaft enough to trigger the other contact as well.

So this is an actual mechanical bounce problem, that one switch
switching causes the other contact to bounce? In the earlier thread I
assumed this was an electrical problem, perhaps caused by capacitive
coupling between the two lines (one line going low causing the other
to go low). This sounds severe (so much so that I would be tempted to
declare the encoder unusable), but I'd try somethng like i described
in this message:

http://groups.google.com/[email protected]&rnum=2
or
http://makeashorterlink.com/?K37725E68

Basically, if the switch conducts for ANY of ten reads taken at 1mS
intervals, then it's on, and any off readings are assumed to be
bounces. If it does NOT conduct for any of the ten reads, it's off (or
bouncing so severely it needs to be replaced anyway). Use these on and
off values, deternined every ten mS, as the encoder values.
 
F

Frank Bemelman

Jan 1, 1970
0
Ben Bradley said:
So this is an actual mechanical bounce problem, that one switch
switching causes the other contact to bounce? In the earlier thread I
assumed this was an electrical problem, perhaps caused by capacitive
coupling between the two lines (one line going low causing the other
to go low). This sounds severe (so much so that I would be tempted to
declare the encoder unusable), but I'd try somethng like i described
in this message:

Seems I missed a post. This encoder is crap. Good for the rubbish bin.

--
Thanks, Frank.
(remove 'x' and 'invalid' when replying by email)




[snip]
 
I

Ian Stirling

Jan 1, 1970
0
Adrian Jansen said:
Thanks Ian, yes the other line definitely bounces when a line changes
state. Seen it with a scope, and its high enough to trigger the IRQ
on a processor, even with 100 K pullup and feed, and 10 nf filter cap.

Do you really, really, really have no alternative but to use this part?
Have you contacted the manufacturer, and are they aware of this?
It might just be a manufacturing problem affecting one batch.
 
A

Adrian Jansen

Jan 1, 1970
0
Sure I can read catalogs, and see parts from other manufacturers, even
drop-in replacements. But getting a sample from an Australian distributor
seems to be difficult, and ordering a reasonable quantity even more so. We
only need a few hundred of these a year, not the 2000 MOQ mostly quoted.

My concern is that the same construction is probably used in all similar
types, and therefore subject to the same problems. Compared with the other
style encoder we have used - the flat type with contacts running on a PCB,
these things seem like a beast to use. However I do have some good
suggestions on how to do the read better, and will try these out.

I have contacted Piher, and they promise a reply within a week or so.
We are also sourcing some alternative brand samples from both Mouser and
Digikey.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 
Top