1
\$\begingroup\$

I'm designing a circuit where an ESP8266 controls two types of relays, a single coil latching relay and a normal non-latching relay. The relays are power relays use to control low power electrical appliances such as lights and fans. As the relays will be controlling 240V AC lines, I want to design a driver circuit with optocouplers to isolate the ESP8266 from the relays. Based on my research I have come up with a driver design for each type of relay as shown below.

These are the components that I'm planning on using :

This is pretty much the common driver circuit for a simple non-latching relay. However, most driver circuits wire the optocoupler to another transistor which then drives the coil. Since I'm trying to save some space I was wondering if its possible to use a darlington optocoupler instead which can handle the high currents from the relay coil?

schematic

simulate this circuit – Schematic created using CircuitLab

I'm not very confident with the driver for the single coil latching relay as its not very common. Hence, will this circuit work? Will the lack of diodes cause any long term effect to the circuit?

schematic

simulate this circuit

I'm hoping for this circuit to be able to last long and be durable. Any kind of advice and help will be much appreciated. Thank you in advance.

\$\endgroup\$
1
  • \$\begingroup\$ No it won't work. You need full push pull drive (4 transistors) for a single coil latching relay. \$\endgroup\$
    – Henry Crun
    Aug 5, 2018 at 8:36

1 Answer 1

2
\$\begingroup\$

This is an easy, single chip circuit that generates the latching pulse itself.

You can use any opto at all (doesn't need darlington). Select R2 for opto used.

When the opto changes state, R1,C2 delay the signal for the relay latching time. During this time, The two outputs will be in different states so there will be voltage across the relay.

After the delay has elapsed, both outputs are at the same level, and the relay is not energised.

74AC cmos is used as it can drive 24mA per output i.e. 48mA can drive a 40mA coil. 74A14 is schmitt input inverter for clean switching from the opto.

schematic

simulate this circuit – Schematic created using CircuitLab

If the 5V power supply is only being used for this, use 5.5V instead, and have a better drive margin if required.

You can of course use another 74AC14 to drive the ordinary relay as well.

You do always have to initialise latching relays to the correct initial state.


If you were determined to use darlington optos, this would work. In this case diodes are not needed as the flyback flows through the resistor. Note the relay is 5V, not 12V. You also need 10-15mA opto-led current.

schematic

simulate this circuit

\$\endgroup\$
3
  • \$\begingroup\$ What are the purpose of the NOT gates? Is it just acting as a buffer? I would not like to use the first design so much as its very space consuming. Will the second design you provided have any problems in the long run? Why must the supply voltage be higher than the rated voltage of the relay? Thank you \$\endgroup\$
    – Max
    Aug 6, 2018 at 11:04
  • \$\begingroup\$ @Max Invertors come 6 of them in one IC. They are schmitt trigger invertors, which cleans up the slow rising signal from the RC. (and the opto). They are the specific 74AC14 type, that is able to drive your 40mA) relay coil. When you drive a single coil latching relay, you need push pull drive. That means either 4 transistors or 4 darlington optos, or you can fudge using 2 resistors as shown, but you need the extra voltage for the resistors. \$\endgroup\$
    – Henry Crun
    Aug 6, 2018 at 21:14
  • \$\begingroup\$ I see will something like a H-bridge driver work? Either self-made or in a chip like the L293D. \$\endgroup\$
    – Max
    Aug 7, 2018 at 0:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.