Need ideas for a looper relay

Started by Kevin Mitchell, November 18, 2015, 11:02:40 AM

Previous topic - Next topic

Kevin Mitchell

Instead of asking on the relevant project thread I thought it would be wise to start a new one for this question alone.

So I've been trying to fix up ideas/methods for switching the orientation of effects in an a,b,c-h (8 channel) looper. The easy way I can go about the looper is by designing a 2P2T circuit for each effect to punch in but this will not deal with the orientation for it would be "hardwired". So the "easy" way to solve this one would be to use a 2P8T relay. Preferably not an expensive relay part but perhaps a logic based circuit instead. Also I'm trying to limit each effect/switching module to one control pin on the micro controller. So ideally each switch throw would be triggered by logic or other means from one pin of the controller.

Any ideas? There may be more conventional ways to go about this - so please enlighten me.

This question is in regards of the luxury of a looper effects orientation to be controlled by a micro controler via logic or other. For 8 effects to choose/shuffle in the loop.
  • SUPPORTER

R.G.

It's a more complicated issue. See http://www.geofex.com/article_folders/fxswitchr/fxswitchr.htm

2P8T relays exist, but they're not what you're thinking. They're actually more like rotary switches with solenoids pulsing a ratchet mechanism to turn them to the desired position. If you're on position 2 and want to get to position 6, you pulse them 4 times, waiting each time for the time needed to move to the new position before pulsing them again. Normal relays have only two throws, with a variable number of poles.

The much simpler electronic way to do this is with a crossbar switch. Crossbar switches have a certain number of inputs and outputs, and they can connect any input to any output. I once designed up an any-order switching network for effects using some Mitel 8 x 8 crossbar video switches. Worked, but the programming to "unwrap" the native setup for changing orders was complicated.

You can build a crossbar switch out of rotary switches (that's what the geofex article is) or build it up out of an array of single-pole, single-throw relays, like maybe reed relays, or from CMOS switches. The CD4051 one-to-eight multiplexer switch comes to mind.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Kevin Mitchell

#2
Hey thanks R.G. you're a blessing and a legend. I'm trying to avoid any rotaries or other mechanical switches. It needs to comply with the micro controller and saved presets.

I keep going back to an idea of an 8 channel multiplexer IC used in sequencers to achieve a 1P8T kind of switching. So per effect I would need 2 of these ICs for the inputs and outputs. At <$0.5 USD that isn't so bad.

If you could, please explain how one would go about using a CD4051BE as a 1P8T switch with one logic control for the throws. I assume it would work similar to your CD4053 switching - 3P2T.

Not yet adapted to these logic ICs and how they function though it seems very simple based off of the sequencers around.
  • SUPPORTER

Kevin Mitchell

Am I wrong to assume a CD4017 would function similar to a CD4051? One's a decade counter and the other is a multiplexer - both are used seemingly the same for sequencer switching.
  • SUPPORTER

slacker

Yes you're wrong to assume that :) They're completely different. The CD4017 is just a counter, it's outputs can only go high or low you can't feed a signal through it. The CD4051 has one input and eight outputs or eight inputs and one output depending on how you think about it, you can feed signals though it, it's an electronic 1P8T switch. The CD4017 can only count in sequence the CD4051 can switch between the eight outputs/inputs in any order you like.
So you can make a sequencer with either one but for what you want to do they're not interchangeable.



Kevin Mitchell

Thank you kindly.

That's what I figured. Both could be used - but one is sequenced sp10t and the other is more of a free-switching sp8t.
  • SUPPORTER

mth5044

Quote from: Kevin Mitchell on November 19, 2015, 03:32:21 PMBoth could be used - but one is sequenced sp10t and the other is more of a free-switching sp8t.

Nope

Quote from: slacker on November 19, 2015, 03:28:07 PM
Yes you're wrong to assume that :) They're completely different. The CD4017 is just a counter, it's outputs can only go high or low you can't feed a signal through it.

Kevin Mitchell

Quote from: mth5044 on November 19, 2015, 05:10:08 PM
Nope

Didn't catch the part about not able to feed signal through the 4017. But in theory it would work the same for a single pole v+ switch is what I meant.
  • SUPPORTER

R.G.

There is a difference between an analog switch and a logic gate. Logic gates, like the CD4017, are designed to never output anything other than a 0 (very close to the chip's negative power supply voltage) or a "1" ( very close to the chip's positive power supply voltage); as little as possible is allowed to be the very fast slope between the two levels. In logic chips, any voltage on an output other than a 0, a 1, or the very fast transition between them, is a flaw to be designed out. Even if you drive an input with an analog voltage, what you get on a logic output pin is NOT analog signal. Some chips do nothing, some produce ragged, rail-to-rail random signals, and some oscillate at very high frequencies, or all of the above depending on the analog signal level.

Analog switches are just that - they let through an analog voltage between two pins on the chip. The selection logic inputs on *analog* multiplexers like the CD4051 are designed to accept logic (i.e. 0 or 1 levels) inputs, and then make an analog connection between the selected pins, open everywhere else.

They are fundamentally different. The CD4017 will not work anything like the CD4051. Both cannot be used for analog multiplexing.

Their functions are even different. The CD4017 is a counter. It's only (signal) input is its clock input. The counter comes up in some state when voltage is applied. From there on, each 0-to-1 edge on the clock input makes the outputs count up with logical values.

The CD4051 is a digitally-selected switch. It has three control inputs, A, B, and C, one analog in/out pin and eight out/in pins. If you consider A, B, and C to be a binary coding of the numbers 0 through 7, then putting a number on them causes the in/out pin to be *analog* connected to the corresponding out/in pin. A 010 on C/B/A (i.e. the binary coding of decimal number 2) causes the in/out pin to be connected to the #2 out/in pin by a few hundred ohms. The other out/in pins look like infinitely high resistances.  Changing C/B/A to 110 (binary for 6) causes the in/out pin to connect to out/in #6 by a few hundred ohms and out/in #2 is now essentially an open circuit.

They are fundamentally different.

I highly recommend you find and read "The CMOS Cookbook".
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

mth5044

I did a few sketches and using 8 4051's, you could only do a 7 effects switcher since the final pole needs to be for the output (see RG's switcher article). It's also a LOT of wiring. It'll be a big layout, but I guess you'd have a lot of space. For 7 effects, you'd need 8 IC's, each needing 3 information paths from a ucontroller, making 24 outputs necessary. This is possible with a PICAXE 40X2, which has 33 outputs.

You'd also need to consider how you'd identify what number each loop is. One of those single digit displays on each loop would be cool. You could have an up and down pushbutton next to each to set what number in the line up it is.

PRR

> use a 2P8T relay. Preferably not an expensive relay

You are thinking like the telephone engineers a century ago. They used many-throw relays. As R.G. says, rotary ratchets.

They were used by the millions. They were VERY expensive (even in car-load lots). They gave trouble. They were so noisy you could hear them outside the building. First the crossbar mechanical switch, then the AT&T ESS made ratchets functionally obsolete and millions were scraped. I have not seen even a small (non-telco) one in decades.

An advantage of the ratchet switch is that it had "one" input wire. If you wanted line 7, you pulsed clik-clik-clik-clik-clik-clik-clik. (IIRC, reset was a long pulse that let a spring fling it back to the rest stop.) While there are timing issues, your 8-pin CPU could manage that. Speed may be an issue, if you recall long-distance dial-up from the 1960s you may know.

CD4017 counter (10 outputs only high or low) +plus+ 8 (or 10) units of CD4066 (SPST) would make a telco-like ratchet switch. One input, pulsed a number of times, counts-up which selects a '66 to enable. Electronic switching can go a million pulses a second, so 7 pulses is "instant" to human ears.

The '66 and friends are single supply. When logic and signal have to mingle, this can be distressing. You don't want to cut the negative swing of the signal, the logic supply may be smaller than signal swing, so you wind up level converting both logic and signal. The 4051 is almost always a better path, because the logic "zero" reference can be nailed between the analog rails, allowing all analog to be zero-symmetric.

A 3-bit counter could take count-pulses and drive the octal code input of a 4051.

What is a 3-bit counter? Well, this is so basic I forget, but I have the books.

I strongly agree about "CMOS Cookbook", only adding that the earlier work "TTL Cookbook" and even the even earlier work "RTL Cookbook" are worth reading. The TTL book was VERY widely-read when the CMOS book was being prepared and Don may have seen CMOS as an extension, not a standalone (though it stands OK). All three families, the logic is the same. Power suckage and fan-out vary; also some MML (Mickey Mouse Logic) tricks work better on one family than another. And progress allows much more complicated one-chip solutions in CMOS than RTL.

> It's also a LOT of wiring.

Agree.

> 40X2, which has 33 outputs.

Odds are he could do it with far fewer CPU pins, by adding more "decoder" chips between CPU and switches.

There is also a line of long shift-registers. Going back to 1970, you pulse 8 serial bits in one pin, then toggle latch. Those 8 bits are now presented parallel on 8 pins. They were usually cascadable, so you could wire 8 together, blip 64 times on ONE pin of the CPU, and control 64 switches.

Taken to extreme there are 2-wire and "1 wire" bus standards which control about everything in my car over one wire, or at a lesser robustness, all the peripherals of a micro-CPU.

And of course USB is a serial interface with very few pins and amazing data ability, though the USB protocol to support strange devices which come and go randomly is a lot of overhead. 
  • SUPPORTER

Kevin Mitchell

Quote from: mth5044 on November 20, 2015, 12:08:04 AM
For 7 effects, you'd need 8 IC's, each needing 3 information paths from a ucontroller, making 24 outputs necessary. This is possible with a PICAXE 40X2, which has 33 outputs.

You'd also need to consider how you'd identify what number each loop is. One of those single digit displays on each loop would be cool. You could have an up and down pushbutton next to each to set what number in the line up it is.

I'm always drawing out switching ideas;


For the interface control I plan to use 2 spst switches or 1 per effect. Not sure yet but there's room for ideas.
If I can find a chip that could decode binary from 1 digital control of the micro controller and output 3 signals to to the 4051 I will be set. Would only need 1 control pin for each switch or less? - depending on such chips.

There's so much useful information here this is awesome. You guys are great.
  • SUPPORTER

mth5044

I tried drawing the whole thing out as well, but settled on the numbering system you did as well. It turned into a bowl of pasta after the first two switches  :icon_lol:

PRR - do you have an example of a decoder chip that could be used to take a single line of pulses to the three binary thingers that the CD4051 needs? I don't know a lot about this stuff, but that seems worth while to learn.

slacker

#13
You could use something like a 74HC595 http://www.nxp.com/documents/data_sheet/74HC_HCT595.pdf which is a shift register like Paul mentioned earlier, this has eight outputs and you can chain them together to get as many outputs as you need, with something like this 3 or 4 pins on the micro can control as many CD4051s as you want.

Here's a video that shows how they work, the 16 LEDS in the video would be the connections to the control pins on the CD4051s.


mth5044

Thank you Slacker! I appreciate all the information!

R.G.

This is an updated version of the crossbar.

http://www.analog.com/media/en/technical-documentation/data-sheets/AD75019.pdf

This one does 16 in, 16 out, and with proper programming can put any 15 mono effects in any order (one of the ins and one of the outs are the input and output jacks). It can be loaded in 52uS and contains its own serial/deserializing logic so the uC needs only three pins on the controller uC. It can be logically extended to make 16x32, 32x32, etc. arrays.

The entire trick in applying this is to figure out the user interface so the user can somehow tell the chip what to do. The guts of sending signals to the array and making it do the signal swaps is the easy part.

It works from as little as 9V, up to +/-12V. It costs between US$20 and $40 depending on quantity.

Much cheaper than that many relays.   :icon_eek: 
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

R.G.

I was interested to see what could be done with the AD75019. Here's one thing: an 11 in/out, any order effects switcher:



Before you go off ordering the chips, note that (1) the power supply setup is a very special case, and won't work for just any power supply (2) there is a huge amount of work to get those deceptively simple "Sck", "Sin" and "Pck" pins to work right from a microcontroller, and (3) implemented properly it goes down to 2x2 and up to 15x15, not counting one in and one out for the input/output jacks.

It's funny - sometimes feel like I'm living in an amazing paradise. All the stuff that was conceptually simple but out of reach for circuit complexity reasons keeps appearing as single chips. Tee hee!  :icon_lol:
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

mth5044

That. Is. Awesome.

They even have a through-hole version of it.

Time to google-translate that Loading Data information. Oh wait, that's English?  :icon_lol:

Thank you RG.

R.G.

Well, as I said, don't run off and buy chips yet.
(1) I've only seen this as a datasheet. What's inside may or may not have some oddities and "fish hooks" in the actual implementation.
(2) I made some assumptions about the chip and its power supplies that may or may not be true on an actual operating board.
(3) Oddly enough, the Chief Assumption still holds: the box, jacks, switches, cables, wiring and stuff other than electronics in general will cost more than the chips.

and there is a lot of work to do to figure out how to mount this all up in a form factor that can be used. I would start with rectangular aluminum tubing in about 2" by 6" section 1/8" thick for the mechanical rigidity, and then figure out how to mount the (many!) footswitches and jacks needed, and both what kind of display to mount on the box so you could tell what was what as you played it, and how to make the display work.

Then there's that whole microcontroller programming thing. There are a couple of hidden issues in the programming, too. I would, for instance, write the programming to make the PCB easy to lay out. (That one is to incentivize all you budding copper-slingers!   :icon_lol:  )

Having a cheap crossbar switch is only part of the battle.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Voltron

Hello, I dont want to derail the subject but regarding using CMOS logic chip for switching analog inputs and outputs is there any concern with NOISE?

My question might be too uneducated perhaps but I was studying this:

http://www.aronnelson.com/gallery/main.php/v/KHE/Boss_SD2_schematic.jpg

Uses a TC4011 quad 2 in NAND gate (CD4011) and JFETs for channel switching. Seems to me that could be adding noise or raising the noise floor when increasing the gain. Is that possible?

Well, I thought the original OP could be interested, althou seems like things are more into digital here. Sorry again if this is off topic. And good luck to OP with his project.