Latching/Non-Latching Relay Driver Circuit with darlington optocoupler
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.







simulate this circuit &ndash; 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.







simulate this circuit