# Latching Relay Driver

I've selected a potential latching relay for use in a project (switching mains power), but - having been away from electronics for a while - I'm still trying to wrap my head around a couple things. Here's the relay in question:

http://www.digikey.com/product-detail/en/te-connectivity-potter-brumfield-relays/7-1393239-7/PB2014-ND/4925213

1) It says it's rated to 3V. Will 3.3v (my microcontroller (ESP8266) voltage) hurt it?

2) There's no way my microcontorller can source (or sink) enough power to drive this. It needs a 30ms pulse (minimum) at 3V with 21Ω of resistance. If it was NOT a latching relay, I could simply set up a transistor and call it a day - however, I'm not sure how to configure it for this. I know that I'll have to hook up two IO, and drive one HIGH and one LOW (A to HIGH, B to LOW or B to HIGH, A to LOW) for the duration of the pulse in order to switch the "latch" of the relay. Seeing as the IO pins themselves can't source or sink enough power, how do I configure transistors to turn HIGH or LOW depending on the IO? Goodness, I feel like I'm missing something super obvious.

3) Does anybody spot any immediate problems with my idea to use this to switch a mains power line?

Thanks!

1. 3V is the coil voltage. You need to put a resistor in series with a coil to get the correct voltage. Use coil resistance and voltage divider equation to find the resistor value.

2. Here's a typical circuit for driving a latching relay:

Obviously, ensure that the transistors are only turned on for a short amount of time, as they will sink reasonable current.

3. The relay contact is rated for mains voltage, so no problem.

• This is perfect, thanks so much! I assume that the resistor labeled "47" would be replaced with the calculated value? For my relay, I show 21Ω, so to drop 3.3v to 3, I calculate 210Ω? (Did I do it right?) Looking at the diagram, I'm pretty sure I understand how the driver works - however I'm rubbish at selecting a transistor. Any pointers there? – Helpful Oct 4 '16 at 20:13
• @Helpful Well, the "set voltage" is 2.1V, so you don't have to go all the way to 3V. 21 is the lower resistor, so you need more like 2.1R to get 3V. – Armandas Oct 4 '16 at 20:18
• Ah, I see - i was doing the calculations backward. Can you give some pointers toward transistor selection? Thanks. – Helpful Oct 4 '16 at 20:24
• Sorry, this is not perfect, and is in fact wrong. The set and reset voltages are simply the minimum voltages required to operate reliably, in this case 2.1 and 1.7 volts. The relay drive circuit should be designed for 3 volts, not the set voltage. However, the circuit shown ought to work. – WhatRoughBeast Oct 4 '16 at 20:27
• @WhatRoughBeast I always thought that the rated voltage was a limiting value, but it looks like I was wrong. Thanks for pointing that out. – Armandas Oct 4 '16 at 20:43

I see you are still looking at these DC relays. Nice choice, actually. You can select either one coil, or two. The two-coil version would be a bit easier. The one-coil version will require what amounts to a kind of H-bridge (or in amplifier terms, bridge-tied load) configuration. So I get why you are struggling.

That's one way of handling it. Note that the BJTs can be small signal, it seems. But they should be rated for perhaps $400\:\textrm{mA}$ or better, just in case. This will require $10\:\textrm{mA}$ from your I/O pins.