The circuit in that article only outputs a single pulse per cycle, not per transition, which is much more limited in application (you pay for high encoder resolution, why throw it away?)see also fig.4 in this tech note by digikey. thanks Mark, i'll need to look at your schm carefully
Motion Sensing Via Rotary Shaft Encoders | DigiKey
Wrt. contact bounce.
Use an optical encoder, you can get them with CMOS/TTL compatible outputs so no contact bounce to worry about.
You can still have dither when "stationary" though, especially in machinery which has vibration, so you have to address this.
There's a further little gotcha to do with quadrature encoders which is runt-pulses, this can happen due to contact bounce or electrical noise in an optical encoder, and it means that two transitions can be very close together in time - this isn't easy to deal with - some bandwidth limitation can reduce the bounce issue, but when both A and B signals get a simultaneous noise spike that can lead to false counting. You'll find industrial encoders tend to use differential signalling to eliminate this kind of issue.
With a microcontroller as the decoder you just have to sample regularly - contact bounce will simply appear as dither (*). Erroneous changes to both signals simultaneously can be flagged as an error in software, so at least you know the counting has probably gone awry.
But with sampling in a microcontroller you have a much lower maximum count rate. High resolution optical shaft encoders on a 10,000rpm spindle motor will be well beyond software count rates. Fortunately that's unlikely to be an issue for any audio product I can think of 🙂
(*) Microcontrollers pass incoming logic signals through a series of clocked DQ flipflops to synchronize them and either eliminate runt pulses or turn them into well defined pulses.
You can use the same idea with discrete logic for processing quadrature too.
There are two incremental encoders in a PC mouse.
Open an old mouse with a track ball, you will see two wheels one for X moves, the other for Y moves. These make the quadrature signal.
There is no such wheels in an optic mouse, the encoders are virtual, nevertheless, the output signals ( pulses in quadrature ) from the incremental encoders to the PC are the same.
Open an old mouse with a track ball, you will see two wheels one for X moves, the other for Y moves. These make the quadrature signal.
There is no such wheels in an optic mouse, the encoders are virtual, nevertheless, the output signals ( pulses in quadrature ) from the incremental encoders to the PC are the same.
Found a chip that vastly simplifies the circuit, a rotary encoder into a LS7083 from www.usdigital.com, into the up/down counter. piece of cake. 🙂
Also look at Bourns incremental encoders in the PEC12R line, Mouser carriers them, and cheap.
Also look at Bourns incremental encoders in the PEC12R line, Mouser carriers them, and cheap.
Found a chip that vastly simplifies the circuit, a rotary encoder into a LS7083 from www.usdigital.com, into the up/down counter. piece of cake. 🙂
Also look at Bourns incremental encoders in the PEC12R line, Mouser carriers them, and cheap.
That looks perfect. Thanks for the tip, I'll use the LS7183N-S for my pre-amp project, definitely simplifies things.
Lukas
Where can you buy the LS7183N?
Right from their website,you'd have to check with US Digital for international distributors
https://www.usdigital.com/products/accessories/interfaces/LS7183N-S
https://www.usdigital.com/company/distributors
Lukas
Thanks, already dropped them a mail as well as the listed distributor. Shipping cost will probably make it unfeasablke to order from germany though :/
Found a chip that vastly simplifies the circuit, a rotary encoder into a LS7083 from www.usdigital.com, into the up/down counter. piece of cake. 🙂
Also look at Bourns incremental encoders in the PEC12R line, Mouser carriers them, and cheap.
Great find! Cheaper then the ELM404
thanks
Arduino and 10 lines (made that up but it is not a lot) of code will do that for almost no money (<$10).
Plus it can read your IR remotes and drive the display. Of course if you need speed, the hardware solution
is better but most of us are thinking of knobs for adjustment and not sensors on motors.
G²
Plus it can read your IR remotes and drive the display. Of course if you need speed, the hardware solution
is better but most of us are thinking of knobs for adjustment and not sensors on motors.
G²
I contacted their distributor in Switzerland and just heard back from them - they do not sell to private individuals :/
- Home
- Source & Line
- Analog Line Level
- rotary encoder interface to counter