I'm not a DIYer, but I know there are a lot of smart people here who are. So I'm wondering if anyone has ideas for this situation:
I have 2 fx loops in my pedalboard, and a box with a single footswitch to switch between the two. When I switch the loops, I also want to switch the channel on my amp, which I currently do with the amp footswitch. I'd like a box with a single footswitch to switch both at the same time. These exist, of course, but here's the rub: when I step on my current fx loop switch and amp footswitch at the same time (essentially mimicking what these boxes do) I get an unacceptably loud pop. I believe this occurs because one of the fx loops is very high gain, and one of the amp channels is very high gain. (These are never engaged at the same time - if they were it would tear your head off.) If I turn down the gain on either the high gain fx loop or high gain amp channel, the pop is acceptably quiet.
Is there a way to build a box to switch the fx loop and the amp channel and avoid this pop? I know that if the fx loop switch occurs just a fraction of a second ahead of the amp channel swtich, there is no pop. My ignorant question is, is there a way to create this delay within the switcher box? I've looked around for a MIDI footswtich that could send a sequence of Program Changes with a delay between, to a hypothetical switcher which receives MIDI, but I haven't found one, and even if I did, it sounds like a messy, expensive solution.
Any thoughts?
It sounds like your problem could be solved with a relay. If you have spare contacts available on the footswitch, let it operate a relay that replaces the amplifier footswitch. The relay takes a fraction of a second to pull in, so the pop should be gone before the channel switches over. You would have a DPDT relay if you need another set of contacts to operate an indicator for the amplifier. If you have a DC relay coil, the flywheel diode used around the relay coil will delay the relay dropout, so you can have it both ways - a relay that switches after the footswitch for both turning on and turning off. The relay can be powered from the ampifier so you do not need any extra relay power in the stompboxes or their power supply.
BTW, welcome to the forum!
Thanks for the welcome, and thanks for the reply! I have no experience with these things so would you know anyone that could and would build such a box? One detail I left out - to avoid ever having the high gain loop and high gain amp channel engaged at the same time, when switching to loop 2 and amp channel 2, the fx loop switch must come first. But when switching to loop 1 and amp channel 1, the amp channel switch must come first.
I can't think of a solution to this. The only thing I could remotely imagine is some sort of sequenced relay switcher. Sounds way too complicated for something that seems simple but is not....
A Microcontroller may seem overkill but it could easily do this.
You would use two relays, one for switching loops (I assume one is always active?) and one for the amp. When the switch is detected, you can switch one relay, then pause before switching the next one.
The advantage is that you can play around and configure the pause; you could even control the delay with a pot.
A PIC can be had for $1 - $3. I got a programmer for $7 on eBay. The coding is not too hard, I could help you with that.
Everyone, thanks for the suggestions. I know nothing about electronics, so I would need someone to build the entire box, including programming the microcontroller, etc. Anyone out there that could and would build this?
BTW, I did find a convoluted solution. I could send MIDI from a MIDI footswitch to a MIDI Solutions Event Controller, a small box which maps MIDI events. That box would send Program Changes with filler MIDI events to create a delay. I would connect this to a MIDI controlled fx and amp switcher, something like the Payne Labs K-Switch. But I'm always wary of complex solutions to simple problems...
If I had to try this sort of thing, I would go with an arduino board. It seems like something that the arduino should be able to do quite easily. But I haven't gotten one yet. There's tons of support!
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1196698219
Wow! Source code too!!!
http://www.glacialwanderer.com/hobbyrobotics/?p=9
Arduino is a good choice for a beginner. However, PICs are cheeeeeeeeeap!!! :)
This might be a fun little community project. I could program the PIC, if someone could do the relays... or I have a few 4053's we could use. Can 4053's switch an amp?
tysonit, that would be fantastic. I would, of course, be happy to pay for a working box.
Nah, no paying! Just for parts/postage.
It just sounds like a fun, interesting little project that's fairly simple. It would be a learning experience for me too.
Would you want battery power or could you plug it in to a 9v adapter?
I might knock up a schematic this week.
Anyone else want to help me?
Wow, that would be amazing if you could come up with a box! I've been struggling with this for awhile. At minimum you gotta let me buy you a drink! Uhh.. wait.. you're halfway 'round the world. Hmm...
What I need exactly is a box with jacks for two fx loops, a jack for amp channel switching, in/out jacks, plus a single footswtich which does this:
When pressed, it switches the amp channel, delays for some period, then switches to fx loop 2. When pressed again, it switches to fx loop 1, delays for some period, then switches the amp channel. Note that the order of the switching reverses on each press.
Two colored LEDs to indicate which loop is selected. Ideally blue or green for loop 1, and red for loop2.
Ideally it would have a polarity switch, which determines which amp channel goes with which fx loop. If this isn't possible, then fx loop 1 should go with the amp clean channel, and fx loop 2 with the drive channel.
The amp I'll be switching is a Hot Rod Deluxe. I dont' know the exact specs for the switch, but I know the following one works with this amp, if that helps. If you need more info about it let me know.
http://www.loop-master.com/product_info.php?cPath=29&products_id=160
I'm not sure how long the delay should be. 250ms? Someone suggested a pot to give variable delay, but I don't want to make this too difficult for you. Otherwise I guess we would decide on a delay time, and if that turns out to be too short or too long, I send back the unit and you make the change to the code? I dont' know how involved all of that is.
I'll be putting it into a crowded pedalboard, so smaller is better, but I know I can't be picky. Whatever works for you.
No need for a battery, just standard BOSS 9vDC center negative.
Here's an example of exactly what I'm looking for, without the delays of course:
http://www.loop-master.com/product_info.php?cPath=24&products_id=81
Let me know if there's any other info I can give you.
Thanks!!!!
Oh, and if you feel like going crazy and putting on a decal, your name, logo, whatever, please do!
Yep, that's what I was thinking. It was me who suggested the pot for delay time :) I think it is a good idea to be able to change it.
A switch to change polarity is also a good idea I think. Would you want to just switch between clean/drive? Not use the 'More Drive' channel? (I have a HRD and never use that channel).
The rest should be straight-forward. Keep in mind I am only just designing my own switcher so the design will need to be checked by some other forum-ites. Other than that, it should be fun! It may even work :)
Good to know you have an HRD. I never use More Drive either, so yes, I just want to switch between clean and drive.
OK, here is a first-pass schematic.
(http://edieandbup.com.au/mjlee-fx-amp-AB-switch_l.jpg)
A full size image is available here: http://edieandbup.com.au/mjlee-fx-amp-AB-switch.jpg
The basic operation is explained in the above posts and in the schematic so I won't reiterate it here.
Regarding the schematic, I think I have done the biasing right. Could someone wise and knowledgeable please check over the circuit and point out any heinous errors?
One thing I'm not sure about is whether a relay is required to switch the 18v AC coming from the amp for channel switching. I know very little about AC circuits. Can you just switch it with a normal relay?
Please comment!
> One thing I'm not sure about is whether a relay is required to switch the 18v AC coming from the amp for channel switching.
That is a truly brain-bending switch scheme.
Open-circuit, there is large voltage swinging both ways.
To make something happen, you short a diode across it. One way gives Channel, the other way gives MoDrive.
You may also put an LED in so the pedal indicates which diode-command(s) is/are active.
With a robot foot, relays are certainly safest/simplest.
(http://i.imgur.com/3g3vC.gif)
The LEDs are optional but may be useful in bebugging.
The whole MoDrive side can be omitted if never used.
There's potentially 38VAC and 31mA loose in the cable, though normal operation shows lower average voltage. Relay contacts ought to be at least this much, probably 50V 50mA nearest common rating. The current isn't really AC nor DC. I would not worry too much about that. I would favor some "industry standard" footprint so that 3 years or 30 years out replacement won't be a big headache.
The relay coils, of course, are 5V or 24V or 117V, whatever your logic or coil-drivers like.
I suspect there IS a way to do this without relays. However the reverse polarity (AC) makes simple transistors do a wrong thing. And the relays give complete isolation which is a fine feature.
You're probably well aware of this, but here's something I found elsewhere that I thought I'd mention: "this AC signal (from the amp footswitch jack) and it's ground that goes to the pedal is very noisy and should be kept away from audio signals."
Quote from: PRR on January 27, 2012, 07:18:23 PM
I suspect there IS a way to do this without relays. However the reverse polarity (AC) makes simple transistors do a wrong thing. And the relays give complete isolation which is a fine feature.
Cool, thanks prof. I was laughing furiously at this artful thread (go RG!) : http://www.diystompboxes.com/smfforum/index.php?topic=74885.20
Out of perverse interest, I wonder if reed relays would work here? I like RG's idea of wrapping them in foil for shielding... Do you think it's worth trying them out for audio switching as well? I just like the form factor... :)
Quote from: mjlee on January 27, 2012, 07:37:07 PM... very noisy and should be kept away from audio signals."
I think it should be OK, maybe that part of the circuit needs extra shielding. PRR mentions above that shielding is one of the advantages of a relay.
You could use a low slew-rate switcher such as the Boss / Ibanez circuit shown here:
http://geofex.com/Article_Folders/bosstech.pdf
which suppresses switch popping by gradually transferring from one source to another. You can add resistor / capacitor / diode networks at the flip-flop outputs to obtain the correct priority for switch actuation. No need for programming.
You can also use vactrol (LED / photoresistive) switching, diode switching and CD4007 low slew-rate switching. For the latter, check the following datasheet figure 1:
http://pdf1.alldatasheet.com/datasheet-pdf/view/11942/ONSEMI/MC14007.html
and eliminate the inverter connections to pins 6, 8 and 13 and drive pins 3 and 10 directly from a flip-flop as presented in the geofex article above. Note that this site has some Boss pedal schematics scattered all over in various locations but a complete compendium is here:
http://www.generalguitargadgets.com/tech-pages/45-schematics/55-boss-schematics
so you even have the parts values. Almost any small-signal NPN transistors will do for the flip-flop. There is nothing critical in these circuits except that for the diode / JFET circuit used in the Boss pedals, the JFET must be low gate-to-source cutoff and the diode must have lower leakage current than the JFET gate. (One more reason to like the CD4007 / MC14007 circuit.)
Quote from: amptramp on January 27, 2012, 10:12:39 PM
You could use a low slew-rate switcher such as the Boss / Ibanez circuit
Indeed, that would work. However, as an ex-software developer I much prefer writing code to wiring components, the latter at which I am only a beginner. I just think that writing 'set_pin(SW_PIN); delay_ms(SW_DELAY); set_pin(AMP_PIN)' is much easier than figuring out all those components.
For me anyway. As R.G once said, "one man's fish is another man's poisson", which made me laugh.
Could someone please comment on the schematic itself? Do I have the 4053 wiring correct?
Quote from: tysonlt on January 30, 2012, 07:45:48 AM
Could someone please comment on the schematic itself? Do I have the 4053 wiring correct?
I did a quick look. It looks OK. The 4053 needs its I/O pins biased to half its supply by bias resistors, then capacitors to block that DC from the 'outside' levels, and a pull down to the 'outside' DC levels. However, I believe the capacitor polarity is incorrect for X0 and X1 pins.
You may also have problems with logic levels. The PIC is running from +5 and the 4053 from +9, but you're tying the control pins (CMOSA/B/C) between the two. The PIC can't raise the control pins to a valid logic level for the 4053. It only goes up to a bit over half way, which will probably drive the 4053 nuts for some values of 4053. This really needs a logic level translator. ...er, ask me how I found this particular issue out. :icon_lol: :icon_redface:
There is a yet more complicated way to hook up the 4053 that would avoid the logic level translation problem. That is to run the 4053 on +5 and ground, and supply -5V to the 'VEE' pin. The datasheets talk about this in some detail. I tried this once, didn't like the complexity of a second power supply, and just used logic level translators.
Hi RG,
Thanks for your comments, they are appreciated.
I think I *FINALLY* understand how that biasing circuit works! In terms of water pressure, the bias resistors raise the pipe pressure around the cmos to 4.5, but the cap is like a pressure valve that the stops that 4.5v from flowing back through the circuit. The pull-down resistor then drains all the water on the other side of the capacitor away to ground. Then whatever water pistol guitar signals that come through will hit the charged cap and create little tremors in the 4.5v pipe, resulting in a nice waveform centered around the 4.5v mark. If I am correct then please tell me and put me out of my misery! :)
(I will of course use the geo article as a cookbook, but I would like to understand everything I put in my looper design, or at least know why it's there.)
Ha, about the logic levels, it sounds like you have a fun war story! Please share! I had read that modern cmos chips could automatically translate their logic levels. I know the MAX chips do, but not sure about the generic ones. To do translation, would I create two voltage divider networks, one for each logic state, and then tie these references to the cmos pins via a PIC controlled transistor? (If so, that would be my first ever independent circuit design!)
I am interested in using bipolar power actually. I have another thread asking how to get bipolar 5v from either a 12vdc adapter or a 9vdc 1spot. I note there that some on this forum feel that running the guitar signal at 0v is somehow friendlier to pedals. But... Doesn't the dc blocking cap and pulldown resistor on the input/output lines bias the signal back down to around 0VDC anyway??? Have I understood that correctly?
Thanks
Power supply reference for others in the future:
http://www.diystompboxes.com/smfforum/index.php?topic=95816.msg831175.msg#831175
Quote from: R.G. on January 30, 2012, 08:11:55 AM
I believe the capacitor polarity is incorrect for X0 and X1 pins.
Ah, and I think I understand why. They have to hold the 4.5v pressure on the cmos side. I think I get it! ;D
LOL, fourth reply to myself... :icon_redface:
I checked the datasheet for the TI CD4053 and it says: "Logic-Level Conversion for Digital Addressing Signals of 3V to 20V (VDD-VSS = 3V to 20V) to Switch Analog Signals to 20VP-P (VDD-VEE = 20V)". The block diagrams show an internal logic-level conversion stage.
So does that mean the PIC can directly drive the 4053?
> does that mean the PIC can directly drive the 4053?
Depends what "heights" the three pins of 4053 are at.
You are the draw-bridge man, I am the harbor-master. We have a simple command scheme: I kick your foot to open the bridge, head-butt you to close the bridge. But if I'm 5 foot and you are 9 foot, I can never give the order to close the bridge. And if you are 18 foot and standing 9 feet below deck, I can't even open the bridge unless we re-define "open" as a kick in your belt. (Aren't you glad we don't work together?)
As R.G. says, you can run 4053 with -5V, zero, +5V, and it will understand a CPU on zero and 5V.
This means a small negative supply just for the self-leakage of 4053 internal drivers.
If your main power is delivered as 5V DC, then finding a -5V supply probably means a vibrator. Even if supersonic, this tends to get mixed into the audio and cause audible beats.
Another way is to power 4053 on zero and +5V. CPU interface is fine. However audio can not exceed 5V peak to peak. While gitar isn't over 2V p-p, as you note we live in a world of 9V boosters. We would like at least 7V p-p headroom in the 4053 audio path.
If you drop the too-smart CPU/PIC and wire raw CMOS logic, it can all run on 9V (even 15V) and interface fine.
And another way is 5V logic, 9V analog-switch supply, and a level converter which will throw logic over 2.5V all the way to 8V or 9V to reliably slam the 9V switch control inputs. If logic inversion is acceptable (flip your code), a Darlingtor or MOSFET with 2 resistors (or simple BJT with 3 resistors {2 if you're really cheap}) will do. There is a CMOS chip with separate power feeds for input threshold and output levels, give it 5V and 9V. 4504 is one, though far more complicated than I remember.
I like the sound of the Darlington etc. level conversion. Time to Google... Is there a recipe name for this technique?
A uC may seem excessive here, but this project is a practice run for a midi footswitch that also controls ten cmos loops. So I want to get the pic/cmos interface right.
Logic level conversion is an old, old problem, from back in the day when logic came in many flavors. Any time you used chips from more than one logic family, you were in for doing logic level conversion between chips.
I dug through the description of the 4053 in some detail just to be sure. Paul is right - any conversion the chip does only allows you lattitude for varying voltages on Vee, not on Vdd and Vss. So with a PIC on 5V, you can only get 0 and 5V outputs, and you have to somehow arrange the 4053 so it thinks that is the full swing between Vss and Vdd.
The way I nearly always use is Paul's cheapo bipolar and two resistors. I use a 100K pullup on the control pins to Vdd (9V in this case) and an NPN to ground. This is nearly always a 3904 or - yep! - a 5088. These are working at nearly full DC gain pulling down a 100K, and in any case you can run them at a forced gain of under ten with a 100K resistor in series with their base from the PIC. The PIC itself pulls the base down to 0V when it's trying to turn the transistor off, so I dispense with the third resistor. This inverts the output logic - when the PIC signal is down, the transistor collector is up, and vice versa, so it requires you to mentally invert when doing your programming. You can also use a small signal MOSFET like the BS170 or 2N7000 directly with only one resistor, the pullup on the control pin of the 4053. It's a bit more expensive way to save one resistor.
There is some advantage to running an all-0V signal ground level. However, there's a hidden problem too. Opamps with their + input held to ground by a biasing resistor and a DC gain of unity do not put out really, truly 0V on their output. It's off by as much as the input offset and any biasing offset errors. Usually for the TL072 family, this can amount to as much as 15mV or so. That's probably not an issue by itself, but when switched by a CMOS switch, it's not constant. They'll switch between the opamp's offset and another DC voltage, usually really, no-fooling, their bias voltage. That puts a 15mV step in the signal path when you switch. When this is then coupled into a mega-gain distortion pedal, it can become huge.
In that case, using a capacitor after the opamp, even when it's nominally running at "ground" prevents this switching transient.
Thanks so much for your reply R.G. I have learnt a lot from this already!
Quote from: R.G. on January 31, 2012, 11:25:57 AM
This is nearly always a 3904 or - yep! - a 5088
At this stage I am not familiar with transistor models, but I have some 2N5089 NPNs coming from Tayda. Will these do? I really like the simplicity of this solution.
Quote from: R.G. on January 31, 2012, 11:25:57 AM
...it requires you to mentally invert when doing your programming
No problem. Code must always change to mimic reality, never the other way around. That's why it's called soft! :D Using defines makes this a non-issue. If we abstract the actual switching code into a function (ie, cmos_on(), cmos_off(), etc) then we don't have to worry about flipping pin directions.
Quote from: R.G. on January 31, 2012, 11:25:57 AM
There is some advantage to running an all-0V signal ground level. However, there's a hidden problem too.
I am interested in those advantages. Would I still use the biasing solution as shown in the geo 4053 article? I am happy to do the biasing, I'm not trying to reduce that complexity so much as trying to find the optimal way to power a uC and the CMOS switches. The question is: do the advantages outweigh the 'hidden problems'?
Here are some 'virtual ground' circuits I found: http://tangentsoft.net/elec/vgrounds.html. I am getting a bit out of my depth there!
Quote from: R.G. on January 31, 2012, 11:25:57 AM
In that case, using a capacitor after the opamp, even when it's nominally running at "ground" prevents this switching transient.
In my design here I am not using any opamps, but I guess I have to account for opamps in the various pedals... In my design, there is a 2.2uF cap on guitar in and out, as well as on the send and return of each loop. Would it *hurt* if I left these in, even for a bipolar power setup? Do you think this would mitigate any problems of running at 0V signal?
At this stage I am leaning towards using +9v for the CMOS with biasing to 4.5v, and using the 'cheapo bipolar' for level conversion. R.G., could you please elaborate on what the advantages of running at 0V ground signal are, for a simple switching circuit?
Thank you all so much for your input. I'm starting to feel like a 'real'... something :)
Latest schematic:
1) DC blocking caps on X0,X1 reversed as per R.G's recommendation
2) Logic-level translation added as per R.G, Paul's recommendations
(http://www.edieandbup.com.au/mjlee-fx-amp-AB-switch_m.jpg)
and a url of the full-sized image: http://www.edieandbup.com.au/mjlee-fx-amp-AB-switch.jpg (http://www.edieandbup.com.au/mjlee-fx-amp-AB-switch.jpg)
Question: if I stick with +9v for the CMOS, is there any need for a regulator when using a regulated 9vdc wall-wart? Would I maybe just use a 9v zener?
I notice one other thing. Although it may work OK, putting lots of current through the 4053 is something I don't like to do, on grounds that it may have side effects inside the chip. If I were doing this, I'd do the LED switching outside the 4053, not with section Z. You have unused pins on the PIC, which can drive LEDs directly. I'd put D1 and D2 on PIC pins with current limiting resistors (N.B. Yeah, I know they say PICs can drive LEDs without resistors) and not on the 4053.]
Quote
Question: if I stick with +9v for the CMOS, is there any need for a regulator when using a regulated 9vdc wall-wart? Would I maybe just use a 9v zener?
If you have a regulated +9V output to drive this, you don't then need a second regulator nor a 9V zener.
However, good design practice extends beyond just getting things to work. I includes providing for the forseeable misuses and failures too. The CMOS chip is good for higher voltages than 9V, regulated or not, and so is the 5V regulator. That's good. It will live under the conditions of some junior genius having read on the internet that supplying 18V to your 9V pedal will make it sound like flying saucers or incoming asteroids or something. We get this all the time and preemptively design against (... not
for... ) it. But you're pretty certain to get the wrong polarity voltage connected to it too. If it were me, I'd put polarity protection on the power in. I'd also put a BFC on the incoming 9V, maybe 100uF/25V, and a 0.1uF ceramic to help eat some of the RF coming from economy/random switching wall warts.
I would also worry about RF rejection on all the signal ins and outs as well, and about RFI generated in the PIC. The solutions to those will be highly layout-specific.
Good call re the LEDs. I was wondering about that actually :) I would be controlling the LEDs with a shift register in the full midi project.
OK, so I just put those two caps across the incoming 9v? Before or after the 7805? I will be putting 0.01uF caps across the power pins of all chips as well.
RFI is not something I have thought about. I always thought you just used a metal case, or if you're cheap, line a plastic case with tin foil! ;) I remember I had a DOD FX7 that picked up the local radio station. You could also hear the distortion effect in the background of all the clean effects - I hope I don't have that issue with the 4053's, since I will be putting pre-amped signals through them.
I will hit up Uncle Google for some rfi info.
Thanks so much R.G! :)
Can anyone out there build this box for me, given the schematic and discussion above? I would pay of course , so hopefully it could be a win-win!