Electronic Alternative to Rotary Switch?

Started by thehallofshields, November 12, 2017, 02:53:38 PM

Previous topic - Next topic

thehallofshields

I have a need for a 1P7T in a pedal but I'm really dreading wiring up an archaic mechanical monstrosity.  :-[



What options do I have?
I assume most of the commercial modulation pedals out there that let you select waveforms are using rotary encoders and microcontrollers.

Are there any through-hole IC's or CMOS solutions that can manage 1P8T or similar switching? Push button is OK.


Groovenut

You've got to love obsolete technology.....

thehallofshields

Quote from: Groovenut on November 12, 2017, 02:58:59 PM
Something like this maybe?
http://www.mouser.com/ds/2/427/dg408-240041.pdf

Nice, so a 'Multiplexer' is what I'm looking for.

I'm looking at the Datasheet, it's looks like it's meant to be used with a regular encoder.
Probably no persistence between power ON/OFF right?



Rob Strand

QuoteProbably no persistence between power ON/OFF right
Unfortunately, that's the drawback with solid state stuff.  Well unless you use a microcontroller to store the state. 

IF you are very careful you can leave the circuit holding the button state permanently powered.  Usually it is not practical for effects pedals that are externally powered.   You also have to be careful the output of that circuit doesn't power anything through the outputs (which can happen when driving other chips.).   And ..no pull-ups or pull down resistor drawing power in the off state.   It's all starts getting messy.

Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

thehallofshields

Quote from: Rob Strand on November 12, 2017, 05:07:25 PM
QuoteProbably no persistence between power ON/OFF right
Unfortunately, that's the drawback with solid state stuff.  Well unless you use a microcontroller to store the state. 

Hmm... that would be fine for line-switching for a whole pedalboard, but for a single effect that might be a big turnoff for some.

Rob Strand

QuoteHmm... that would be fine for line-switching for a whole pedalboard, but for a single effect that might be a big turnoff for some.
A lot of micros these days have some form of permanent memory on chip so you can save the state and power off.

Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

PRR

> 1P7T ....dreading wiring up an archaic mechanical monstrosity.

Most ways you look at it, you have 7+1 wires to hook-up. The switch lugs are simple order, many chip-switches put the taps in odd order.

CD4051 is the low-cost CMOS 8:1 switch. The 3-bit control inputs can be driven with a thumb-wheel (how 1972!!) or other logic. Readout can be another '4051 and eight LEDs, or a 7-seg decoder chip (3 LEDs if you read binary). Persistence can be achieved with more work. It is VERY hard to beat the combination of control, readout, and memory of mechanical pots/switches.
  • SUPPORTER

potul


anotherjim

There are bcd or hex "encoded" switches. These reduce the wiring to 4bits + common for 10 or 16 choices. However, you then need something to decode the 4bits into discrete switches with either relays or solid state. Encoded switches can be normal rotary or edge thumbwheel type. For 7 or 8 ways you only need to decode 3 bits.

A mechanical rotary switch is a fine thing in my opinion. Of all the switch types, the open wafer variety can actually be cleaned - well, being open means dirt can get in in the first place, but sealed switches have grease in them (why?) and whatever else was around when made which can cause trouble in future.

The apparently complex wiring of those switches is nothing to be afraid of. They follow a logical mechanical order. Just confirm by continuity (beep) testing with your DMM.
If you intend to pcb mount the switch, this type, although not the best mechanically, is probably the most commonly used. There is an adjustable stop ring to reduce to less than 12way.

Taiwan Alpha 1p 12t. PCB mount. Designs for pcb track layouts (Eagle etc) are out there for these.

diffeq

If you want IC, multiplexer is the only option for electronic switching. You can control it via single pushbutton with a microcontroller like ATTiny85 (which has just 8 pins), or use a binary up/down counter like CD4516 to cycle through. In any case, you replace one complexity with another, in my opinion.

thehallofshields

Quote from: potul on November 13, 2017, 04:12:37 AM
What about a smaller rotary switch like this one?

https://www.musikding.de/Print-rotary-switch-1P8T

I was considering that! Will the pin-spacing fit standard perf & vero? Sometimes those big equipment-ground pins create problems for me.

Juan Wayne

Just to add some to all the good suggestions, check out Analog Devices' catalog. They (and other manufacturers, but there's a reason THEY are the ones called Analog Devices) have a shitload of solid-state analog switches and stuff you might find useful, which are a bit more specific in aplication than a regular multiplexer. They have widely varying kinds of complexity and input bits to analog channels ratio. The ADG12XX series for example, is as simple as they get, 4 channels, 1 input controls one channel, great electrical specifications.

However, if the problem with the bulky switch is that it's bulky, you can solve that with the more modern ones suggested above, and if the problem is the complexity, ICs will not solve that either, especially considering your inability to store things when power goes out. That calls for either mechanic input of some form of power storage.

However, some types of PCB-mounted rotary encoder in combo with an IC might be a smoother looking and feeling solution. Functionally, it'll be the same as a regular rotary, but sometimes it's worth the hassle to get that extra pro-touch on a build.

Fancy Lime

One thing I would ask myself if I thought I needed a 7 position switch would be: Do I, though? Most applications for this sort of switch are for selecting a range of caps for tone control or something of the sort. A 9 position rotary switch can often be replaced with two 3-position toggle switches if the cap values you need can be approximated by nifty addition of parallelized caps. Ive done this sort of thing here:

http://www.diystompboxes.com/smfforum/index.php?topic=118788.msg1106809#msg1106809

When the circuit allows it, this is way smaller and cheaper to implement but some may find the handling less intuitive, so good labeling is key.

You can implement this electronically with a CD4066 switch + CD4024 ripple counter + rotary impulse switch. But then you need as many diodes as position indicators as you have positions (max 16 in this setup) and it is not completely trivial to tailor this to a specific application. But I'm pretty sure it's possible. Anyway, two toggle switches is much easier.

Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

ElectricDruid

Quote from: anotherjim on November 13, 2017, 05:46:53 AM

Taiwan Alpha 1p 12t. PCB mount.

My biggest beef with these is the amount of "waggle" in the shaft. I think there's even a parameter for it in the data sheet measured in mm or degrees off-centre or something. They feel cheap and flimsy, even if they're not. Compared to the nice solid feeling of a Taiwan Alpha pot, they're not even close. I couldn't put them on the same panel together. It'd be like night and day.

Tom

thehallofshields

Quote from: Fancy Lime on November 15, 2017, 11:24:57 AM
One thing I would ask myself if I thought I needed a 7 position switch would be: Do I, though? Most applications for this sort of switch are for selecting a range of caps for tone control or something of the sort. A 9 position rotary switch can often be replaced with two 3-position toggle switches if the cap values you need can be approximated by nifty addition of parallelized caps. Ive done this sort of thing here:

http://www.diystompboxes.com/smfforum/index.php?topic=118788.msg1106809#msg1106809

When the circuit allows it, this is way smaller and cheaper to implement but some may find the handling less intuitive, so good labeling is key.

You can implement this electronically with a CD4066 switch + CD4024 ripple counter + rotary impulse switch. But then you need as many diodes as position indicators as you have positions (max 16 in this setup) and it is not completely trivial to tailor this to a specific application. But I'm pretty sure it's possible. Anyway, two toggle switches is much easier.

Andy

Interesting question. I didn't mention my end-goal: I'm looking to tap all 7 outputs of the CD4024.
Besides the 1P7T being a space hog, my big concern was that 8 wires connected to 9V square-wave outputs would create a nightmare of noise / ticking.

Fancy Lime

QuoteBesides the 1P7T being a space hog, my big concern was that 8 wires connected to 9V square-wave outputs would create a nightmare of noise / ticking.
Very possible. I've had a similar problem with the CD4024. Padding down the outputs a bit helped. And if it does not interfere with your design, run them through some lowpass too. Reducing the operation voltage of the 4024 may help as well.

Ok, so for your application the "two toggle" variant is not an option. Bummer. And electronic switches will struggle when being hit with a 9V square wave.

Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

ElectricDruid

Two toggles would be out of the question, but three toggles would do it. You could use each toggle to select the binary code on a 4051 hooked up to the outputs of the 4024, but that's pretty daft. Better would be to have each toggle select either the input or the output of a flip-flop, and then pass that signal to the next flip-flop. This would give the same result, but without actually using any analog switch chip at all.

Now I'm trying to think of a chip that includes three flip-flops to keep the whole thing in one IC! SN74LS292 or 294 would do it I think, but are massive overkill.

Tom