I need some help with relays...

Started by NeveSSL, July 04, 2005, 05:33:33 PM

Previous topic - Next topic

NeveSSL

Hi all!  I am working on a midi looper based on this schematic:  http://www.jimkim.de/download/midi_switch_101.pdf

I was wondering if you guys could help me with what I need to do to make this a looper?  As-is, it's a relay control switcher, like a footswitch controller.  Do I just need to change the types of relays?  Also, how would I wire the audio path?  My understanding is that DPDT relays are required for true bypass, which is what I'm going for.

Any and all help is GREATLY appreciated!  I need two of these and can't afford to buy one!  :)  Thanks much!

Brandon

niftydog

what type of relay does it specify?

Yes, DPDT for true bypass. Plenty of wiring diagrams around here that could be adapted easily to wire a relay instead of a footswitch.
niftydog
Shrimp down the pants!!!
“It also sounded something like the movement of furniture, which He
hadn't even created yet, and He was not so pleased.” God (aka Tony Levin)

NeveSSL

Hi Nifty!

Thanks for the reply.  I just scoured over his site and he actually doesn't specify.  I wish his website gave more information.  I am hoping to make a PCB layout for this (he built his on perfboard) and maybe get some more information about building it to post on my site.  What do you think?  I have emailed him once, and he replied, so I could email him again, if nothing else.  Is there anyway to tell by the schematics?  Thanks SOOOO much!  I am really wanting to get one of these built!  :)

Brandon

niftydog

all he shows is the relay coil. The type of relay (DPDT or otherwise) won't affect this aspect of the design. The only thing you might have to do is to adjust the driver transistors to give the appropriate amount of current to operate the relays you choose, but chances are it'll work fine as is.
niftydog
Shrimp down the pants!!!
“It also sounded something like the movement of furniture, which He
hadn't even created yet, and He was not so pleased.” God (aka Tony Levin)

NeveSSL

Very cool... I'll search for a way to wire up the audio circuit.  If you come across anything, do please share.  I greatly appreciate your help!

Brandon

NeveSSL

Some questions:

1.  Where should I start for transistor values for the relays?  I don't have a clue!  :)  

2.  What relays should I use?  I'm assuming I need low-signal relays, such as these:  http://www.mouser.com/catalog/622/1139.pdf  Even then, do I need latching or non-latching?

The only info I could find on relays for the way I want to use them was from RG's ASMOP relay bypasser, found here:  http://www.geofex.com/Article_Folders/ASMOP/asmop1b.gif

He doesn't specify what to use, though, as far as relays or transistors go (that I've read yet, anyway).   My third question comes from this:

3.  Why does he have the jacks normalled?  Is that just in case nothing is plugged into them that the signal will still go through?  Is there a major disadvantage if they're not done this way?  Only reason I ask is that Mouser doesn't carry Neutrik's 1/4" jack that is NC, which is what I assume I would use to make these normalled (if logic serves me correctly).  

Thanks much!  Anyones input is most welcome.  I hope to have a complete PCB MIDI switcher by the time this is over with.  :)  Thanks again!

Brandon

Transmogrifox

I'm trusting that you are able to get the PIC chip or source code from the designer.  The in/outs on the PIC chip need to be appropriately programmed to work in that circuit.

With that assumption as a given, I have a relay driver circuit that would probably work great for this:

www.geocities.com/transmogrifox/relay

Anyway, you can do away with the SPST switch and LED, then just connect the PIC chip output to the input of the CMOS inverter (where the 4.7k pull down resistor is).

Use 4 of these circuits, one for each PIC chip output.

There is one quirk with this circuit:  

You have to set or reset it once before it synchornizes itself to the input whenever it is initially powered up.  This automatic set and reset could be programmed into the PIC chip quite easily on startup, but you have to have the know-how and equipment to program PICs.

Otherwise, you can still easily build per the schematic you referenced: look at mouser among the DPDT single coil non-latching 5V relays.  If it fits the 5V criteria, you're in good.  You can use the system I referenced on my page for the DPDT wiring.

The downsides to non-latching relays is that some of them can be noisey when energized, and they eat up a pretty fair amount of current (like 50 mA).

If you go that route, about any transistor will do.  I recommend 2N2222 or 2N3904 since they're usually easy to find, and quite inexpensive.

I hope this was helpful and served to give you a clear idea of how to make it work instead of confusing you.  Take care, and I hope this thing works for you.
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

NeveSSL

Dude... you're tha man!  :D

Thanks so much for your reply.  The guy who designed the schematic I'm trying to use actually already has the software on his website ready to download (here).  I am going to build a programmer like this one.  :)

As far as relays go, I just need to use a non-latching, low signal, 5v relay, right?  Does it matter if they are polarized or not?  

After doing some searching, I came up with this one.  What do you think?  Would that one work?

Also, should I normal my jacks?

Thanks for everything!  I think that clears up most of my immediate questions.  Now to work on a layout... heh!

Brandon

niftydog

polarized relay?!?! Can't say I've ever heard of one.

The voltage you provide dictates the voltage spec of the relay. the schematic suggests anywhere between 5 and 15VDC, so take your pick!

Quoteshould I normal my jacks?

surely that's a question only you can answer. Do you need your jacks normaled?!?  :P
niftydog
Shrimp down the pants!!!
“It also sounded something like the movement of furniture, which He
hadn't even created yet, and He was not so pleased.” God (aka Tony Levin)

Transmogrifox

Check these out at mouser:

EA2-5NJ
http://www.worldproducts.com/pdfs/ea2.pdf

On the datasheet about 2 or 3 pages down is a diagram of the "guts" of the thing.  The first one from the left is the non-latching type.

The position shown is "non-energized".  You should wire this so that this position has you bypassed.  When you energize it with the midi looper output, then it will change position, and this should be set to send to and return from external FX.

If you wire the polarity with the "+" side connected to +5V, and the "-" side connected to the collectors of your transistors, then all should work well.

I looked up the schematic on that guy's page and noticed he was using an LM7812 regulator for the relays, so he is actually using 12V relays.  With these 5V relays, just use a 7805 instead of a 7812.

Your pick or relays was fine, there was nothing wrong with the relays from the link you posted--so if you follow the same criteria, you should be fine picking a 12V relay if you wish to go that route.  Whatever you do, make sure there is a seperate regulator for the relays so that the switching doesn't tweak with the microcontroller.

If your looper is noisey in the energized state, you may want to consider a latching type relay.  I can probably concoct a simple way to do it so that it sets on power-up.  I think it would just require the addition of XNOR gates to the circuit.  

I should look inside my amp and see what kind they use in it, because they're not noisey by any means--I know they're 12V relays, though.
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

NeveSSL

Thanks for the replies, guys.  Jens, the guy from jimkim.de, sent me this.  Would this be a latching relay?  It looks real similar to your schematic, with similar advice... and I'll quote from his email (I don't think he would mind:) ):  

QuoteHi Brandon,

I should update my website ;-)

I get questions about relay wiring from time to time and I have some
basic information available, but I'm too lazy to put it online...

So here is what I told another visitor of my site (find attached the
schematic):

"When switching a preamp/FX out of the signal path, you should connect
its input to ground and connect its output to ground via a resistor, so
that zero voltage is at the output when putting it back in the signal
path. I attach an example of my relay wiring. Additionally, you could
connect an R/C-network to the relay coil (try 47R/47uF as a start),
because often the current peaks caused by the relay switching cause
interferences in the signal path."

Don't hesitate to ask if you have further questions.

Jens

I can't figure out what 47"R" is, but I'm sure it's not Meg... heh.  I emailed him and asked him and I anticipate a reply probably sometime tomorrow.  

Making things quiet is definitely a necessity, so I greatly appreciate your advice in this area!  Will his schematic he gave me be adequate?  

Also, what kind of power supply do I need for this thing?  I noticed he said it needs a solid 5v supply, so what should I do?  I first thought about having this operate at 9v so I could use my pedal supply with it, but I fear that it will pull too many mA to do this.  I'm building the Regulated Power Supply from GGG that puts out 200mA, but I don't think that's enough.  Any help would be GREATLY appreciated!  

I appreciate your help, guys, A LOT!  I really want to get this project done.  :)  I'll check out those relays, too.  Thanks!

Brandon

niftydog

47R is just 47 ohms. The R is used in place of a decimal point.

you need 5V, or else the PIC may not like it very much! Best to build a dedicated supply, regulated and well filtered with plenty of current on tap. It will ultimately depend on what relays you use as they are the big eaters in this design.
niftydog
Shrimp down the pants!!!
“It also sounded something like the movement of furniture, which He
hadn't even created yet, and He was not so pleased.” God (aka Tony Levin)

NeveSSL

Thanks for the reply.  Any ideas on where to start on the power supply?  I assume I will need to use a power transformer to step down to 9v or so and then filter and regulate to 5v?  Would 200mA (IE, Small Bear's flat-pack transformer) be enough for this circuit?  How could I tell?

I'm not real familiar with electronics math (yet... I'll be minoring in acoustics and electronics at MTSU next fall ;) ), but the relays are supposed to pull 140mW, which at 5v, should be 28mA each, which is already over 100mA... maybe I should try to find a 500mA transformer from Mouser?  Would this work with maybe a 500mA transformer and a 7805?  I'm thinking 200mA maybe enough, but I need to check the pic and what not on current draw... I would suspect it wouldn't be a whole lot.  

Or would it be wiser to use a 9v 500mA wall transformer and regulate and filter internally?

I'm going crazy!!!  hehe

What do you guys think?

Thanks again!

Brandon

NeveSSL

BTW, I just noticed that Axess Electronics GRX4 (what I'm wanting to build a clone of, per se) only requires 75mA... ??? How does he do that?  I guess he may be the only one who knows, or maybe I'm over-estimating my current requirements.  Any thoughts?  Thanks!

Brandon

niftydog

QuoteAny ideas on where to start on the power supply?

There's heaps of info around here if you just take the time to look. I would suggest that you use a 9VDC wall wart and just build the 5VDC regulator circuit.

Again, you can run the relays on any supply voltage you want, provided you have the right relays. Perhaps it's best to use a fairly hefty 9VDC wallwart (maybe 500mA) to provide 9VDC to the relays AS WELL as providing the regulator circuit with 9VDC to be bumped down to 5VDC for the PIC.

There's not much point in regulating the supply to the relays as it shouldn't affect their operation. However, it's important to keep the PIC happy!

Plus, making a regulator circuit out of 78XX series regulator ICs that approaches 500mA to 1A is going to require heatsinks. So keep the heavy current draw out of the regulators!

Perhaps Axess use special low power relays, or latching types, or they use low voltage relays. (Bumping down the voltage required means you can draw significantly more current without exceeding the power rating.)
niftydog
Shrimp down the pants!!!
“It also sounded something like the movement of furniture, which He
hadn't even created yet, and He was not so pleased.” God (aka Tony Levin)

NeveSSL

Gotcha.... that makes sense.  :)   I'll do a search.  Thanks!

Brandon

Transmogrifox

I went to the Salvation Army and picked up an old HP printer for $10, threw away the printer and kept the power supply (they wouldn't let me just take the power supply).  It was 30 V at about 2 amps.

The LM78xx series voltage regulators are rated at 1A, I believe.  Heat sinking is not a real big deal.  You just need to do the PCB layout to leave room to lay the thing down flat onto the ground plane.

Use an LM7805 IC to regulate 5V for the PIC chip and related circuitry.  Use a seperate LM7805 (since we were looking at 5V relays) to power your relays.  Use Jimkim's DPDT wiring plan--I have been too unmotivated and lazy to modify mine to that.  It's superior for keeping all poles/throws referenced to ground to minimize switch-popping noise.

The LM7805's are as simple as they look:  Unregulated supply in, ground, regulated 5V out.  It's good to add .1uF caps from output (5V) to ground to filter off high frequency noise, especially in the PIC supply.  Add a 100uF cap in the relay 5V to further cushion the instantaneous relay switching current requirement.

Perhaps if you don't get the replies and schematics you need from Jimkim I can try to put something together to help get the project nailed down.  It's nice of him to put the information together for such a unit, and he seems happy to provide information where you lack the technical know-how for little details like power supplies and relay wiring.  If I'm going to be helpful, I need to just break down and make a schematic (you seem to be able to follow schematics proficiently) so I can communicate a little better.  For me, I know words can take a long time to picture and understand, but a schematic tells all plainly. :wink:
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

NeveSSL

Thanks again for your reply, Transmorgrifox.  

Right now I am struggling with whether or not I want to do a PCB for this project.  Well, I know I want to, it's just a matter of know-how.  ;)  It's a little overwhelming, but mostly just intimidating because of new software learning curves (right now I'm using FreePCB, but if you have any alternatives, they are MUCH welcomed! :) ) and because I'm paranoid I'm going to make about 80,000 or so mistakes.  :D

Thanks for your help and your offering to help.  Let me ask you (and anyone else) this:  as far as the schematic goes, at first sight, I can't help but think that I am going to have to use about 80 jumpers or so to get things across traces.  Is this normal?  I assume I could do a 2 sided board, but jumpers seem so much better... lol.  Is there a trick to getting around jumpers?  Specifically on the transistors feeding the relays since I need to have all of those on one side of the board, I could find no way around jumping the traces over each other to get to ground.  

What I probably need to do is just go ahead and make one and let you fine fellows help me tweak it.  That involves the learning curve of the software more than anything, but I'll just have to get over it... heh.

Again, thanks for your help.  I think I'm going to try to start on a PCB design.  Take it easy!

Brandon

niftydog

80 jumpers? on this schematic? NO WAY!!

unlees there's parts to this that I'm missing?! Even so, that's a LOT of jumpers.
niftydog
Shrimp down the pants!!!
“It also sounded something like the movement of furniture, which He
hadn't even created yet, and He was not so pleased.” God (aka Tony Levin)

NeveSSL

Sorry, man, I should have indicated more sarcasm.  ;)  I didn't literally mean 80, I just meant that I was going to have to use a lot.  I would imagine maybe 20 or 25.  Sorry about that!

Brandon