[sdiy] DOTCOM Analog Sequencer.. next project startup..

rsdio at audiobanshee.com rsdio at audiobanshee.com
Sat Jul 25 22:59:33 CEST 2020

Your description - "read the entire state with two port reads" - implies no diode matrix for the signals. That would be rather limiting. 16 pins only support 8 encoders with no buttons; 3 encoders with 3+7 buttons; or 1 encoder with 1+13 buttons.

When I suggested 16 pins, I was planning 3 output pins to drive a 3-to-8 decoder to select the matrix column, and 13 input pins to read each row, one at a time. It could still be handled with interrupts, but each interrupt would read the settled row bit values, increment the column, write the new column, and return from the interrupt to allow settling time before the next interrupt reads the newly-selected row value. This matrix allows for 104 wires; 32 encoders with 32+8 button switches. Mouser prices would be $30.88 for all 32 encoders. You'd need a helluva panel for that.

Sure, you can get a microprocessor with 104 GPIO pins, but you'd still have to read the pins in groups. Might as well use a diode matrix and column select so that the same input pins are used on each iteration of the loop.


On Jul 25, 2020, at 2:00 AM, john slee <indigoid at oldcorollas.org> wrote:
> encoders and buttons on 16 pins would be particularly great, you could read the entire state with two port reads and presumably trigger that on interrupts
> John
> On Sat, 25 Jul 2020 at 17:18, <rsdio at audiobanshee.com> wrote:
>> On Jul 24, 2020, at 6:52 AM, Jean-Pierre Desrochers <jpdesroc at oricom.ca> wrote:
>> > The need to be able to change any CV 'on the fly' when playing a sequence is
>> > paramount.
>> > What I forgot to say is whether pots or encoders are used I need to be able
>> > to change each step durations on each columns.
>> You could have a button for each step, and if a button is held for more than one second then that step becomes the last.
>> > The possible sequences would be:
>> > 32/1    (32 monophonic notes on one row, fixed step duration)
>> > 16/2    (16 monophonic notes on one row, adjustable step duration for each
>> > note)
>> > 8/3      (8 trio of notes on 3 rows, adjustable step duration for each note
>> > trio)
>> > 
>> > And also play forward/backward or even randomly the sequence.
>> You'll probably want some dedicated transport buttons for Play, Reverse, and Random.
>> > Since rotary encoders have 3 to 4 data wires each the multiplexing of each
>> > one after the other will be a challenge compared to standard pots
>> It's actually easier because the two types are quite different.
>> Standard pots are analog, requiring an analog multiplexer and an A/D. You have to worry about noise, and therefore you have to leave a dead zone between each note so that the noise doesn't cause the note value to constantly change. This is possible, but it takes a lot of tweaking. Without a display, you still won't be able to look at the indicator on the knob and tell *exactly* which note is selected.
>> Rotary encoders using binary signaling, so noise is practically not an issue at all. Instead of an analog multiplexer, you use a diode matrix to scan the wires. I recommend keeping the quadrature pairs on the same column, so you can read both at the same time. The 3rd wire is usually the button press for the encoder, and those can be read separately. You should design for an RC filter on the quadrature wires, even if you end up with 0 Ω and no cap. I find that a little filtering helps stop bounce on the cheaper encoders, but your scan rate has to account for the filtering, and cheap encoders can't be rotated very quickly because the bounce for longer than each step lasts. You don't need the same dead zones as an analog pot, because encoders transition through 4 states for each step, and that allows jitter between micro states without changing the final value. Some encoders have 2 states per step, some have 4 states per step. If the encoder has no detents, then that count doesn't really matter. Some brands of encoders even allow a choice of the number of detents for a full turn. I've used up to 8x8 diode matrices, but you probably don't need 64 wires (although that would allow 21 encoders with buttons). Keep in mind that the matrix doesn't need to use 8-bit rows. If you need fewer that 64 wires then cut down on the GPIO pins needed. Also, since only one column is active at a time, you can use something like a 3-to-8 or 2-to-4 decoder to reduce the number of GPIO pins needed. Don't skimp on the diodes, though. I designed one product capable of scanning 1024 switch wires for a client, but I don't know what the largest controller was to actually take advantage of that much range.
>> I should probably point out that I always use microprocessors with plenty of GPIO, so I don't need to deal with serial I/O expanders. In other words, I've never touched an Arduino.
>> I don't know about encoders with 4 data wires, other than the 4-bit encoders which are absolute position rather than relative position, and also very expensive. I'm sure you'll have a data sheet for whatever encoder you choose.
>> > but would
>> > give the ability to achieve large CV span.
>> > 96 notes span would be nice on each CV controllers !
>> Yes! 128 notes would probably be overkill, but 96 would be excellent. As someone suggested, you could have coarse and fine, such as jumping by octaves in one mode, or half steps in another.
>> 96 notes on an analog pot would require 95 dead zones, and quiet enough noise specs to get 191 unique codes out of the full range. That's more than the 128 that many products attempt.
>> > I'm hesitating to use a row of switches with only one encoder Instead of
>> > multiple encoders…
>> You can always have two or three encoders, but still have 32 steps. That's better than just one encoder, but a lot easier to fit on a panel and in a budget than 32 encoders.

More information about the Synth-diy mailing list