How to emulate a SPDT Relay

Thread Starter

ShopRat59

Joined Nov 27, 2013
56
I'm looking for ideas on how to emulate a SPDT relay, i.e. when current is applied the circuit travels along path A and when current is removed the circuit travels down path b. This is for low voltage (12Vdc or less), low current (500ma or less) circuits.

One obvious (to me) solution is to use an NPN and PNP transistor, with the control current going to both bases, when on the NPN path is active, when off the PNP path is active.

What are other possible solutions and why are they better (realize this is a very subjective term) than the two transistor solution?
 

AnalogKid

Joined Aug 1, 2013
8,377
The complimentary transistor circuit will work fine, but the two loads are switched differently. The NPN pulls its load down to GND, while the PNP pulls its load up to the rail. If the two loads have a common connection to either the rail or GND, then both transistors have to be the same polarity. Depending on the loads, one option is to use two NPN's. The first one switches its load to GND *and* drives the second transistor's base. Generally deemed a better way to go because the two power devices are identical. In volume production this lowers costs.

ak
 

Thread Starter

ShopRat59

Joined Nov 27, 2013
56
AK,
Thanks for the response, but I'm not sure I completely follow the set up with two NPNs, could you provide a sample circuit diagram?

Thanks in advance,
 

Picbuster

Joined Dec 2, 2013
996
Relay contact are usually galvanic separated from the 'coil' to emulate a relay you should take care of that part.
The answer could be a solid state relay or two fets of one gate is inverted ( if 1 is on 2 is off)
To achieve the inversion add one fet and a resistor.
Look at the education tab at 'all about circuits' read the appropriate parts and find out how to do use the fets.
 

Thread Starter

ShopRat59

Joined Nov 27, 2013
56
Thanks, when I wrote this post I knew SPDT Emulation was a poor choice of words (as I am not interested in circuit isolation), but I could not think of another way to express my question. I am familiar with FETs and there usage, to me I could use them in the same manner as the BJT example I cited, but being turned on/off by voltage instead of current.
 

Thread Starter

ShopRat59

Joined Nov 27, 2013
56
Yes, this was the second thought I had (after BJTs) but it is my understanding that a flip flop approach requires a "trigger" pulse to flip between paths, while I want to flip based on the presence or absence of current (or voltage).
 

MikeML

Joined Oct 2, 2009
5,444
@ShopRat59

Do you want to put the switch(s) in the positive lead to the loads (other end of loads grounded), or put the switches in the negative lead of the loads?

What voltage/current are you expecting to switch?

What voltage/current do you want the control signal to be?

Do you want the control signal to be referenced to the positive or negative end of the load?
 

Thread Starter

ShopRat59

Joined Nov 27, 2013
56
Mike,
As a newb I struggle with which side to put switches on, I don't understand how to determine when each method is appropriate, and typically put them on the positive lead as this is most logical to me.

The voltage and current for both the load and the control signal is 5-12 Vdc and less than 500ma.

Same answer concerning control signal reference, I typically design for positive.

Thanks,
 

MikeML

Joined Oct 2, 2009
5,444
Ok, let's try it:

337.gif


The scenario: You have two grounded 2A loads (lamps?) in a 14V car. Goal is to have one on while the other is off, and to be able to reverse which one is on under the control of an external signal, which is the typical 5V CMOS or TTL signal.

Since the loads are grounded by design, you have no choice but to do high-side switching, which requires PNP or PMOS type power switches, whose emitter/source is tied to the positive rail, and whose turn-on is controlled by their negative base-to-emitter or gate-to-source voltage.

On the other hand, the control signal is typically referenced to the ground side of the circuit, so some sort of inversion/level shifting is necessary to tie the two circuits together. That is the role of Q1.

Look at the simulation above, which shows the load currents through the two loads as a function of the control signal sweeping from 0V toward 5V. Note that there is a funky region between 1.82 and 2.17V where both loads are partially on, so this is a sort of make-before-break type of transfer switch. Note that I tailored the resistors to sort-of center the switching point about half-way between 0V and 5V.

In the real world, the control signal would come from a 555 timer or an Arduino port pin, so it would transistion through the funky region very fast, so it wouldn't matter.

Look at this simulation where the control signal V(sig) is a function of time:

337a.gif

It gets through the funky region in <1us, so it appears that the two load currents are perfectly complementary.
 
Last edited:

Thread Starter

ShopRat59

Joined Nov 27, 2013
56
Mike,
Thanks for the great detail, I understand your explanation except I do not understand why the mosfets couldn't be between the load and the ground (I understand in a car since the ground is the car chassis, there is often no ground wire to connect to) - wouldn't that open the circuit as well?

Also would you mind posting the .asc file so I can play with the simulation?

Thanks,
 
Last edited:

MikeML

Joined Oct 2, 2009
5,444
Mike,
Thanks for the great detail, I understand your explanation except I do not understand why the mosfets couldn't be between the load and the ground - wouldn't that open the circuit as well?
Yes, but the lamp fixtures in a car (tail lights, for example) are intrinsically grounded. Any switching has to be in the high side. Besides, you specifically asked for it in post #10!

Also would you mind posting the .asc file so I can play with the simulation?
 

Attachments

Thread Starter

ShopRat59

Joined Nov 27, 2013
56
Sorry, for wasting your time, I recognize the car issue and was editing my post when you responded, thanks for the file.
 

ci139

Joined Jul 11, 2016
1,351
about "Emitter−Base Breakdown Voltage" page 2 3-rd row from top 2N2222(PDF)
(other) the mosfets have reverse protection diode built in so you need to use them as with mosfet SSR-s or buy 1 . . . an interesting article https://electronics.stackexchange.com/questions/411909/ac-mosfet-switching-without-any-diodes-low-cost-ac-solid-state-relay-with-mosf
. . . i prsonally doubt there is a circuit allowing both fets to conduct simultaneously (it's theoretically possible but hard to achieve) . . . the source of such claim https://www.avdweb.nl/tech-tips/four-quadrants-mosfet-graph ... but i'm still pessimistic about such (? . . . it's about ideal diode not MOSFET SSR ? ← likely the cause of fuzz)
 

AnalogKid

Joined Aug 1, 2013
8,377
i prsonally doubt there is a circuit allowing both fets to conduct simultaneously (it's theoretically possible but hard to achieve)
Actually it is easy to achieve, as indicated in the link you posted. Anything that generates 5-10 V between the dual sources and the dual gates will turn on both MOSFETS. I've done this for a phase type lamp dimmer with a very low voltage drop, and cycle-stealing lamp dimmer under the bed with no heatsink and basically no heat.

ak
 

ci139

Joined Jul 11, 2016
1,351
under the bed
-- i have tried to burn off the acetone *from the nitro lacquer finish floor and some years later the gasoline from my arms ? """successfully""" >.< - good the apartment didn't burn down and the skin grew back :confused: i tried to simulate what you describe with no success (but it was done in a bit hurry , maybe i should retry)

*note : you have to use a (wet) thick blanket to cut off such fire!
 
Last edited:
Top