Dual Output by Switching Polarity

Thread Starter

themightyduc

Joined Aug 24, 2018
17
Hello, I need to take a single wire and have it activate one of two different relays depending on polarity. For example a negative pulse would energise relay 1, a positive pulse would activate relay 2. Pulses would always be separate and momentary.

It is part of a larger circuit, but the rest I am confident with and I'm trying to keep this simple in the hope of some advice. The specific issue I would like assistance with, is how to connect the two relays to a single input without them bypassing the switch, or an improved design to avoid this. Some variation of diodes may work but I am out of my depth. A quick diagram below, 12V automotive application.

ggg.gif
 

djsfantasi

Joined Apr 11, 2010
9,156
What’s producing these positive or negative pulses?

If you mean the output of the two switches in your diagram, then what you have will work. Are these switches actually momentary press buttons? It will work with one major problem. If both switches are activated together, you have a direct short across your power supply!

Also, your diagram requires three wires. What is the actual application of this circuit?
 

dendad

Joined Feb 20, 2016
4,451
As you have not really provided enough info, here is one idea, but probably not what you are after.
Run the relays on AC.
2Relays.jpg
use 12V relays on 24VAC as each relay is running half wave. The diodes backwards across the relays help hold them operated on the non powered half wane.

This will allow 2 relays to operate on 2 wires.
 

Thread Starter

themightyduc

Joined Aug 24, 2018
17
What’s producing these positive or negative pulses?
Hi, the pulses are produced by a centre bias rocker switch. Mutually exclusive outputs so not possible to direct short, switches in diagram were unfortunately not accurate but closest featured in the simulator I was using. In reality it is as I have hastily drawn here:


If you mean the output of the two switches in your diagram, then what you have will work.
It is close in principle, however in reality the current flow (the yellow dots) shows the circuit will simply bypass the switches and activate both relays perpetually before a button can be pressed! What I need is to make it so only a button press will activate the corresponding relay.

As you have not really provided enough info, here is one idea, but probably not what you are after.
Thanks for the diagram, I really appreciate it and an interesting idea. It looks along the right lines operationally although adding AC to a 12V system isn't the simplest solution. Also as above the switch is a momentary rocker, it cannot be altered unfortunately. So the input is fixed as single wire, with +ve / -ve pulse, I apologise for not making this clear.

Don't worry about holding operated etc, I can integrate this afterwards. For now I simply need a reliable way of making each pulse do one thing for the duration of a pulse, independent of the other (without shorting through the relays as in my diagram).
 
Last edited:

MisterBill2

Joined Jan 23, 2018
18,167
If you had a choice of a connection to half of the 12 volts it could be easy. But probably that is not an option.. With a couple of transistors it could be easily done, or it can be done with a couple of comparator ICs. But doing this without any electronics or complex relay circuits is a challenge. Is it possible to disconnect the negative and positive connections to the switch? Or to just disconnect either the negative or the positive side of the switch?

Right now this is seeming to be another one of those things where we are not given nearly enough information to be able to provide better than guesses. And I don't do guesses any more. Maybe sometime but not this week.
 

djsfantasi

Joined Apr 11, 2010
9,156
Yeah, I didn’t understand your comment about bypassing the switches. You could possibly insert a resistor in each direct connection from the relay to the supply. You’d have to size them so that ifbthe current passes through both, it won’t be enough to trigger the relay. But one resistor will pass enough current to trigger them.

But that probably isn’t the best way...
 

Thread Starter

themightyduc

Joined Aug 24, 2018
17
What de-activates the relay?
-or-
Are we talking the relay is energized for the duration of the pulse?
-----Typical pulse width?
Yes, as above deactivation not necessary and momentary as in duration of pulse. Pulse width 1 second lets say, but again perhaps this is overcomplicating it.

Right now this is seeming to be another one of those things where we are not given nearly enough information to be able to provide better than guesses. And I don't do guesses any more. Maybe sometime but not this week.
I think all the relevant info is there, I'm looking for suggestions on fixing a specific issue which I have outlined.

You could possibly insert a resistor in each direct connection from the relay to the supply. You’d have to size them so that if the current passes through both, it won’t be enough to trigger the relay. But one resistor will pass enough current to trigger them.

But that probably isn’t the best way...
Well it works! And is a simple, to the point solution (tested below in its three states). Would this setup pose any issues with reliability under long term use, or any other drawbacks despite finding the correct hardware?

6wrtY2fhj.png
 

MisterBill2

Joined Jan 23, 2018
18,167
I have a design that will work, but it includes two transistors, two 7 or 8 volt zener diodes, and a resistor. If that is too complex then (deleted).
The resistor is 470 ohms and connects to the center terminal of the switch. From the other end of the resistor the anode of zener diode #1 is connected, The cathode of zener #1 connects to the base of the PNP transistor, the emitter of the PNP transistor connects to +12 volts, the collector of the PNP transistor connects to one coil terminal of relay#1, the other coil terminal connects to ground.The cathode of zener diode #2 also connects to the resistor, the anode of zener #2 connects to the base of the NPN transistor. The emitter of the NPN transistor connects to ground and it's collector connects to one side of the relay #2coil. The other side of the relay#2 coil connects to +12 volts. Moving the switch to ground the resistor will switch on transistor #1 and operate relay#1, moving the contact to the +12 position will switch on transistor #2 and operate relay #2
Unfortunately I do not have the means to post a drawing of this circuit. Wendy has drawn circuits from my descriptions and so might do this one as well. It is a lot more complex than just a couple of diodes, but it works. The purpose of the zener diodes is to avoid a sneak path switching on both transistors all the time. with the drop through both transistors adding up to at least 14 volts they should stay off.
 

Alec_t

Joined Sep 17, 2013
14,280
Why do you have the two relay coils in series across the supply? They will both draw a continuous current and could drain the battery in a surprisingly short time.
 

Tonyr1084

Joined Sep 24, 2015
7,852
@Alec_t covered one of the two points I wanted to make. Yes, they will constantly draw power. If battery powered, you have a very limited operational time. But the second point (actually it was my first point) is since they are in series, closing one relay then releasing the button, isn't it possible that the second relay may see enough current to click in as well? I DO understand that they will each present half of the load, but I've seen 24 volt relays operate on just 12 volts, albeit not reliably. In this case I would suspect that operating just one relay may be enough to trigger the second relay without the first falling out, then you have two active relays. What happens IF that happens? We know nothing of what you're trying to control. If it's something expensive, you could blow something up big time.

Food for thought!
 

MisterBill2

Joined Jan 23, 2018
18,167
Why do you have the two relay coils in series across the supply? They will both draw a continuous current and could drain the battery in a surprisingly short time.
If you are questioning my post, the coils are not in series across the supply, each coil is connected to a different transistor, and the transistors are only switched on when the bias from the control switch exceeds the zener voltage to forward bias the base-emitter junction. My circuit described in post #9, does not have that problem.
 

ebeowulf17

Joined Aug 12, 2014
3,307
I have a design that will work, but it includes two transistors, two 7 or 8 volt zener diodes, and a resistor. If that is too complex then (deleted).
The resistor is 470 ohms and connects to the center terminal of the switch. From the other end of the resistor the anode of zener diode #1 is connected, The cathode of zener #1 connects to the base of the PNP transistor, the emitter of the PNP transistor connects to +12 volts, the collector of the PNP transistor connects to one coil terminal of relay#1, the other coil terminal connects to ground.The cathode of zener diode #2 also connects to the resistor, the anode of zener #2 connects to the base of the NPN transistor. The emitter of the NPN transistor connects to ground and it's collector connects to one side of the relay #2coil. The other side of the relay#2 coil connects to +12 volts. Moving the switch to ground the resistor will switch on transistor #1 and operate relay#1, moving the contact to the +12 position will switch on transistor #2 and operate relay #2
Unfortunately I do not have the means to post a drawing of this circuit. Wendy has drawn circuits from my descriptions and so might do this one as well. It is a lot more complex than just a couple of diodes, but it works. The purpose of the zener diodes is to avoid a sneak path switching on both transistors all the time. with the drop through both transistors adding up to at least 14 volts they should stay off.
I like that! I had thought of most of the same concept, but without the Zeners. I don't know if I would've figured out to add the Zeners on my own or not. Anyway, I think I've understood your intent correctly, and this sim certainly appears to work well, so here goes:
two-coils-one-control-01.png
*** EDIT: Oops! I didn't pay any attention when switching values. The change in resistor from 470 to 1k was not deliberate. In the simulation, with me making some wild assumptions about coil resistance and inductance, it makes no difference, but it might be different in real life!
 

Attachments

MisterBill2

Joined Jan 23, 2018
18,167
I like that! I had thought of most of the same concept, but without the Zeners. I don't know if I would've figured out to add the Zeners on my own or not. Anyway, I think I've understood your intent correctly, and this sim certainly appears to work well, so here goes:
View attachment 174219
*** EDIT: Oops! I didn't pay any attention when switching values. The change in resistor from 470 to 1k was not deliberate. In the simulation, with me making some wild assumptions about coil resistance and inductance, it makes no difference, but it might be different in real life!
YES!! The circuit is just what I was describing. Thanks for creating the drawing. The zener diodes got added after I realized that with regular diodes the base current of both transistors would always flow, and so both would switch on and stay on. The zener diodes increase the voltage drop so that unless the transistors have high gain or high leakage, or both, they will stay switched off until driven. I came up with this circuit about 2:30 AM my time here, and after typing in the whole post the tab crashed and so I had to type the whole thing in a second time, which at that point it became clear that the diodes had to be zeners, although a stack of 10 regular diodes would probably work as well, possibly even better, but I am not sure about that.
 

Tonyr1084

Joined Sep 24, 2015
7,852
the tab crashed and so I had to type the whole thing in a second time
Awe geez! I hate when that happens.

My wife took on line college courses, and every so often her Windows 10 would crash and she'd lose all her work. I told her she needs to type one paragraph and then save her work. Even if she has to save her work a hundred times it's better than losing the whole thing and having to rebuild it from memory. Of course, sometimes rebuilding it would be the better way to go because she'd lose track of her point midway through. Sometimes her work would crash and I'd manage to find the last autosaved file in the computer. Not so with the internet. Lose your work and it's gone into the ether.
 

MisterBill2

Joined Jan 23, 2018
18,167
Awe geez! I hate when that happens.

My wife took on line college courses, and every so often her Windows 10 would crash and she'd lose all her work. I told her she needs to type one paragraph and then save her work. Even if she has to save her work a hundred times it's better than losing the whole thing and having to rebuild it from memory. Of course, sometimes rebuilding it would be the better way to go because she'd lose track of her point midway through. Sometimes her work would crash and I'd manage to find the last autosaved file in the computer. Not so with the internet. Lose your work and it's gone into the ether.
I saved the posting after entering each line. Tedious but much less frustrating. I do not recall ever having a page crash with winXP, and I do not see any changes in win 7 worth the effort.I once used win10 at a motel and I would much rather return to DOS5 than use win 10. What was so hard about launching a program by calling it's name? And just being able to copy a program onto a hard drive instead of having to install it? AND wasn't it great to have an OS that did not need to have 100Meg of patches and fixes every week?
 

MisterBill2

Joined Jan 23, 2018
18,167
Well, WE like this solution and I would really be interested in seeing if a simpler one is possible. Depending on the current for the relay coils the transistor choice may differ, but if a midpoint tap on the voltage source is not available I don't see a simpler way to make it work. If the 12 volt source were two 6 volt batteries in series then it would be a simple exercise in wiring.
 

Thread Starter

themightyduc

Joined Aug 24, 2018
17
Thank you all for your continued efforts, valid points raised about current draw so MisterBill2's circuit is what I shall attempt. I am an amateur and trying to fully understand the technicalities but testing it myself will be the only way I know for sure. A quick word on components, how sensitive do they need to be? Will I need to take readings from my circuit and order components to spec, or should most 12V rated with sufficient ampage be suitable (is the 470 ohm resistor a specific requirement etc). This is all new to me.
 

ebeowulf17

Joined Aug 12, 2014
3,307
Thank you all for your continued efforts, valid points raised about current draw so MisterBill2's circuit is what I shall attempt. I am an amateur and trying to fully understand the technicalities but testing it myself will be the only way I know for sure. A quick word on components, how sensitive do they need to be? Will I need to take readings from my circuit and order components to spec, or should most 12V rated with sufficient ampage be suitable (is the 470 ohm resistor a specific requirement etc). This is all new to me.
Some aspects of the design are more flexible than others. The big question is how much current each relay coil draws. This will determine how large the two transistors need to be, and will also determine whether 470 ohms is the best resistor value. If the relay coils have low enough current requirements, then this design will be pretty easy to implement, with a lot of flexibility on parts selection. Higher coil currents will make selection more critical.

Can you share specs and/or part numbers for the relays in question? Just to be clear, the number I'm looking for is the "coil operating current" or something along those lines, not the carrying current, switching current, load current, etc. I've linked a relay datasheet as an example below. In that example, the relay is described loosely as a 15A relay, but when you dig into the datasheet, things get more interesting:
  • It can carry load current of anywhere from 10-25A depending on temperature and duration.
  • It should only switch 10A.
  • The coil current is just over 53mA.
https://media.digikey.com/pdf/Data Sheets/Panasonic Electric Works PDFs/JS-M_Series_Rev_Dec_2011.pdf
 
Last edited:

MisterBill2

Joined Jan 23, 2018
18,167
Some aspects of the design are more flexible than others. The big question is how much current each relay coil draws. This will determine how large the two transistors need to be, and will also determine whether 470 ohms is the best resistor value. If the relay coils have low enough current requirements, then this design will be pretty easy to implement, with a lot of flexibility on parts selection. Higher coil currents will make selection more critical.

Can you share specs and/or part numbers for the relays in question? Just to be clear, the number I'm looking for is the "coil operating current" or something along those lines, not the carrying current, switching current, load current, etc. I've linked a relay datasheet as an example below. In that example, the relay is described loosely as a 15A relay, but when you dig into the datasheet, things get more interesting:
  • It can carry load current of anywhere from 10-25A depending on temperature and duration.
  • It should only switch 10A.
  • The coil current is just over 53mA.
https://media.digikey.com/pdf/Data Sheets/Panasonic Electric Works PDFs/JS-M_Series_Rev_Dec_2011.pdf
Thanks to EBW17 for providing the right answers and questions. Indeed that "470 ohm resistor may need to be changed depending on the transistors selected. The only solid information that I had at the time was the supply voltage and the switch function, so the rest of the design is rather "universal" in that the current capabilities of the components need to match the actual requirements. The two transistors can be "power tab" types with a rating of at least 50 volts, since it is going into a car that I presume has a battery charging alternator and a 12 volt battery. R1, shown as 1K or 470, depending on which drawing, should be chosen to drop about 5 volts at the base current that switches the transistors fully on for whatever current those relay coils will be drawing. So it all depends on the relays selected. You might be able to use 2N3904 (NPN) and 2N3906 (PNP) if the relays do not draw lots of current.
 
Top