Simple way to flip/flop polarity for a relay coil?  From ESP32 - Page 1
Forum section: electronics / projects

author: viper
author_rank: Regular Contributor
timestamp: October 11, 2025, 11:26:24 pm
content: Brain is foggy. Looking to drive a simple latching relay coil that needs a brief bump of like 150mA to change states. On a single coil design, the just need the polarity flipped to reverse state. I simply can't think of the easiest way to do this, but I'm sure there is one. Biggest thing is I would prefer either a single drive pin from an ESP32, or some sort of redundancy that protects all circuits from accidental dual driven mess, by design. So even if software has a bad day, it can only be in one drive state. I was thinking about a sort of N/P fet chip, but I can't mentally figure out if/how that is a solution. I can't drive a gate negative relative to GND so that may not work.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: October 11, 2025, 11:46:39 pm
content: What voltage coil ?There are many motor bridge drivers that can manage this, they usually have 2 pins and 4 states.An example is GC9111 at lcsc ~ 6c 2-6V 480mΩ SOT23-6and it drivesZZHLLHLL

author: viper
author_rank: Regular Contributor
timestamp: October 12, 2025, 12:04:26 am
content: Quote from: PCB.Wiz on October 11, 2025, 11:46:39 pmCoil voltage is 6V nominal. Will work within a range. Want to just drive it from bat voltage with a series R for saffty. Appreciate it! I'm sure this is a common issue for folks. Just trying to find a clean and easy way to do it.

author: NiHaoMike
author_rank: Super Contributor
timestamp: October 12, 2025, 12:36:26 am
content: How about a half bridge of some sort driving the coil through a capacitor?

author: langwadt
author_rank: Super Contributor
timestamp: October 12, 2025, 12:52:12 am
content: Quote from: PCB.Wiz on October 11, 2025, 11:46:39 pmfor only 150mA probably also a lot of dual low side gate drivers that would work

author: ledtester
author_rank: Super Contributor
timestamp: October 12, 2025, 02:34:25 am
content: Here is a discussion:https://forum.arduino.cc/t/single-coil-bistable-latching-relay/349420The basic idea is this:Demo of the idea using using ULN2801:https://dzrmo.wordpress.com/2021/08/28/single-coil-latching-relay-test/Related discussion:https://www.eevblog.com/forum/beginners/suitable-driver-for-latching-relay-array-from-mcu/More ideas:https://www.talkingelectronics.com/projects/200TrCcts/101-200TrCcts.html#20

author: Psi
author_rank: Super Contributor
timestamp: October 12, 2025, 02:38:04 am
content: Single coil latching relays are so annoying, I just avoid them.The only time it might make sense to use one is when you have both +ve and -ve rails.The footprint of dual vs single coil is usually the same. So no savings there.The cost might be a little less on the single coil but it's still got two coils inside, so the cost savings is really just down to the extra pins on the package which is negligible.Your back EMF diode protection on a single coil needs to be a bi-directional TVS/diode, which means you're not clamping it to ~ -0.7V, you're clamping it to ~ VCC + 0.7V. Which can cause issues.So it's just better to select a dual coil and not have to deal with it.

author: Uunoctium
author_rank: Frequent Contributor
timestamp: October 12, 2025, 02:42:39 am
content: push pull (output stage of IC) stepper application, found in a vintage electromechanical dashboard-clock

author: Psi
author_rank: Super Contributor
timestamp: October 12, 2025, 02:47:11 am
content: hm.. using a single coil relay that is rated to work at 1/2 your VCC and then using a cap based voltage divider to charge up two caps and dump one into the relay is an interesting idea.Cant say I've seen that idea before, its kind of cool

author: jwet
author_rank: Frequent Contributor
timestamp: October 12, 2025, 03:51:04 pm
content: Capacitive drive of single coil latching relays from a single pin is a really elegant way to do this. I was going to suggest it but your 150 mA requirement is too high for a micro pin to do it and you're back to all these 1/2 bridge and bridge drivers, Arduino and other modern uP pins can sink and source only 30-40 mA. Side note- CMOS outputs are half bridges albeit at a lower current. Two make an H-Bridge.The first time I ever saw this technique was in the Elecraft T1 Mini Amateur Radio Antenna Tuner. The design is by Wayne Burdick, a very elegant RF designer. Antenna tuners have this problem in spades and making a little antenna tuners are challenging. These have large banks of binary weighted L's and C's that are swtiched in an out with relays. The manual for this tuner is online including the schematic. You don't have to 1/2 voltage relays but you can, you just need to ensure that you size the C to give you enough current (C dV/dt) to drive the coil long enough. Its sort of energy transfer things. (btw- studying Elecraft Schematics is enertaining and enlightening- lot of clever techniques)Good luck.

author: Terry Bites
author_rank: Super Contributor
timestamp: October 12, 2025, 03:59:33 pm
content: https://www.analog.com/en/resources/design-notes/ic-drives-up-to-four-singlecoil-latching-relays.html

author: jwet
author_rank: Frequent Contributor
timestamp: October 12, 2025, 04:18:56 pm
content: I defined those parts at Maxim and wrote that note!I worked on relay drivers for a while and Maxim designed a quite a few. The appplication was in DSL provisioning boxes back around 2005. The problem was building big cross points on the back of DSLAM's to route pairs for the last mile.

author: viper
author_rank: Regular Contributor
timestamp: October 12, 2025, 05:05:18 pm
content: https://static.3peak.com/res/doc/ds/Datasheet_TPM8837E.pdfCurrently considering this little guy. Seems to fit the job...? I'll have to dig more to see what output protections I might even add. maybe a bidirectional tvs and series resistors, even though this chip is internally limiting.

author: viper
author_rank: Regular Contributor
timestamp: October 12, 2025, 07:46:42 pm
content: Curious if anyone here might be willing to peek at that data sheet I linked? I have a question on it, or at least I believe there might be an error. In the electrical specs, it's showing basically an "active state" quiescent I of 340-500uA, but down in the nA in sleep mode. However, the graphs in the data sheet show the VM and VCC quiescent with Nsleep at 0V to be like the active current. I suspect those graphs should indicate Nsleep=Vcc voltage or something. ?I guess I need to be sure because this chip would almost never run so 340-500uA is not acceptable. My other option was just to power the Vcc from a GPIO from the MCU directly when that IC needs to run, but I think the sheet may be in error.

author: jwet
author_rank: Frequent Contributor
timestamp: October 12, 2025, 09:43:33 pm
content: That has to be typo- believe the spec table. In my experience, the data sheet spec table is wrung out between design and test. The typ. ops are generated by apps people in the process of writing the data sheet and no reviewed so well.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: October 12, 2025, 09:45:43 pm
content: Quote from: viper on October 12, 2025, 07:46:42 pmThat part has level shifters and a charge pump, hence the 100's uA operate current.They have a sleep pin for << 1uA at room temp. Those sleep curves arenAI see this part is 1v8-8v5 and they have the explicit IP = LL = ZZ out, as also a special standby mode. Seems sensible.Both IP low for > 10ms gives < 0.5uA, otherwise ~ 500uA.https://www.lcsc.com/product-detail/C7431433.htmladdit : also this part in SOT26 has the same IN1=IN2=”L” -> ZZ and < 1uA standbyhttps://www.lcsc.com/product-detail/C46613954.html