[sdiy] Rotary Encoder Design

Ben Bradley ben.pi.bradley at gmail.com
Sat Jul 25 21:58:22 CEST 2020

Now that I see that, I remember seeing a similar magnetic rotary
sensor years ago, that probably gave me the idea for this. The reason
I came up with using two single-axis Hall effect sensors is two of
them are still several dollars less than a one-chip angle sensor at
about $6 each.


On Sat, Jul 25, 2020 at 2:06 AM Vladimir Pantelic <vladoman at gmail.com> wrote:
> see: https://ams.com/as5055a
> they also offer the magnets for that application.
> On Sat, Jul 25, 2020, 07:00 Ben Bradley <ben.pi.bradley at gmail.com> wrote:
>> I thought up something a few years ago that may be useful for the
>> currently-discussed sequencer, or really any synth device where you
>> want to read several controls using high resolution with a
>> microcontroller. I still haven't made a prototype, but there's no
>> reason for this not to work.
>> Background:
>> Available rotary encoders are basically two types:
>> 1. cheap detented mechanical (quadrature output, the whole four cycle
>> output per detent) with 12 to 24 detents. These are used in car radio
>> volume and tuning controls, and 90s CRT brightness-and-constrast
>> controls. Often have a putbutton feature but that's not relevant here.
>> The price on these is good, in the $1 to $2 range.
>> 2. nice no-detent easy-turning shaft optical quadrature output with a
>> few hundred counts per revolution. These are used for
>> higher-resolution needs like (1990s) logic analyzers and digital
>> oscilloscopes for the "master incremental controller." The prices I've
>> seen on these are like $30, where you can barely justify one for a
>> master controller. They give good resolution, but using several would
>> be too costly to justify.
>> My Idea:
>> Use a couple of linear Hall-effect devices fixed at 90 degrees to each
>> other, right behind a magnet on the end of the shaft encoder. These
>> are arranged so that as the knob is turned through one rotation, one
>> output would output one cycle of a sine wave, and the other would
>> output one cycle of a cosine wave. Reading these in the A/D input of a
>> microcontroller and doing the appropriate trig function (basically
>> atan2) would give the angle of the shaft. You could (with appropriate
>> multiplexing, etc.) read a large number of such encoders at what would
>> feel like real time with a modern microcontroller. Even cheap plastic
>> 3d-printable parts should get resolution to a couple degrees. Cost of
>> parts might be $2 or $3 per encoder (not including microcontroller and
>> multiplexing, which would be shared among the encoders).
>> The parts I got for this a few years ago are TI DRV5053. It just
>> occurred to me that perhaps similar are available with a digital
>> interface, and looking on Digikey finds AS5510 with an I2C interface.
>> These aren't necessarily optimal or the cheapest, just the first I ran
>> across, but an I2C interface would be easier hardware-wise than
>> multiplexing analog voltages.
>> This doesn't cover displaying the value controlled by each encoder as
>> it's turned, but that's a "separate function." For the
>> currently-discussed sequencer you might only need to hear the
>> oscillator for controlling pitch, and for duration use a two-digit
>> display.
>> _______________________________________________
>> Synth-diy mailing list
>> Synth-diy at synth-diy.org
>> http://synth-diy.org/mailman/listinfo/synth-diy

More information about the Synth-diy mailing list