Retrofit encoder interfaces - Page 1
Forum section: electronics / beginners

author: GUGLHUPF
author_rank: Newbie
timestamp: April 04, 2022, 12:21:19 am
content: I am a newbie to electronics with only a week or two into it. My project is to replace a non working turning knob on an appliance interface. I desoldered the rotary encoder and looked at its behavior in an oscilloscope.It is of the type where when you click from one indent to the next it will go low on A followed by B ( and vice versa ) and then go back to zero (no current) (quadrature encoder). I searched long and far but there is no exact replacement available (PIN distance, mount orientation, shaft length etc. ). I fixed the appliance by buying the whole interface board, but want to learn about electronics.So I got a different encoder from one of the maker suppliers, the ANO.This encoder behaves differently. When you go from one indent to the next it will go low for A and B and stay there until the next click where it will go high again. I would like to retrofit the new encoder into the old encoders behavior. I am a software person and this could be done easily with a microcontroller, but I would like to learn electronics and I am certain this can also be achieved with a couple simple components.I saw a Youtube video "How To Use A Rotary Encoder Without Software" where the person shows some tricks with electronic components. It's not the easiest to understand for a beginner and either way his output is not what I need.My expectation for drop-in of the new encoder into the old interface board AS IS WITHOUT ANY LOGIC CONTROL is that a) at best only every other click will work b) since the new encoder stays high(low) until the next click the load on the interface board will be high and depending on how it is sourced may destroy the board ( I think microcontrollers can only source for a small current or short time ).Can somebody guide me along for an electronics interface circuit that can do what I want? I can research this in more detail but don't know where to start. I saw Flip Flops, Multivibrator or logic gates. I am sure one or a combo can achieve the behavior.Thank you

author: JuanGg
author_rank: Regular Contributor
timestamp: April 07, 2022, 09:38:45 am
content: Hi, I would advise you to mention the part numbers of the old and new encoder, and skecth out the waveforms that each produces. Their datasheet should help. You can then work from there. Some reverse engineering of the interface board may be in order (just the section that interfaces with the encoder). Are you certain that the encoder was at fault in the first place?Juan

author: DavidAlfa
author_rank: Super Contributor
timestamp: April 07, 2022, 09:53:28 am
content: As fas as I know all encoder work in quadrature mode?Better you explain further that strange signal you're describing.

author: newbrain
author_rank: Super Contributor
timestamp: April 07, 2022, 02:25:05 pm
content: Quote from: DavidAlfa on April 07, 2022, 09:53:28 amYes they do, but there are variation in the quadrature signals' edges with respect to the the detents and also to each other (as in how close they are during the rotation).The OP seems to have a "half step" encoder, i f I understood correctly their description (please provide the part number).Only one transition, either H->L or L->H, will happen on each phase when stepping from one detent to the next.I don't think there is an easy way to transform it in a "full step" encoder with a handful of components (I could think needing at least a couple of suitably timed monostable triggered by either rise or fall of each phase - a simple 74xx123 won't probably do).As for the worries about overloading or damaging the logic board, a correctly designed input circuitry should not really care.

author: MarkF
author_rank: Super Contributor
timestamp: April 07, 2022, 05:10:32 pm
content: Both pins (A and B) return high when you stop turning theBourns PEC11 EncodersI have been using. This sounds like the behavior the OP is describing.For a hardware circuit, I found this one with logic chips a long time. But, never tried it.

author: mazurov
author_rank: Frequent Contributor
timestamp: April 07, 2022, 05:46:26 pm
content: Some encoders output a sine wave (example pictured). The drive circuit looks similar to one posted by @MarkF. If your appliance is 40-ish years old you may want to drive the encoder with a power drill when probing :-).

author: GUGLHUPF
author_rank: Newbie
timestamp: April 08, 2022, 02:51:28 am
content: Sorry, not only am I new to electronics, but also to this forum. So I didn't see the responses until now. Thank you.WhatNewbrainsays seems to jive with what I am seeing. I see on one click the signal going high on both channels and staying there and on the next click it goes down and stays there. Also when I checked my solder connections I got connection between all of common+A+B in one position so I think this jives with that too. Here is the new encoderhttps://learn.adafruit.com/ano-rotary-encoderI watched so many Youtube videos about multivibrators, RS latches, flip flops and more. My head smokes. Aside from learning all these new things I partitioned the problem in my head how I would program it. For when both channels go high and stay there I thought I will devise something to bring it down to zero after a while ( like the original encoder). So I just experimented with a RC circuit and a PNP. My theory is that the PNP will shut off when there is enough voltage on the base ( equal to the source voltage ) and so I can get my output low. Like the old encoder I should see a signal which then goes to zero. This should work for the pulse up. For the pulse down from the encoder I don't know yet. Maybe something like discharging the capacitor that brings the base of the PNP to 0 and it will start conducting again, but then what will charge it. But I am just making stuff up in my head. I am sure there is stuff with comparators or things that can be tried.This is one clickhttps://photos.app.goo.gl/9oqQMYmUprqyXRXz7This is the next clickhttps://photos.app.goo.gl/9oqQMYmUprqyXRXz7Maybe I try MarkFs circuit, but it's complicated for a beginnner (nor do I have the parts yet _. Maybe better to work up from simple stuff, fail or stall and try something new. I will need to get the parts.I am not sure it was the encoder JuanGg. But this is almost besides the point. Now, I just want to learn how things work and hack into them. That's best done with a real world problem.----At the high probability I don't know what I am doing I went back just now with a multimeter and all I can say is that it seems on one click there is a connection between A-C-B and on the next click there is non. Not sure if I don't know how to read a MM. I meant to go into the Arduino library to look through it. This will tell me how the encoder behaves.

author: GUGLHUPF
author_rank: Newbie
timestamp: April 08, 2022, 04:21:11 am
content: I found this in the data sheet.Number of detents: 24Pulse/Rotation: 12/360Does this not say exactly what I say. It needs two clicks for a full pulse. One upward, the next click down.

author: Dave
author_rank: Super Contributor
timestamp: April 08, 2022, 11:56:32 pm
content: Your problem sounds a lot likethe one I've faced some years ago. The solution was simple, but irritating.A) LearnC) my mistakes.B) from