Author Topic: Rotary Encoder...how's it work?  (Read 4860 times)

0 Members and 1 Guest are viewing this topic.

Offline gooseEL34Topic starter

  • Regular Contributor
  • *
  • Posts: 120
Rotary Encoder...how's it work?
« on: June 18, 2015, 05:18:14 pm »
Hey gurus.
I am repairing my brother's guitar processor (or trying to).  It is a Rocktron G200 Utopia multi function effects processor.  It has a small LCD screen and you can make changes to the settings with 4 knobs.

The problem lies in a knob labeled PARAMETER ADJUST....  When I open the unit and get down to that PCB, it is a PCB mounted pot (in appearance) with 3 "legs" that are soldered to the board (and the pot check nut keeps them in place by connecting the pot to the chassis).

So all the knobs work except this adjustment.  For example, if I want to go into a BLUES GUITAR CRUNCH patch, I select it and then I can decrease the distortion level.  I select the distortion with the parameter select knob and when I turn the parameter adjust knob, the screen changes and a value is shown.  I am SUPPOSED to be able to change that value.

So if it shows GAIN: 8 on the screen, rotating the knob clockwise should go to 9, 10, 11 etc... and counter-clockwise should go to 7,6,5 etc.   

If I turn the knob it sometimes changes the parameter, but usually only 1 increment.  If I manipulate the shaft with downward or upward pressure, I can sometime get it to work.  I was going to try RS TV Tuner Cleaner and Lub, but I do not think this is a resistive path type of pot.   It can be rotated infinitely, so there is no wiper that stops at the end of the resistive path (like the guitar volume pots I am familiar with using).

So.....How does it work?   Does it send a pulse for each notch or something else?

Can I find a generic replacement?

Thanks
Tim
 

Offline helius

  • Super Contributor
  • ***
  • Posts: 3683
  • Country: us
Re: Rotary Encoder...how's it work?
« Reply #1 on: June 18, 2015, 05:30:28 pm »
Typically there are two outputs sent in quadrature: that means separated in phase by 90 degrees. When I leads Q, the rotation is to the right, and when Q leads I it is to the left (for example). The receiving component is usually edge triggered, so only the transitions are important.
Inside there could be a pair of wipers on an endless circular pattern, although the better ones are optical.
 

Offline motocoder

  • Supporter
  • ****
  • Posts: 772
  • Country: us
  • Electrical Engineer
Re: Rotary Encoder...how's it work?
« Reply #2 on: June 18, 2015, 05:37:53 pm »
There's a good write-up on how they work on Wikipedia.
https://en.m.wikipedia.org/wiki/Rotary_encoder

See the section entitled "incremental rotary encoders". I think yours is mechanical based on the fact that it has 3 pins instead of 4. One of the pounds will be common. The other two pins will be each of the two quadrature outputs. Depending on the position of the shaft one, both, or neither of those two outputs will be connected to common. As you turn the shaft, this will change. The pattern of outputs is used to detect the direction of rotation (see the table in the Wikipedia article).

You may be able to open it up and clean the contacts with some DeOxit, but I would identify a replacement part first, in case you break it. DigiKey should have one.
 

Offline gooseEL34Topic starter

  • Regular Contributor
  • *
  • Posts: 120
Re: Rotary Encoder...how's it work?
« Reply #3 on: June 18, 2015, 05:46:35 pm »
Ok.   so are there specs for these other than physical size, mounting, etc...


For example, I mainly work with 250k or 500k audio taper pots in guitar work.

If digikey has one that meets the physical needs, are there any specs I need to look for (I cannot find a schematic for the unit on the internet).

It looks like I need to know VOLTAGE SUPPLY and PULSES PER REVOLUTION, ENCODER TYPE, OUTPUT TYPE

So, do some of these need a supply to work correctly?  Is it possible my encoder is fine but there is a problem in the supply voltage?

Thanks
« Last Edit: June 18, 2015, 06:14:59 pm by gooseEL34 »
 

Offline German_EE

  • Super Contributor
  • ***
  • Posts: 2399
  • Country: de
Re: Rotary Encoder...how's it work?
« Reply #4 on: June 18, 2015, 07:41:17 pm »
There are two ways to make a rotary encoder.

The cheap way is the device you have, there is a common lead in the middle and two output leads that generate a pair of square waves when they are rotated. Inside are a pair of wiper contacts similar to what you might see in a potentiometer and these make contact with a small PCB that rotates as you turn the shaft, maximum resolution will be about 32 pulses per turn. If you're feeling brave then desolder the broken part then dismantle it and clean it.

The second way of building an encoder is to use optics. The rotary disk has a very fine grating on it and an LED shines through onto two optical detectors. Now you have more connections because the LEDs and detectors need powering but in return you can get a thousand pulses per revolution.

Should you find yourself in a chronically leaking boat, energy devoted to changing vessels is likely to be more productive than energy devoted to patching leaks.

Warren Buffett
 

Offline gooseEL34Topic starter

  • Regular Contributor
  • *
  • Posts: 120
Re: Rotary Encoder...how's it work?
« Reply #5 on: June 18, 2015, 08:26:32 pm »
I disassembled and found it was just making an breaking the connections between the 3 output pins.   

16 detents produced a repeating pattern of 4 outcomes, which felt like binary

1.  No connection between any pins (no voltage to either path from 5 v)
2. Connection between pins 1 and 2 only
3. Connection between pins 1 and 3 only
4. Connection between all output pins....

I am still trying to understand how it creates a pulse, but I will read up on the internet.....

Last question.  On a encoder like this, do you need to travel more than one detent (usually) to get a reaction from the device?

I rebent the little fingers and confirmed its operation with a VOM.   Now, if there is a problem, it will have to be either 1) the 4.7v I read on pin 1 while it was in circuit is incorrect or 2) the decoder part of the microprocessor is faulty and this becomes a boat anchor....

Thanks
Tim
« Last Edit: June 18, 2015, 08:28:09 pm by gooseEL34 »
 

Offline Stupid Beard

  • Regular Contributor
  • *
  • Posts: 221
  • Country: gb
Re: Rotary Encoder...how's it work?
« Reply #6 on: June 18, 2015, 08:41:41 pm »
I am still trying to understand how it creates a pulse, but I will read up on the internet.....

You put a pull up resistor on A and B, ground on the common (usually the middle pin). When you turn the shaft, the contacts short one or both pins to ground. It's essentially the mechanical equivalent of open collector/drain.
 

Offline gooseEL34Topic starter

  • Regular Contributor
  • *
  • Posts: 120
Re: Rotary Encoder...how's it work?
« Reply #7 on: June 18, 2015, 09:00:02 pm »
Ok... so I cleaned it, reassembled it and checked each detent with a meter for continuity between the pins.
It all checked out.  Soldered back in circuit and same problem.   

It is connected to a multipin IC labeled TI 7DBCK9K E4

Maybe I bent the pins too far? 

ARGGH
 

Offline gooseEL34Topic starter

  • Regular Contributor
  • *
  • Posts: 120
Re: Rotary Encoder...how's it work?
« Reply #8 on: June 18, 2015, 10:00:02 pm »
So, I reassembled and still no luck.   Does the speed at which you turn matter?

So, if I test the thing and at each detent I have either
1) neither A or B connected to middle
2) A connected to the middle
3) B connected to the middle
4) both connected to the middle

it should be working correctly, no?   

Are the connections make before break or should it matter (I am wondering if when I bent the pins back, I bent it too far and the pulse is being thrown off by something making or breaking connection to quickly or a hair late.

I guess I need to understand these better.  In theory, you should be able to send a pulse with one detent click, no?
So if I go from no connections between the pins, to A to C but B not connected, that change is a "pulse" that should be
detected by the microprocessor controlling values, no?

Thanks
Tim




I am still trying to understand how it creates a pulse, but I will read up on the internet.....

You put a pull up resistor on A and B, ground on the common (usually the middle pin). When you turn the shaft, the contacts short one or both pins to ground. It's essentially the mechanical equivalent of open collector/drain.
 

Offline gooseEL34Topic starter

  • Regular Contributor
  • *
  • Posts: 120
Re: Rotary Encoder...how's it work?
« Reply #9 on: June 19, 2015, 01:49:50 am »
Ok.

After all that, it was not the encoder at all!   I swapped two encoders an the problem stayed with the one that had the problem originally.


So I am assuming this is a problem with the microprocessor that receives the pulses and is probably beyond my abilities.
Anything I should look for as a long shot?  The 47k resistors tie to A and B measure 46.3k so they are ok.
Thanks
Tim
 

Offline hneve

  • Regular Contributor
  • *
  • Posts: 76
  • Country: no
    • http://www.neve.nu/
Re: Rotary Encoder...how's it work?
« Reply #10 on: June 19, 2015, 08:04:51 am »
A picture is often worth a thousand words...
73 de LB4NH
 

Offline obiwanjacobi

  • Super Contributor
  • ***
  • Posts: 1013
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: Rotary Encoder...how's it work?
« Reply #11 on: June 20, 2015, 06:00:31 am »
Yeah, seeing a photo really helps me think on these things.

Just follow the two signal traces over the PCB. Make sure that also the PCB tracks are connecting (I once spent a whole day not seeing that). That chip id you gave does not bring up any hits. Sure it is the correct number?

Also it may help if you can find a schematic...

Also check this forum: http://music-electronics-forum.com/
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf