Switch encoder problems

If that is the case then use the algorithm that I suggested but divide and round the result. I.e. take the state, add two (to avoid the transition on 0 0), then ignore the bottom two bits. This should give you something that will only switch when you're right between detents.

--
Tim Wescott
Wescott Design Services
 Click to see the full signature
Reply to
Tim Wescott
Loading thread data ...

I hit the send button and then thought of a better way:

Use my suggested algorithm, but only 'latch' the data from it when the switch reads 0 0. You may sometimes fail to register a move, but you only _will_ register a move when the switch is right where it belongs, and it can dither around the right answer without you uselessly reloading your synthesizer.

--
Tim Wescott
Wescott Design Services
 Click to see the full signature
Reply to
Tim Wescott

That sounds like a mechanical issue, are you stuck with this encoder ?

ie There are different combinations of encoder out there, with Detent-edge ratios ?

Otherwise, a solution might be to discard some resolution, for stability. - resolve to full 4 quadrants, but only action on some count either side, so it's really a SW backlash. Not as nice to use, but it could tolerate a last-set-click encoder ?

-jg

Reply to
Jim Granville

Thanks for seriously considering the option. I'll try and do some justice to the idea if you don't find a quick fix beforehand.

Jon

Reply to
Jonathan Kirwan

Coincidently, I've just struck a somewhat similar switch-fudge-needed related problem.

The solution is to remove the debounce, but add a speed-related 'gain'- so as the thing spins fast, it uses all the quad edges, and thus gets around the scale fast, and below some set-edge-rate, you change the edge gain, so instead of each edge, you use edge pairs, or even whole cycles.

That means no 'edge afterthought' effects, and you can use the low-spec encoder.

Debounce is not needed on Quad Encoders (fully decoded), but you do need to be quick enough follow them at the highest speed.

-jg

Reply to
Jim Granville

Ah, that makes sense.

Thanks Mike

Reply to
Mike

Oh yeah, I've come to the conclusion that is a reason they were only $1.08 ea. No, As long it can be connected via 2 port input lines I can use it.

I don't really know.

Reply to
Mike

Success!

I tried the algorithm proposed by Tim Wescott first and it worked much much better. It still skips a staion once in awhile. I put larger dia knob on on it and it's very usable now.

Thanks to all for their ideas.

Mike

Reply to
Mike

Wonderful, Mike!!

Jon

Reply to
Jonathan Kirwan

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.