A/B/Y/S Switcher and isolation for stereo

Do-it-yourself pedal building

Moderator: Ghost Hip

Forum rules
The DIY forum is for personal projects (things that are not for sale, not in production), info sharing, peer to peer assistance. No backdoor spamming (DIY posts that are actually advertisements for your business). No clones of in-production pedals. If you have concerns or questions, feel free to PM admin. Thanks so much!
User avatar
cherler
experienced
experienced
Posts: 616
Joined: Tue Oct 06, 2015 4:48 pm
Location: Dirtona

A/B/Y/S Switcher and isolation for stereo

Post by cherler »

Yooooooooooooooooooo

So I've been working on this A/B/Y/S switcher idea for a little while. The idea is mostly self explanatory, with the S standing for serial. You can choose between just A or B, A and B in parallel, or A and B in serial in either order. I'm using a momentary switch and differentiating between taps, double taps and holding to navigate all of that. Here's a video! :joy:

[youtube]http://www.youtube.com/watch?v=_CI3xx1rG4E[/youtube]

So on the far left is A in, closer on the left is A out, and then B's are the same on the other side. When the lights are on that means it's connected directly to either the main in or out. Everything works so far, and I'm really happy with it!

Now I just have to actually get guitar going through it. I'm super comfortable with microcontrollers and programming but much less so with actual audio signals, so a little help there would be hugely appreciated, and if anyone is interested in the code just let me know! :hug:

For the input I'm thinking I should be able to just buffer the signal with a TL072 and split it after that. I'm a little worried about making a ground loop out of each signal loop though, will I need isolation on either the send or receive for each loop? I know I'll need to isolate one of the outputs to keep out the crosstalk. Is there anything else I should read up on or consider? I'm also planning on drawing up a two layer PCB for this and having ground and power planes for what little help that might be for noise. The circuit as it stands is below, I left out the sziklai pairs that help the microcontroller throw the relays. Any thoughts would great, thanks!

Image
Instagram yo

Good dealin's: D.o.S.
User avatar
eatyourguitar
IAMILFFAMOUS
IAMILFFAMOUS
Posts: 3127
Joined: Sun Oct 03, 2010 12:37 pm
Location: USA, RI

Re: A/B/Y/S Switcher and isolation for stereo

Post by eatyourguitar »

buffer the input and put a transformer on each output. use plastic jacks. the trick is finding the right small signal transformer to isolate and have the right levels frequency response etc.. your amps are referenced to ground, both of them. this is why you need one or two isolated outs. I would isolate them both and have a switch to earth one through the signal cable to the amp.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF
User avatar
cherler
experienced
experienced
Posts: 616
Joined: Tue Oct 06, 2015 4:48 pm
Location: Dirtona

Re: A/B/Y/S Switcher and isolation for stereo

Post by cherler »

Thanks for the reply! So just to make sure we're on the same page here, the switch earths the output transformer to the amp through the ground connection on the cable?

Also I guess if I don't connect ground across the send and return for each loop inside the pedal then I won't be making ground loops there now that I think about it...
Instagram yo

Good dealin's: D.o.S.
User avatar
eatyourguitar
IAMILFFAMOUS
IAMILFFAMOUS
Posts: 3127
Joined: Sun Oct 03, 2010 12:37 pm
Location: USA, RI

Re: A/B/Y/S Switcher and isolation for stereo

Post by eatyourguitar »

cherler wrote:Thanks for the reply! So just to make sure we're on the same page here, the switch earths the output transformer to the amp through the ground connection on the cable?
if you have correctly setup two outputs each isolated and floating, then you can have a switch to connect one output sleeve to all the input sleeves and power ground of the ABY box.

this will give the ABY box an earth connection through one and only one of the amps. this can help or hurt noise levels so it is good to have it on a switch and use it if you need it.
cherler wrote:Also I guess if I don't connect ground across the send and return for each loop inside the pedal then I won't be making ground loops there now that I think about it...
any unbalanced audio signal requires two wires. if there is no ground then there is no voltage potential on the guitar cable. it is one floating wire.

using transformers allows you to connect the tip and sleeve of the output to a transformer through a plastic isolated output jack.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF
User avatar
cherler
experienced
experienced
Posts: 616
Joined: Tue Oct 06, 2015 4:48 pm
Location: Dirtona

Re: A/B/Y/S Switcher and isolation for stereo

Post by cherler »

Oh I see, so a switch to unisolate or isolate one of the amps. That makes sense now. I read on an older DIYstopmboxes thread that having a resistor somewhere between 1K-10K can help here too, so there's some distance between the aby ground and earth from the amp even though they can see each other. Do you think that might help?

I think I might have done a bad job describing the second part though. I was worried about ground loops being made out of each effects loop, by having ground connected inside the pedal and connected through the signal line out through each pedal in the loop. If I just leave the grounds disconnected internally though, so the sleeves on the send and return jacks only get connected through the cables going through the pedals out in the loop. So inside the pedal, the input section would have one ground plane and the output section would have a different ground plane, but once you have cables going from send to return, those two planes get connected. Or I could just isolate one of the jacks the same as the amp outputs. Am I making anymore sense?

Either way I've got plenty of stuff to work on now, thanks for the help!
Instagram yo

Good dealin's: D.o.S.
User avatar
eatyourguitar
IAMILFFAMOUS
IAMILFFAMOUS
Posts: 3127
Joined: Sun Oct 03, 2010 12:37 pm
Location: USA, RI

Re: A/B/Y/S Switcher and isolation for stereo

Post by eatyourguitar »

you could lift one of the grounds on a send and return loop but they would still be connected anyway through the pedals in the loop and it has no affect on lifting earth from anything that is earthed. ground loops usually refers to ground loops that make hum and have some energy traveling through the grounds between the devices on both the unbalanced cables and the earths of two pieces of equipment. what most people refer to as "ground loop hum" can only happen when two or more devices are on a 3 prong mains plug. if only one of the amps has a earth connection, and the pedal board power has no earth, then there is no ground loop ever. if both of the amps have earth, and they probably do, you will have a ground loop and therefor possibly ground loop problems, as soon as you connect the sleeves of the input jacks together on the two amps. depending on the amps, and the building, this may not create hum. as an engineer, you can design it so it will never create hum regardless of the amp or building. for reducing hum, the resistor might be better or worse than wiring through a switch without the resistor. as a possible safety concern, I know that the resistor is not rated to handle a mains cable shorted to your pedal board. maybe this is not important. I don't know but at least I said something. if you wire a jumper in parallel to the resistor, you can cut the jumper to add a resistor. future proof.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF
User avatar
cherler
experienced
experienced
Posts: 616
Joined: Tue Oct 06, 2015 4:48 pm
Location: Dirtona

Re: A/B/Y/S Switcher and isolation for stereo

Post by cherler »

eatyourguitar wrote: I know that the resistor is not rated to handle a mains cable shorted to your pedal board. maybe this is not important. I don't know but at least I said something.
I did not even think about that, I was just going to stick in a wimpy little 1/4W metal film resistor :erm:

Ok I think I see what you're saying. I don't think I fully understand ground loops in the sense of "ground loop hum." I thought I was avoiding literal topological loops in my ground connections. I assumed this was to get rid of inductive noise, kinda like twisting your power wires but without any real supply of current.

So as long as the power supply for the pedals and the switcher are all isolated from earth, which they are, I don't have to worry about making a literal loop out of the ground going through the pedals in the effects loop and the ground plane in the pedal? I just have to worry about the earth connections on the two amps making a loop? That would be waaaay simpler to think about. I've been trying to make sure there's just one linear path ground takes through the whole circuit, never looping back on itself.
Instagram yo

Good dealin's: D.o.S.
User avatar
eatyourguitar
IAMILFFAMOUS
IAMILFFAMOUS
Posts: 3127
Joined: Sun Oct 03, 2010 12:37 pm
Location: USA, RI

Re: A/B/Y/S Switcher and isolation for stereo

Post by eatyourguitar »

I think you understand correctly now. if everything was on batteries where would 60Hz hum come from? it comes from the mains. now we all know a guitar with humbuckers plugged straight in to an amp will not hum. using a y cable to two amps is where you get a ground loop. a ground loop has ground connected at the sleeve AND connected at the mains. that is why you probably only need one transformer to isolate one of the amps. using two transformers with a switch to direct connect ground across one of the transformers gives you options for the two popular methods.

if you want to give up now you can just buy this

http://lehle.com/EN/Lehle-P-Split-II
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF
User avatar
cherler
experienced
experienced
Posts: 616
Joined: Tue Oct 06, 2015 4:48 pm
Location: Dirtona

Re: A/B/Y/S Switcher and isolation for stereo

Post by cherler »

This would also be why clock noise can get into analog pedals daisy chained with digital pedals right? Since I've got a microcontroller in there I might need to worry about that maybe.
eatyourguitar wrote: if you want to give up now you can just buy this
http://lehle.com/EN/Lehle-P-Split-II
Hahahaha, I appreciate the thought. I'll keep this on my radar if I get overwhelmed :thumb:
Instagram yo

Good dealin's: D.o.S.
User avatar
eatyourguitar
IAMILFFAMOUS
IAMILFFAMOUS
Posts: 3127
Joined: Sun Oct 03, 2010 12:37 pm
Location: USA, RI

Re: A/B/Y/S Switcher and isolation for stereo

Post by eatyourguitar »

cherler wrote:This would also be why clock noise can get into analog pedals daisy chained with digital pedals right? Since I've got a microcontroller in there I might need to worry about that maybe.
I think this is entirely a shared dc 9v problem. clock noise runs through the power on digital pedals. a crappy digital pedal may have clock noise on the audio output also. you just don't notice it till you plug into a really high gain pedal that makes the noise floor come up. the third way would be induction but this is unlikely if everything is in metal boxes.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF
User avatar
cherler
experienced
experienced
Posts: 616
Joined: Tue Oct 06, 2015 4:48 pm
Location: Dirtona

Re: A/B/Y/S Switcher and isolation for stereo

Post by cherler »

eatyourguitar wrote:I think this is entirely a shared dc 9v problem. clock noise runs through the power on digital pedals. a crappy digital pedal may have clock noise on the audio output also.
Ok cool. I'm regulating down from 9V-5V for the microcontroller with an extra decoupling cap, and all it's doing is flipping relays. It never touches the audio signal. Also this chip is runs at 72MHz, so unless there's heterodyning I probably wouldn't even be able to hear it anyway.
Instagram yo

Good dealin's: D.o.S.
User avatar
eatyourguitar
IAMILFFAMOUS
IAMILFFAMOUS
Posts: 3127
Joined: Sun Oct 03, 2010 12:37 pm
Location: USA, RI

Re: A/B/Y/S Switcher and isolation for stereo

Post by eatyourguitar »

does the microcontroller drive the relays directly or did you put a transistor on 9v in series to the coil power? are they 5v relays? I don't think you need a cap on the 5v rail as there is no audio there and the 5v regulator prevents crosstalk to anything on the 9v supply. obviously there is no down side to leaving the cap on the 5v rail. I would be more concerned about a click in the 9v rail every time you turn a relay on. if they are powered by 9v then 9v rail is where you need a resistor and a cap for clean power. 100R + 100uf.

I think you are using a 72MHz arduino? I did something with the old 8MHz arduino for momentary stomp switches.
[youtube]http://www.youtube.com/watch?v=WPz9H0KMP0k[/youtube]
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF
User avatar
cherler
experienced
experienced
Posts: 616
Joined: Tue Oct 06, 2015 4:48 pm
Location: Dirtona

Re: A/B/Y/S Switcher and isolation for stereo

Post by cherler »

eatyourguitar wrote: I think you are using a 72MHz arduino?
I'm using a Teensy 3.2. I really like the boards, 32bits and 72MHz is definitely overkill here but the boards are super tiny, pretty cheap, and I have a bunch lying around. What did you make with that momentary stomp code? Radio style exclusive switching is super cool.
eatyourguitar wrote:does the microcontroller drive the relays directly or did you put a transistor on 9v in series to the coil power? are they 5v relays?
eatyourguitar wrote:I would be more concerned about a click in the 9v rail every time you turn a relay on. if they are powered by 9v then 9v rail is where you need a resistor and a cap for clean power. 100R + 100uf.
I do have the relays on the 9v. They are 5V relays, but I was having trouble getting them to throw even with transistor pairs from the 3.3v pins on the teensy, hense the sziklai pairs and moving to the 9v rails. I should probably revisit that though, I can definitely do the switching on the 5v, even with 3.3v pins. I've checked the current though and it's fine by the data sheet so I'm not too worried about damaging anything, I am open to reasons why I should be though hahaha.

I will probably add some decoupling on the 9v though, like you mentioned. Even if I move the relays down to the 5v rails, I'm actually using a switching regulator and it probably wouldn't hurt to make sure it doesn't add any noise. Also, I do have some optical relays, this part actually, to mute the signal for about 10ms while the relays are switching.
Instagram yo

Good dealin's: D.o.S.
User avatar
eatyourguitar
IAMILFFAMOUS
IAMILFFAMOUS
Posts: 3127
Joined: Sun Oct 03, 2010 12:37 pm
Location: USA, RI

Re: A/B/Y/S Switcher and isolation for stereo

Post by eatyourguitar »

back to the transformer though, I found this http://www.amazon.com/PYLE-PRO-PHE300-2 ... 00BARTW3I/
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF
User avatar
eatyourguitar
IAMILFFAMOUS
IAMILFFAMOUS
Posts: 3127
Joined: Sun Oct 03, 2010 12:37 pm
Location: USA, RI

Re: A/B/Y/S Switcher and isolation for stereo

Post by eatyourguitar »

cherler wrote: What did you make with that momentary stomp code? Radio style exclusive switching is super cool.
I was planning a box with 3 momentary foot switches, 3 different fuzz/distortion whatever. then another latching footswith for bypass. with only two momentary foot switches, you can use CD4013 set and reset. the built in Schmidt triggers help as part of a hardware switch debounce RC low pass. when you have 3 foot switches, it becomes more reasonable to do it in software. I found it very difficult to create errors pressing two buttons at the same time even with the input pin resolution as low as 1ms. 8MHz arduino is plenty fast. I should have ported it to 8 pin attiny45. probably a lot of people would find it useful. with some more work on the code, you could eliminate the latching footswitch and just use press when on to bypass all.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF
Post Reply