Project idea: midi controller and remote analog looper

Started by tysonlt, October 29, 2011, 10:25:53 PM

Previous topic - Next topic

tysonlt

Hello DIY Legends!

I am a software developer with some experience in electronics.

I want to build a  box with about 6 patches and a bank up/down, that controls midi devices and analog loops, with the actual relays for looping in a separate box.

I want any given patch to:

a) send a midi message
b) turn on ANY NUMBER of the loops
c) switch amp channel

This looks close to what I want to to:

http://www.jimkim.de/download/Schematic_Looper_NF_2006_08.pdf

After close to 100 hours of research and learning (from excellent lists like this - thanks), I am very excited to say that I actually understand most of this schematic!!!

Please bear with a couple of questions:

1) the 74HC573 is an "Octal D-type transparent latch; 3-state" according to the datasheet. Does this mean that giving it a momentary pulse on an input pin will trigger a steady signal on the output pin? I understand this for the LEDS (U3), but I thought that the transistor driving the relays would only need a pulse on the base to switch the relay? Unless they are non-latching relays... would they require a steady current to stay switched?

Based on my current understanding, I was going to use a ULN2803A to drive the relays. Is that similar to what these 74s are doing? (at least U2).

2) What is that capacitor network (C3-C6) for? Where does it get connected?

3) Some of the ICs have a label on the pins, such as IC1, IC2 on pins 17-18 on U1. What are these?

4) I was originally interested in using CMOS to switch the effects loops. However, after reading a lot of posts by R.G. about the pain that CMOS can cause, I'm not so sure! Would 'those in the know' recommend sticking with relays?


Thanks everyone!!!

:)

tysonlt

Oh, and I forgot... I want the relays to be remote from the footswitch :)

It's almost like this is two projects, one to build a generic MIDI foot controller, and one to build a midi-controlled looper.

ElectricDruid

Quote from: tysonlt on October 29, 2011, 10:25:53 PM
Please bear with a couple of questions:

I'll have a go...

Quote
1) the 74HC573 is an "Octal D-type transparent latch; 3-state" according to the datasheet. Does this mean that giving it a momentary pulse on an input pin will trigger a steady signal on the output pin? I understand this for the LEDS (U3), but I thought that the transistor driving the relays would only need a pulse on the base to switch the relay? Unless they are non-latching relays... would they require a steady current to stay switched?

From the looks of it, they're non-latching relays. The PIC puts the relay data on it's databus (D1-D8) then pulses the latch line (LE, pin 11) to transfer the data into the latch. Then the latch holds the transistors in the correct state whilst the PIC can do something else.

Quote
Based on my current understanding, I was going to use a ULN2803A to drive the relays. Is that similar to what these 74s are doing? (at least U2).

Yes. He's used 2N3906 transistors to increase the current handling ability. The diode is a typical protection you see with relays coils. I don't know exactly what it's supposed to do, but it protects against voltage spikes generated in the coil somehow, I think.

Quote
2) What is that capacitor network (C3-C6) for? Where does it get connected?

It's just decoupling caps for the various logic chips and probably the PIC too. They should all have 0.1uF/100nF across the rails close to the chip. It's fairly typical to include these on the schematic but not put them by the chips to avoid cluttering the diagram, as here.

Quote
3) Some of the ICs have a label on the pins, such as IC1, IC2 on pins 17-18 on U1. What are these?

They're connections to other chips which aren't draw in for reasons of clarity (to avoid crossing lots of other lines). The Latch line I mentioned is one example. It goes from pin 17, RA0 on the PIC to pin 11, LE on the latch and is labelled "IC1" at both ends. I'd have given it a more explicit name myself, like "Relay Latch".

Quote
4) I was originally interested in using CMOS to switch the effects loops. However, after reading a lot of posts by R.G. about the pain that CMOS can cause, I'm not so sure! Would 'those in the know' recommend sticking with relays?

That's a personal choice. Some people want real metal doing their switching. Personally I find relays clunky (literally) and they use a lot of power and require more interfacing, which I regard as a significant downside. Modern CMOS switches (DG series for example) are low noise and easy to interface to PICs and such like. Another factor to take into account is the power supply you've got available. I do a lot of synth stuff, and CMOS switches are convenient where you've got a split +/-15V supply.
It depends on your own evaluation of the benefits versus the costs.

Quote
Thanks everyone!!!

You're welcome. I hope it helps.

Tom

Gurner

Quote from: ElectricDruid on October 30, 2011, 06:58:40 AM

Yes. He's used 2N3906 transistors to increase the current handling ability. The diode is a typical protection you see with relays coils. I don't know exactly what it's supposed to do, but it protects against voltage spikes generated in the coil somehow, I think.

When you remove current from a coil abrubtly, the collapsing magnetic field results in voltage generated of reverse polarity which could damage the preceding transistor ...the diode presents a 'short' to the reversed voltage (back emf)  ...a bit more about it here...  http://en.wikipedia.org/wiki/Flyback_diode

tysonlt

Yay, thanks for replying!

OK, so regarding the latching IC he has used, as I understanding things - the 2803 I want to use is basically the same thing with integrated fly-back diodes. I would probably use flyback diodes anyway.

I'm particularly interested in your comments about CMOS switching. Personally I would much prefer it because I'm on a budget (I'm a teacher!) and I like the smaller size. I read some comment by R.G about making sure they are biased correctly to prevent pop, I understand that... but reading some other threads made it sound like CMOS was particularly temperamental to work with. With my level of knowledge I am ok (mostly) with the circuit mentioned above, but would not know how to debug any crazy CMOS issues.

For example: http://forum.allaboutcircuits.com/showpost.php?p=128646&postcount=4

"There is always feedthrough from the gate signal to the output. A sneaky way to minimise this is to use two CMOS switches in a potdown configuration, and then switch them in antiphase. In this way, the glitches tend to cancel out; it helps if the switches are in the same IC package as the gate characteristics will match closely. The dual-switch technique also helps attenuation, as you may find that a switch and a resistor won't give you the attenuation you need, and you'll still hear the switched-out signal very faintly."

He also mentions a chip called SSM2012 which is apparently designed for audio, but it looks like the company no longer makes them.

This is where I start to think a relay would be easier - no leakage. I hear leakage through my Boss TU-2 pedal sometimes and it drives me crazy! :)

Is there a standard, well-known way of using CMOS that preserves guitar signal integrity, doesn't pop (too much), and is easy for n00bs like me to use?

Thanks again

tysonlt

Oh, and regarding power...

I have a 9v and a 12v adapter on my rig. I want to use those somehow... I want to split the stomp box from the actual switching box, with the switching done on the pedal board, where the power is, and the stomp part connected with a midi cable (or RS232, doesn't matter). I was hoping to supply power through that cable.

I get voltage regulators. Is there some way to use these to create negative voltage? I don't even know what that means... if positive voltage is pushing the electrons, I assume negative voltage 'pulls' them? Could I create the required voltages from a single power line?

ElectricDruid

Quote from: Gurner on October 30, 2011, 07:18:56 AM
When you remove current from a coil abrubtly, the collapsing magnetic field results in voltage generated of reverse polarity which could damage the preceding transistor.
Aah, yes, that's it. "Flyback diodes", eh? Ok, thanks.

I don't think you'll have any trouble with the CMOS switches. It used to be the case that you had to get the switching levels right, so if you were driving the switch off a +15V power supply, the logic inputs also had to go to +15V. This caused some trouble and a fair amount of messing about. Modern chips tend to have level translators built in, so even on full range power supplies, you only need feed 5V logic to the switch control inputs. Secondly, old CMOS switches (4016/4066 era) have an on resistance that is far from negligible and also varies with supply voltage. This causes some problems and increases the likelihood of feedthrough. Again, modern switches have reduced on resistance and less/no dependence on supply voltage. Finally, some modern switches designed for audio even have zero-crossing detection built-in, so that the switch only switches when the audio is at zero. This helps prevent pops. But if you're replacing a relay, you're not setting the bar that high, surely?! Banging two bits of metal together with live signals on them is going to make a helluva racket.

So my advice is pay a bit of money and get some decent modern CMOS switches rather than skimping and buying 4016/4066 switches (which are damn cheap, for sure). The good ones are probably still cheaper than relays. For example:

http://nl.mouser.com/vishaydgswitchesmux/

http://www.vishay.com/docs/74470/dg451.pdf

The switches in that PDF even work with a single rail +12V supply if you like. If you're used to building effects circuits, you probably won't find single supply a big problem.
Alternatively, you could try something like these:

http://www.tracopower.com/products/dc-dc-converters/general-purpose/

DC-DC convertors do what you were talking about; make -12V out of +12V. They tend to be expensive, though. Still, they're simple and they get the job done without more transformers or extra power supply complications, which often makes them worth it. I know people who've designed 9V stompboxes that run at +/-15V internally using one of these things. It gives you more headroom and simplifies certain designs quite a bit, but you probably don't want to try running it off a PP3!

One last thought - have you seen this?:

http://www.geofex.com/article_folders/juggler/juggler.htm

There's a bit at the end where he discusses using the 4053 switch for a effects router. This is an older switch, but it's one I've used successfully for noiseless not-true-bypass switching in pedals, and if R.G.Keen says it's ok, then it's ok by me. There are pin compatible modern versions of this chip too, but maybe it *is* worth a shot with the good ol' chips. At least it's not an expensive experiment.

Good luck!

Tom

tysonlt

#7
Thanks a bundle Tom and others, your answers were very informative.

I have gone off and studied some of the concepts you mention and I don't want to keep asking too many simple questions, but I would like clarify a few things:

On-resistance: is this how much resistance is placed on the guitar signal when the 'contacts' are closed? I am not sure what is an acceptable value for guitar - 1ohm? Sub 1? Up to 3? When will it start affecting tone? Main concern is I want to maintain highs. In this paper, http://www.te.com/documentation/whitepapers/pdf/Resistant_Gold_Alloys_Johler_Holm2008.pdf it seems to imply that gold-plated relays can have an on-resistance of between 2 and 20 micro (or milli) Ohms???

Off Isolation: how far it reduces the volume when switched off? My boss TU-2 leaks some sounds and it drives me batty. I guess it has a low off-isolation?

Bandwidth: how much of the audio signal is preserved? If so, is 20Mhz enough, going on the assumption that this is going to preserve all the highs we practically need for guitar? I am not worried about losing bass since I EQ that out pre-valves anyway.

Poles: Regarding on-resistance, if I used double pole, then it is just choosing between one path and another... does this mean that effectively it is never turned 'off', and only on-resistance is applicable? As I understand it, I need either DPDT or 2xSPDT: two inputs for guitar signal and ground (tip/sleeve), and four outputs (a1-2, b1-2), where a1,b1 are bypass, and a2/b2 are going to engage the loop. Am I on the right track?

Wiring: This is where I show my ignorance regarding electronics: Is it ok to wire the tip and sleeve of a guitar jack straight to the pins of an IC? Of do I need some resistors or something else in between? I am imagining the guitar going straight through all of these ICs, so that when all loops are engaged the signal is only travelling through the closed ICs and straight out. Is this correct? In other words, the NC output of one switch would go straight to the IN of the next switch, with no passive components in between.

Packaging: is it better to get many single switch IPs rather than a few quad switches? I hear the phrase 'channel leakage' and wonder if that means some of the patches may bleed a tiny bit of 'on' sound when they should be off.

Thanks for the suggestion of the DG451. At the moment I am looking at the DG2535/DG2536, mainly because is it double throw and has 0.5 Ohm on-R.

http://au.mouser.com/Search/ProductDetail.aspx?qs=va1BoN3yXCrd2EKLGqUqPQ%3d%3d

Is this.... good?? :)


Thank you very much for all your help folks, I am really enjoying learning all of this stuff. I want to have a circuit diagram before the school holidays so I can build it! :)