Reversible current circuit design with transistors

Thread Starter

Jeffery Vahrenkamp

Joined Jun 16, 2016
53
I am building a circuit to control reversible latched relays with a micro controller. The original plan was to have two pins control each relay (I have two in the circuit). To close I would put Pin 1 High and Pin 2 Low and to open I would put Pin1 Low and Pin2 High (example figure one). However, I discovered after putting it all together my individual digital pins cannot source enough current to activate the coil (they produce ~ 20 mA while I need at least 30 mA, so I currently switch them with two pins right now). So I need an alternative circuit to flip the relays, but still want it to use only 2 pins per relay. My idea is below and I would like feed back as I am not familiar with working transistors.

FIGURE 1. Original plan (Needed more current).
Original_circuit.png I have power pins on my board that can source 150 mA, and I was thinking to use transistors to direct the flow of current to the transistors. The circuit I have come up with requires 4 transistors to direct the flow of power (I would control these with pins 1 and 2). The C in the middle is the relay circuit in figure 3.

FIGURE 2. 4 transistors controlled by two switches to control the direction of power flowing into relay circuit.
Direction_circuit.png

The relays would then have two transistors (S8050D data sheet is here http://www.mouser.com/ds/2/308/SS8050-1121782.pdf) each, which would both be controlled by a single pin. See figure 3. I believe I need two since the NPN transistor only allows current to flow Collector > Emitter. Please correct me if I'm wrong.

FIGURE 3. Relay control with transistors.
relay_circuit.png


Sorry the pictures are so large and my hand drawn figures are rather crude. I hope they get the point across. Is there anything wrong with my design and is there a way that I could do it more efficiently, ie fewer transistors. Can I some how use a capacitor with my original plan to source more current?
 
Last edited:

crutschow

Joined Mar 14, 2008
34,280
To generate the current in either direction through the relay coil requires a 4 transistor bridge.
Edit: You could use a MOSFET H-bridge such as this with 4 complementary MOSFETs in one package .
 
Last edited:

Thread Starter

Jeffery Vahrenkamp

Joined Jun 16, 2016
53
Okay, so it looks like the my first circuit is indeed an hbridge, Though Wikipedia's example is much easier to follow. Does everything look good on the relay control side Figure 3? I don't suppose there is anything low power and solid state like a transistor that works in a nice bidirectional manner like relay?
 

Thread Starter

Jeffery Vahrenkamp

Joined Jun 16, 2016
53
I am using this for a low power thermostat. I already have about a dozen of these relays and I am trying to free up pins on my microcontroller so it can run an LCD display. I also have ~ 25 transistors and am trying to use what I have on hand.

The microcontroller I am using is an esp8266 board (WeMOS mini d). Looks like my numbers were a little off. Each pin can emit up to 12mA at 3.3V. This does not appear to be enough current to switch the pins, however, two pins working together (24mA) is sufficent to flip the relay (This is how my current working board works).

The relay is switching 24VAC power to my AC and furnace. I can't remember what the current is for the thermostat wiring, but I"m guessing < 250mA, certainly less than an amp. I think I will bread board this setup when I get home.. I really need to replace the fuse in my multi-meter so I can measure these things.
 

crutschow

Joined Mar 14, 2008
34,280
Then it sounds like you should stick with the relays and use a 4-transistor H-bridge to drive them.

You might be able to get by with two resistors for the top of the bridge, depending upon the relay, thus requiring just two transistors for the bottom of the bridge.
What is the manufacturer and part number for the relay?
 

BR-549

Joined Sep 22, 2013
4,928
If I am understanding the control strategy correctly......one relay will always be "on" and the other will be "off".

If this is so......cross-wire relays for mirrored/inverted operation.

Only two I/O pins will be needed.
 

Thread Starter

Jeffery Vahrenkamp

Joined Jun 16, 2016
53
If I am understanding the control strategy correctly......one relay will always be "on" and the other will be "off".

If this is so......cross-wire relays for mirrored/inverted operation.

Only two I/O pins will be needed.

I am controlling the relays independently. The first part of the circuit (fig 2) or the hbridge was me trying to figure out how to make a circuit that could switch the relays in both directions. The second half (fig 3) is me controlling the relays with transistors. One relay will turn on the AC and the other will turn on my furnace, so deffinetly don't want them both on at the same time, but also don't want one always on either. I should have just drawn one relay as the number of relays in inconcsequential to my question.

Just cover up the second relay and tell me if when I put the gate on on the two transistors in the figure high, power will be able to flow left to right or right to left.
 

Motardo

Joined Sep 21, 2011
22
I am building a circuit to control reversible latched relays
and I am trying to free up pins on my microcontroller
Hi,
If these are latching relays, you can use series capacitors to turn them on and off with just one pin each. A rising edge will turn the relay on and a falling edge will turn it off. You would still need transistors to get the required current (or double up the uC pins).
 
Top