Need info/help with Electronic Switching!!

Started by wokeupfalling, August 23, 2006, 04:06:35 PM

Previous topic - Next topic

wokeupfalling

Hello!

So, I have been experimenting with switching lately - I know, pretty boring...  Anyway, I am trying to find a way to produce the following: switch 6 (more or less) separate (non-audio) signals on/off - like a 6pst switch - only A) switched electronically and B) not an expensive pile of relays.

I assume there are electronic switches available to do this task - but I am severely new to this concept.  I don't even really know where to begin my search!  Here's a drawing:



I would like to switch all 6 (non-audio) signals with one mechanical momentary SPST switch, using the same concept as 6 momentary relays all linked up.  There HAS to be an inexpensive, relatively simple solution, right??

Am I off the page here?  Seriously, can anyone point me in the right direction?

Thanks!!!

Zak

R.G.

A lot depends on what the signals are that you're switching.

If what you want is to switch DC on and off, you're in luck. Normal bipolar transistors and MOSFETs work great for that as long as the DC voltage and currents are not too big.

If you want to switch AC power on and off, you can use TRIACs.

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.

Seljer

#2
4 electronic SPST switches: http://www.fairchildsemi.com/ds/CD/CD4066BC.pdf

they also do one with 3 DPDT switches (the cd4053)


making bypass switches out of them:
http://www.geocities.com/thetonegod/switches/switches.html
http://geofex.com/Article_Folders/cd4053/cd4053.htm

search through this forum for CMOS switches for more info on those type

wokeupfalling

This will be for connecting 9v signals to ground, will the 4066 work for this?  Since I won't be sending audio through this - which choice is optimal, the 4066 or 4016?

I think this may be what I was looking for...

Zak

Seljer

Actually, RGs ideas is much better than mine. Espescially for something simple like this.

Take a NPN transistor, put a 10k resistor on the base, to the other end of the resistor you hook up the control signal (0V = off, 9V = on), connect the emitter to ground, the signal you're switching comes in at the collector (I think you might want to put 10k resistor on there too to limit the current).

Confirmation that this would work from anyone?

wokeupfalling

Ha ha... I have been immersed in CMOS for a few hours now, for the first time ever, whew!  It's good to finally learn, but my heart grew heavy with thoughts of how much real estate it would take to implement a few of these circuits...

Yeah, I just want this to be somewhat simple, and also cheap - the transistor idea would be along those lines.  Would this process, including the 10k  on the collector, still provide a fast switch?

Can you recommend the most suitable NPN transistor for this duty?

Thank you for the follow-up!!

Zak
PS. Yes, I am a relative newbie ;-)


Seljer

What exactly are you going to be switching with this?

wokeupfalling

Long story short, I am updating an old remote switching project - trying to avoid starting fresh, I am looking for odd solutions.  As well, I am trying to use parts I already have.  I am trying to avoid a full explanation of the problem - it's a long confusing one - trust me!!

I need to momentarily send each of the negative poles, from six 5v relays, through an on/off circuit, then to a DIP switch to ground the selected relays.  Per the drawing on my 1st post, the lines on top are from the relays, and the lines below go to a 6 pos DIP switch, which is switched to ground.  I need to momentarily connect all 6 individual lines with a momentarty SPDT stompswitch. 

So, 5v relays waiting to be grounded are what I will be switching.  I need to on/off each one separately - and at the same time AND momentarily.  There will be several of these circuits in one box.

I "could" use 6 spst non-latching relays - but that's not really an option for this ( or my wallet  ;D )

Thanks for your help!!

Zak

wokeupfalling

#8
What Transistors should I use?

I'm sorry, there are too many to choose from...

I really appreciate all of the help!

Thanks again,

Zak

Seljer

Ah, if you're switching relays with them then other things come into play

make 6 subcircuits that are something like this http://www.geofex.com/Article_Folders/rmtswtch/rmtsw3.gif, for each relay you have (you could drop out a few things, like R3 and the LED if you don't need the LED, read the entire article on http://www.geofex.com/Article_Folders/rmtswtch/rmtsw.htm)

then, to turn the relay on/off all you need to do apply a voltage there on the left (or connect it to ground)

wokeupfalling

#10
Thanks, but i'm not sure I follow...

Unfortunately, in this design (like I said, long story) the relays being switched are not switching audio either.  There is no audio in this situation, so need to worry about clicks, pops or the like.  Also, no LED's or other things are needed.

All I need to do is simply and cheaply, make a momentary connection between the 6 seperate signals and ground at the same time.  I think the links you provided are a little more than needed for this.  Here's another drawing:



I hope that helps explain things better!  Is there an easy cheap solution?  The NPN transistor idea sounds good - I just don't know which one to use... can anyone help?

Thanks again ~

Zak

R.G.

1. Move your dip switch up to between the relays and the six way switch.
2. Get yourself six 2N3904 NPN transistors, six 4.7K resistors and six diodes, either 1N4184, 1N914, or 1N4002 through 1N4007.
3. Hook up the transistors as follows: at each "ground side" contact of the DIP switch, connect the collector of one transistor. Connect all of the emitters to ground. Connect the diodes with an anode to a collector, a cathode to your + power supply. Connect the six resistors one each to the bases of the six transistors and then all six together.
4. Hook your momentary switch to momentarily pull the all-six-resistors node up to your power supply.

All the transistors are always turned on each time you press the switch. The DIP switches either enable (closed) or disable (open) the transistors from pulling their respective relay coils to ground.

You could also do this with one much bigger transistor if you hooked all of the "ground side" terminals of the dip switch together and the big transistor collector the the dip switch grounded terminals, with its emitter to ground. But you'd still need at least one diode from the transistor collector to + and a base resistor. Driving a bigger transistor is trickier ( a little, not much) than driving six small ones.

The six small ones only work if your relays draw less than 100ma each. If they're over 20ma, you may have to lower the 4.7K resistor down to as low as 1K.
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.

wokeupfalling

Thanks R.G. - I think that's perfect!

I'm using the NEC EA2 series relays - I assume they're low on the draw...

Thanks again for the rescue!

Zak

wokeupfalling

Actually, am I correct in figuring that the NEC EA2 5v Double Latch relays would draw around 28ma each?  Would I need to use a 1k resistor then?  Sorry, I am relatively new to the electronics world - i'm trying!!  Ha ha...

Thanks,

Zak

R.G.

Ah. Doing a dip switch programmed effects loop controller then.

You know that for double latched relays that you have to pulse them one way to set, the other way to reset, right? If you do this momentary thing you have drawn up, it wil only set (or reset) them, never flip them the other way.

You may want to read the relays tutorial at GEO - http://www.geofex.com.
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.

wokeupfalling

Hey RG - Ha ha, yeah - I know...  Like I said earlier, this is an amendment to a non-DIP remote thing I built awhile ago.  I am making a programable version using the old set-up + using parts I happen to have lying around and/or left over from before... it's a long story - needless to say, I would do it differently "next time."  Ah well, we all learn somehow right?  Ha ha, I tend to enjoy the hard way I suppose.

Anyway, point being - this is just a problem I was trying to solve, a small piece of the puzzle.  I also just realized that in trying to explain my situation, I confused some things - the on/off transistor set-up will be used NOT momentarily, as the relays will be non-latching relays.

I'm sure this seems way more complicated than it needs to be - on the other hand, in my situation it will be easier and cheaper to use this idea.  I am really excited to use this transistor on/off set-up, it's definately what I was searching for!

So, 2 questions remain: A) will the transistor switching set-up be fine in handling a steady connection? and B) if the "Nominal Operating Power" is 140mW and it's a 5v relay - is the draw 28ma??  If so, can you confirm the proper resistor zone?  That part confused me on your post.

Also, yes - GeoFex is the almighty.  I have read about 1/3 of the site so far ;-)

Thanks again for all of your help ~

Zak

R.G.

Quotethe on/off transistor set-up will be used NOT momentarily, as the relays will be non-latching relays.
Ah, OK. That'll work then. The transistor setup can be used as a steady on/off or momentary, either one.
Quoteif the "Nominal Operating Power" is 140mW and it's a 5v relay - is the draw 28ma??  If so, can you confirm the proper resistor zone?
The datasheet for the EA2 series shows the 5V nonlatched relays with a coil resistance of 178 ohms. That means that they pull nominally 5V/178 = (yep,) 28ma.

So the transistor is going to have to sink as much as six times that, or 168ma, which is over the edge for a 2N3904. They max out at 100ma, at a gain of about 10 under those circumstances. Instead, see if you can get a 2N2222 transistor. It is rated at up to 500ma, and has a gain of ten at that current.

If you were using six tranistors, the would all have their collectors and emitters tied to the dip switch and ground respectively. Their control points, the bases, would be open. To each base, you would connect a resistor, and then connect the free end of all the resistors together. That resistor gathering point is what your activation switch would pull up to + or leave open. Are you using +5V for a power supply? It changes the base resistors.

If you did six 2N3904's, one per switch, then you would need about 3ma of current into each base, so the resistor is your + power voltage minus 0.6V for the base-emitter junction, divided by 3ma. For 5V, that works out to be 1.4K. Since that's a maximum resistance,  a 1.2K would work and a 1K won't hurt.

If you use the single 2N2222, then you'd need 168ma/10 = 16.8ma of base current. That is then a single resistor of (5V-0.6V)/0.0168 = 262 ohms. 270 ohms might work, depending on the transistor, and 220 ohms is a sure thing.
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.

wokeupfalling

Hmmm... well my main focus of this on/off section, is to prevent any of the 6 lines from being tied to one another until the switch is activated.  If the bottom of each DIP position was tied together before an "on/off" transistor - then say, positions 1 and 3 are selected on the DIP, wouldn't relay 1 and 3 then be tied together regardless of the transistor state?

If there were 2 of these circuits side by side, where both controlled the same set of relays - and say I had circuit One connect pos 1 + pos 3, then had circuit Two connect pos 3 + pos 4, wouldn't pos 1, 3 & 4 be connected when circuit 2 is activated - due to the fact that pos 1 & pos 3 anywhere would connect those 2 respective relays together?  Whew!

If I there were 6 seperate transistors, each relay would independently be connected to ground (and to each other), only when switched on by the transistors.  Is there any way to still use 6 seperate transistors?  This option is completely appealing to me as you can tell ;-)

The relays are NEC 5v, what if I ran everything (LED's, relays) at 9v?  Would that adjust the draw from the relays in a helpful or a negative way?  I could also adjust the V to the relays as low as 4v.  Are the any other transistor choices for the "6 each" option?  Could adjusting the V make enough difference to use 6 1N4002 transistors?

I'm full of questions - I hope i'm not killing ya here!  Again, I really appreciate the help - I've already learned a ton with this little problem!

Thanks!

R.G.

QuoteIf the bottom of each DIP position was tied together before an "on/off" transistor - then say, positions 1 and 3 are selected on the DIP, wouldn't relay 1 and 3 then be tied together regardless of the transistor state?
They would indeed.
QuoteIf there were 2 of these circuits side by side, where both controlled the same set of relays - and say I had circuit One connect pos 1 + pos 3, then had circuit Two connect pos 3 + pos 4, wouldn't pos 1, 3 & 4 be connected when circuit 2 is activated - due to the fact that pos 1 & pos 3 anywhere would connect those 2 respective relays together?
Yep.

So are more than one DIP switch connected to each relay? If so, and you are trying to program different combinations of relay selections with different DIP switches, then yes, you'll need to isolate them.

QuoteIf I there were 6 seperate transistors, each relay would independently be connected to ground (and to each other), only when switched on by the transistors.  Is there any way to still use 6 seperate transistors?  This option is completely appealing to me as you can tell ;-)
Yes, if you used separate transistors for each DIP switch ground leg, then the relays would remain isolated until grounded by the transistors being turned on.

Like this:


The collection points of the base resistors at the bottom is where you'd hold the bases high to turn one DIP switch on, or low for all the ones you keep turned off.

You still have the problem of how to turn on one and only one, if that's something you're doing.
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.

wokeupfalling

Thanks RG, holy crap!  That is exactly what I am going for - and much better looking than my current sketch ;-)

So, with this setup - i'm still in the dark on where to keep my V+  9v, 5v, 7v??  Of course, everything at 9v being the easiest - but adjusting wouldn't be too much work.

I'm pretty sure I have a sketch on an envelope somewhere around here that would use some double latching relays I have lying around to provide the "one at a time" function...  Those things are too cool to have just sitting around ;-)

Thanks thanks thanks for all this help, let me know about the V+ issue (per my last post) before I order my transistors!