I've been looking for a way to control a latching relay with a microcontroller that doesn't quite have enough current on the output pins to operate it directly. I found this intriguing circuit using a 220uF capacitor and an NPN transistor, but haven't had any luck getting it to work as described.

The circuit I'm referring to is the first one on this page, labeled "Pulse Latching Relay On/Off":

Transistor Circuits: Latching Relay

Here it is below:


simulate this circuit – Schematic created using CircuitLab

From the circuit description:

The circuit above produces a strong pulse to latch the relay ON and the input voltage must remain HIGH. The 220u gradually charges and the current falls to a very low level. When the input voltage is removed, the circuit produces a pulse in the opposite direction to unlatch the relay.

Problem is, the circuit doesn't work. They don't clearly label the inputs, but I gather that top is (+) and bottom is (-), and the 10K operates as a pullup, holding the transistor open to discharge the capacitor. When the lower input is connected to ground, the transistor switches off, and here's where I get confused. Is there supposed to be electron flow from base to emitter to charge the capacitor via the coil? Seems that would reverse-biase the BE junction and current wouldn't flow.

My attempts to breadboard this with a T2n3904 and a 470uF electrolytic have failed.

Is this circuit bogus or am I just stupid?

  • \$\begingroup\$ Are you using a latching relay? They are not "normal" relays and the circuit requires one. \$\endgroup\$
    – user3624
    Apr 14, 2013 at 23:08
  • \$\begingroup\$ Yeah, I'm using a single-coil latching relay, which latches/resets with opposite polarities. I've tested the circuit with dual opposite-biased LEDs too, no light flicker in either direction to indicate a charge/discharge. \$\endgroup\$
    – QuadrupleA
    Apr 14, 2013 at 23:14
  • \$\begingroup\$ I think the top wire is the control signal, and the bottom wire is always grounded. \$\endgroup\$ Apr 14, 2013 at 23:40
  • 1
    \$\begingroup\$ Now you know why the book was so cheap ... the circuit is totally bogus. \$\endgroup\$
    – Dave Tweed
    Apr 15, 2013 at 0:09
  • 1
    \$\begingroup\$ Unless there's something missing from the circuit and/or description, I don't see how this circuit could work. When Q1 is on, there is a path through which C1 can discharge through the relay coil. However, when Q1 is off, the lower end of the relay coil is floating. Since C1 is in series with the relay coil, there is no path for current to charge C1. \$\endgroup\$ Apr 15, 2013 at 0:40

3 Answers 3


The circuit, as drawn, does not work.

Furthermore, even if it did work, it is doing so by horribly abusing the transistors base-emitter junction diode, which can potentially damage the transistor.

It's worth noting that it is possible to make the circuit work. As far as I can tell, the person drawing the diagram simply forgot a diode:

enter image description here

The pull-up resistor also needs to be somewhat smaller, in order to turn Q1 on hard enough that the generated current waveform is appropriately symmetric. It's 10K in the above image, but 1K works much better.

  • 1
    \$\begingroup\$ @QuadrupleA - Click the image and find out! \$\endgroup\$ Apr 15, 2013 at 1:30
  • 1
    \$\begingroup\$ +1 for finding a fix, rather than the trivial "It doesn't work" answer I was toying with. Mark of an engineer better than me. \$\endgroup\$ Apr 15, 2013 at 8:13
  • 2
    \$\begingroup\$ I like your "it probably worked at some point" approach, I'm going to try and apply it myself in the future. Who says you cannot teach an old dog new tricks! \$\endgroup\$ Apr 15, 2013 at 8:49
  • 2
    \$\begingroup\$ @JohnU - Because it's doing something clever that would take a lot more transistors to do normally with MCU GPIO. It actually drives current both ways through the relay coil, which is exactly what you need for a single-coil bistable relay. When you toggle the input high, it charges the 220 uF cap through the relay coil. When you set the input low, the cap discharges through the second transistor, driving current the other way through the relay, toggling it's state back. \$\endgroup\$ Aug 8, 2013 at 9:12
  • 1
    \$\begingroup\$ Yeah -- page 43 of the Omron doc linked (or page 6 of the G5A datasheet for that matter) has the circuit, complete with diode -- keep in mind that Omron has patented it, though! (It's Japanese patent number 1239293 at least according to Omron's labeling, but I can't find that patent anywhere online, which is quite annoying -- if anyone finds it, please link it here so that we have an idea of when it expires!) \$\endgroup\$ Oct 5, 2016 at 2:01

Both OMRON and MATSUSHITA published this as a C circuit module in apps notes some 15-20 years ago. So they must know what they were doing. Anyone who remembers the thick A4 Relay catalogues that they used to publish, it was in there.

  • 2
    \$\begingroup\$ Perhaps this post belongs to the comments section, rather than as an answer to this question. Since you do not have sufficient reputation on this site to post comments anywhere, please participate, post good questions or answers, and you will soon have sufficient reputation to post a comment. \$\endgroup\$ Jul 25, 2013 at 13:22
  • 1
    \$\begingroup\$ I'd say it's a useful answer, I suspect the circuit is not totally bogus but rather it requires the correct selection of components (relay included) to work properly. \$\endgroup\$
    – John U
    Jul 25, 2013 at 13:47

I had the same problem believing the cct must work (but how?). I have now constructed and used the diode inclusive cct without any problems, both in the one transistor and two transistor types. The cct can be found in the application notes from Omron, its worth a visit. http://www.omron.com/ecb/products/pdf/precautions_pcb.pdf

  • 1
    \$\begingroup\$ I'd be worth including a summary / image of the schematic you used in case the link dies. It's also quite a long document and not that clear which circuit you're referring to. \$\endgroup\$
    – PeterJ
    Nov 3, 2013 at 4:07

Your Answer

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

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