Rotary Encoder...how's it work?   - Page 1
Forum section: electronics / repair

author: gooseEL34
author_rank: Regular Contributor
timestamp: June 18, 2015, 05:18:14 pm
content: 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?ThanksTim

author: helius
author_rank: Super Contributor
timestamp: June 18, 2015, 05:30:28 pm
content: 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.

author: motocoder
author_rank: Unknown
timestamp: June 18, 2015, 05:37:53 pm
content: There's a good write-up on how they work on Wikipedia.https://en.m.wikipedia.org/wiki/Rotary_encoderSee 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.

author: gooseEL34
author_rank: Regular Contributor
timestamp: June 18, 2015, 05:46:35 pm
content: 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 TYPESo, 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

author: German_EE
author_rank: Super Contributor
timestamp: June 18, 2015, 07:41:17 pm
content: 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.

author: gooseEL34
author_rank: Regular Contributor
timestamp: June 18, 2015, 08:26:32 pm
content: 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 binary1. No connection between any pins (no voltage to either path from 5 v)2. Connection between pins 1 and 2 only3. Connection between pins 1 and 3 only4. 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....ThanksTim

author: Stupid Beard
author_rank: Regular Contributor
timestamp: June 18, 2015, 08:41:41 pm
content: Quote from: gooseEL34 on June 18, 2015, 08:26:32 pmYou 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.

author: gooseEL34
author_rank: Regular Contributor
timestamp: June 18, 2015, 09:00:02 pm
content: 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 E4Maybe I bent the pins too far?ARGGH

author: gooseEL34
author_rank: Regular Contributor
timestamp: June 18, 2015, 10:00:02 pm
content: 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 either1) neither A or B connected to middle2) A connected to the middle3) B connected to the middle4) both connected to the middleit 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 bedetected by the microprocessor controlling values, no?ThanksTimQuote from: Stupid Beard on June 18, 2015, 08:41:41 pm

author: gooseEL34
author_rank: Regular Contributor
timestamp: June 19, 2015, 01:49:50 am
content: 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.ThanksTim

author: hneve
author_rank: Regular Contributor
timestamp: June 19, 2015, 08:04:51 am
content: A picture is often worth a thousand words...

author: obiwanjacobi
author_rank: Super Contributor
timestamp: June 20, 2015, 06:00:31 am
content: 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/