Author Topic: Hardware debouncing a rotary encoder  (Read 60123 times)

0 Members and 3 Guests are viewing this topic.

Online IanB

  • Super Contributor
  • ***
  • Posts: 13073
  • Country: us
Re: Hardware debouncing a rotary encoder
« Reply #25 on: June 16, 2012, 05:00:42 pm »
If this is a one off project, then instead of a knob and rotary encoder, you could salvage the wheel from a mouse. They seem far more reliable then most rotary encoders. I just wish the rotary encoder manufacturers would talk to mouse manufacturers, as the mouse manufacturers have had totally reliable encoders for well over 20 years. Why are there rotary encoders on the market with lives of the order of 20,000 rotations when the encoders in an old ball-type mouse can easily do millions of rotations without any problem? Not sure if the wheel in a modern mouse is optical or contact, but they are also very reliable.

Now there's an age test. Does anyone remember what a "mouse ball" is these days?
 

Offline T4P

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: sg
    • T4P
Re: Hardware debouncing a rotary encoder
« Reply #26 on: June 16, 2012, 06:16:47 pm »
If this is a one off project, then instead of a knob and rotary encoder, you could salvage the wheel from a mouse. They seem far more reliable then most rotary encoders. I just wish the rotary encoder manufacturers would talk to mouse manufacturers, as the mouse manufacturers have had totally reliable encoders for well over 20 years. Why are there rotary encoders on the market with lives of the order of 20,000 rotations when the encoders in an old ball-type mouse can easily do millions of rotations without any problem? Not sure if the wheel in a modern mouse is optical or contact, but they are also very reliable.

Now there's an age test. Does anyone remember what a "mouse ball" is these days?

OOOH the unreliable rolly goldy days ... The days we would see ball mouses everywhere - in the junkyard
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11725
  • Country: my
  • reassessing directives...
Re: Hardware debouncing a rotary encoder
« Reply #27 on: June 17, 2012, 05:42:58 am »
at least it still can scroll on a nice flat shiny surface? not for my laser mouse here, i have to put some picture on the bottom. :P and i dont know how to make use of the pattern recognition chip inside in case it decides to be broken.

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16394
  • Country: za
Re: Hardware debouncing a rotary encoder
« Reply #28 on: June 17, 2012, 06:39:04 am »
I have repaired quite a few mice, most common is a broken cable near the mouse ( funny is the cable can be shortened to about half length before it has to be replaced, and the replacement cables come from old dead mice) and a faulty left button switch. I keep a few dead ball mice as donors for the switches and the cables. Wireless mice most often fail from corroded batteries, this often is terminal, and turns them into switch donors.
 

Offline T4P

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: sg
    • T4P
Re: Hardware debouncing a rotary encoder
« Reply #29 on: June 17, 2012, 09:11:05 am »
I have repaired quite a few mice, most common is a broken cable near the mouse ( funny is the cable can be shortened to about half length before it has to be replaced, and the replacement cables come from old dead mice) and a faulty left button switch. I keep a few dead ball mice as donors for the switches and the cables. Wireless mice most often fail from corroded batteries, this often is terminal, and turns them into switch donors.

And some wireless mouse fails magically for no reason. (Didn't check, wasn't a EE then)
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16394
  • Country: za
Re: Hardware debouncing a rotary encoder
« Reply #30 on: June 17, 2012, 10:44:37 am »
Yes, they do just die, generally after a short period of obeying Newton's laws. Often it only manifests itself a while later as intermittent then dead. Often the user will deny that it ever fell, even if it has cracked casings, loose broken bits inside and tape holding it together.
 

Offline Rudolfo

  • Contributor
  • Posts: 30
Re: Hardware debouncing a rotary encoder
« Reply #31 on: June 18, 2012, 08:29:03 pm »
Looks like a lot of effort to debounce a mechanical encoder with integrated circuits. Todays magnetic encoder IC just need one chip and one magnet to get clean counting signals or even saw tooth output. You might look for solutions similar to the 8-bit iC-MA (http://www.ichaus.biz/product/iC-MA ) or iC-MP (http://www.ichaus.biz/product/iC-MP). Similar solutions are available from other supplier as well. More on single-chip encoder you find here: http://www.ichaus.biz/wp_boost_performance .
 

Offline T4P

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: sg
    • T4P
Re: Hardware debouncing a rotary encoder
« Reply #32 on: June 18, 2012, 08:41:23 pm »
I've seen classic encoders used in tape drives all the time,
they have been tried and tested obviously i can't really point you to any of them, but they are based on IR
 

Offline Chris.MTopic starter

  • Contributor
  • Posts: 42
  • Country: au
Re: Hardware debouncing a rotary encoder
« Reply #33 on: June 19, 2012, 12:20:33 am »
Check the encoder maximum operating speed. They don’t work above that limit.

Mechanical rotary encoders are rubbish.

At work, I have been using magnetic encoders (model: EM11B) for my prototypes, but they cost 25€ each. Ouchh! Yeahh, not for every pocket. But in my case this is only a penny compared to the typical final prototype cost of 1k€ to 10k€.

free_electron said it all: “get an optical one...”
Looks like a lot of effort to debounce a mechanical encoder with integrated circuits. Todays magnetic encoder IC just need one chip and one magnet to get clean counting signals or even saw tooth output. You might look for solutions similar to the 8-bit iC-MA (http://www.ichaus.biz/product/iC-MA ) or iC-MP (http://www.ichaus.biz/product/iC-MP). Similar solutions are available from other supplier as well. More on single-chip encoder you find here: http://www.ichaus.biz/wp_boost_performance .

Thanks johnmx and Rudolfo for the magnetic encoder suggestions.
I could not find the iC-MP located in Australia but I did find a similar chip, the AS5030ATSU.

The optical encoders I have found seem to start around the $20 mark, whereas the AS5030ATSU IC is around the $10 mark, but you need to make the housing yourself.
Is this a common experience for magnetic encoders, you need to make the housing yourself?
These prices are a little steep for a hobbiest application. Has anyone seen a magnetic or optical rotary encoder for $10 or under?

 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16394
  • Country: za
Re: Hardware debouncing a rotary encoder
« Reply #34 on: June 19, 2012, 04:37:39 am »
Pawnshop or cupboard for a old mouse with a ball. Rip apart and use the encoder wheel and the slotted optoswitch to make the 2 signals. Gives the important parts but you have to do a little work on the housing.
 

Offline pdegregorio

  • Newbie
  • Posts: 1
Re: Hardware debouncing a rotary encoder
« Reply #35 on: April 11, 2014, 04:24:11 pm »

for slow turning (like fornt panel) you can alter this schematic:

Code: [Select]
vcc --+---------+-----------------
      |         |
     2k2       2k2                 ______
      |         |                 |   __ |
      |         +-[10k]--------+--| _//  |O--- A
      |         |              |  |______|
      |         |              |  |   __ |
      +---------|-[10k]--+--------| _//  |O--- B
      |         |        |     |  |______|
      |         |        |     |    ______
      |         |        |     |   /      \
      |         +-----------------|-O  O-  |
      |                  |     |  |      +----
      +---------------------------|-O  O-  |  |
                         |     |   \______/   |
                        _|_   _|_             |
                        ---   ---             |
                         |     |              |
gnd----------------------+-----+--------------+-- -

now the capacitor needs both charging and discharging throught the 10k... ( it charges with 10k+2k2 and discharges with 10k only )
so this recreates a nice waveform. note thatifyou start turning fast the encoder will simply stop working.. both outputs remain low. ( assuming a full cycle per detent encoder lke you have )

   

Thanks free_electron for the complete example. I used the circuit for a hand-turned rotary encoder and it appears to work well.
 

Offline kony

  • Regular Contributor
  • *
  • Posts: 242
  • Country: cz
Re: Hardware debouncing a rotary encoder
« Reply #36 on: April 11, 2014, 05:40:40 pm »
Just my two cents on this: when constrained on PCB place (although I find myself using it in all cases) it comes handy to use the little logic family, 74LVC2G17 for this case. Not only it is smaller and just about the same in price, it also gives You much nicer PCB layout, too.
 
The following users thanked this post: AloyseTech


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->