Suitable driver for latching relay array from MCU - Page 1
Forum section: electronics / beginners

author: sijmen
author_rank: Contributor
timestamp: July 23, 2021, 11:50:12 pm
content: Hi,I have a project where I need to drive 30 Omron G6KU-2F-Y 3VDC latching relays. These are single coil latching relays.My plan was to use a microcontroller connected to a serial to parallel register (several of them) and then somehow drive each coil through 2 pins from the output of the register. In this way, I could control the direction of the current through the coil.... I think.My problem is, from the following datasheet, I can see that the 3 volt relays require 33mA to drive the coil, which is much higher than what any serial to parallel register can handle.https://au.mouser.com/datasheet/2/307/en-g6k-348800.pdfIs there any recommendations for an component I can use between the Serial to Parallel Register and the relay coil with sufficient power output, other than resorting to using discrete transistor and the like, which would make my board design too complex. I was thinking something like an Opto Isolate array with darling transistors might work. I wonder if an opto isolator would even work in this situation.Appreciate any information.Regards,Sijmen.

author: themadhippy
author_rank: Super Contributor
timestamp: July 24, 2021, 12:28:56 am
content: QuoteDoes it need to be opto isolated?if not uln2803 or uln2001-2004 maybe suitable

author: MasterT
author_rank: Frequent Contributor
timestamp: July 24, 2021, 12:42:16 am
content: TPIC6B595, TPIC6B596, TPIC6C595, TPIC6C596

author: Ian.M
author_rank: Super Contributor
timestamp: July 24, 2021, 03:54:50 am
content: None of those chips are suitable for driving single coil latching relays, which require opposite coil polarity for their lathing and unlatching pulses.Basically, to drive a single coil you need a small H-bridge. If the supply is only 3.3V with 3V relays, you'd need a low-voltage MOSFET H-bridge.If you can get away with only changing one relay at a time, you can get away with arranging the N coils in a chain and only use N+1 half H-bridges.Due to the low current and shortish pulse time, you may be able to get away with using MOSFET drivers in place of H-bridges.If you need to be able to arrange the coils in a matrix to reduce the number of drivers, you basically need four steering diodes per coil (which had better be Schottky due to the low voltage drop requirement), and a double matrix with separate row lines for drive high and drive low, and the same for the column lines. Its *NOT* worth it unless you've got ludicrous numbers of single coil latching relays to drive!

author: Calvin
author_rank: Regular Contributor
timestamp: July 24, 2021, 09:37:51 am
content: Hi,I had a similar prob and haven´t found any part specialized on this functionality.There had been special ICs from SDS in the 90s iIrc ...but those are long obsolete.Even asked here in the EEVBlog and no one knew anything.So I put together a discrete circuit.(rem: the part around Q1 and Q2 is just for LED-Indication).C18 stores the energy for the resetting pulse.It´s value needs to be designed to match the Relay´s (K10) requirements.regardsCalvin

author: Gyro
author_rank: Super Contributor
timestamp: July 24, 2021, 09:52:45 am
content: Have you purchased the relays yet? I notice there are 4.5V and 5V coil variants too, with correspondingly lower coil currents.A bit of an off-the-wall solution would be to use pairs of 74ACT540 inverting and ACT541 non inverting buffers. Each of the data inputs would be be connected together, also the output enable pins. The relay coils would be then connected between respective pins of the two buffers.This would provide 8 differential coil drives per pair of buffer packages, with output tri-states to allow pulse driving of the coils. If you check the 74ACT54x datasheets, they are rated for 24mA per output, with Absolute maximum rating of 50mA (both output and VCC/GND current per pin). 33mA is pushing the specs a bit, but things get better for 4.5 and 5V coil variants. The relays have a 'must operate' voltage of 80% of rated voltage.I've used a similar approach for switching sensitive relays in an audio attenuator. It's probably not something you would want to put into production, but for a one-off project it should be fine. It would of course require 8 packages (4 of each) to drive 30 relays.Remember that 74ACT are fast devices and with the accumulated current of 8 relay coils will be quite high, so you need to provide good local decoupling. On the up side, relays are slow devices which are insensitive to a bit of output noise. You should also avoid output enabling the buffers for longer than is needed to flip the relays.P.S. You could also significantly reduce the control signal requirements by commoning the inputs of all the buffer pairs and selecting which block of 8 relays is to be toggled using the output enables. This would reduce the control signal requirements to 8 data bits + 4 output enables, at the cost of not being able to toggle all 30 relays at the same instant (but very closely).

author: voltsandjolts
author_rank: Unknown
timestamp: July 24, 2021, 12:16:48 pm
content: I prefer dual coil latching relays as they just need a couple of transistors to drive them, single coil is a bit more faff.There are quite a few options. You could use BJT common emitter followers. Or a dual mosfet gate driver, like IX4426 or whatever.

author: dietert1
author_rank: Super Contributor
timestamp: July 24, 2021, 01:00:02 pm
content: In the thread about low thermal EMF scanners, you can look here:https://www.eevblog.com/forum/projects/diy-low-thermal-emf-switchscanner-for-comparisons-of-voltage-and-resistor-stand/msg610758/#msg610758. He showed how to drive the coil with a capacitor and how to parallel multiple gates to get the necessary drive current.In my own build i am using 74ACT138 parts to address each coilhttps://www.eevblog.com/forum/metrology/scannermultiplexers-for-voltage-references/msg3569019/#msg3569019.Regards, Dieter

author: Zero999
author_rank: Super Contributor
timestamp: July 24, 2021, 03:30:24 pm
content: Quote from: Gyro on July 24, 2021, 09:52:45 amI wouldn't worry about exceeding the maximum current rating of the buffers. The latching relays only need to be switched on for 3ms and the ICs should be able to withstand a much higher current, for that length of time. The buffers might not be able to drive 5V relays, off a 5V supply, due to the voltage drop, of the relatively high resistance outputs, but stand more of a chance with 3V relays.

author: MasterT
author_rank: Frequent Contributor
timestamp: July 25, 2021, 01:38:56 am
content: Onsemi makes PCA9655E port extender. Serial I2C, 16-bits, 50mA.https://www.onsemi.com/products/standard-logic/i-o-expanders/pca9655eOrQuotehttps://www.onsemi.com/products/standard-logic/i-o-expanders

author: dietert1
author_rank: Super Contributor
timestamp: July 25, 2021, 05:28:44 am
content: Datasheet, Table 4, Note 6: Each output must be limited to 25 mA output current. Roughly the same as ACT logic. There is a difference between destructive limits and operation limits.Regards, Dieter

author: sijmen
author_rank: Contributor
timestamp: July 25, 2021, 01:27:27 pm
content: Thank you everyone for all the feedback, but I think I might have found a suitable driver in the MAX4821, after having come across the following article:IC drives up to four single coil latching relays -https://www.eetimes.com/ic-drives-up-to-four-single-coil-latching-relays/For anyone interested, the datasheet is here:https://datasheets.maximintegrated.com/en/ds/MAX4820-MAX4821.pdfIn my case I think the MAX4820 is better suited for my needs because I can daisy chain multiple together and send the data in serially, to then control all 30 relay in one pulse. The MAX4821 is quite a bit more expensive than I hoped, but having found it, I now have a starting point of what I'm looking for, (I think) and can look for cheaper alternatives.Regards,Sijmen.

author: Ian.M
author_rank: Super Contributor
timestamp: July 25, 2021, 01:55:23 pm
content: Hmm... Your datasheet link is borked!Have you *READ* theMAX4821datasheet? The MAX4821 is open drain, hence the pullup resistors in the EDN design. If you chose the 3V relays because your supply is 3.3V you are S.O.L. because the pullups + relays need 5V to get 3V across the relay coil.OTOH if you've *got* a 5V rail with enough current capability (and remember, the pullup will draw an extra 100mA when that side of the coil is pulled down). it should work adequately - *IF* you can source the parts!sci.electronics.design saying: "Friends dont let friends buy Maxim!"https://www.eevblog.com/forum/chat/is-designing-with-maxim-worth-the-effort/https://www.eevblog.com/forum/projects/maxim-love-_em-or-hate-_em/

author: dietert1
author_rank: Super Contributor
timestamp: July 25, 2021, 04:48:56 pm
content: Yes, the eetimes proposal is bad. When driven low the 50 Ohm pullup takes 100 mA from 5 V, so it already exceeds the 70 mA output spec of the driver. Nothing left for the coil.You could replace each pullup resistor by an active pullup, i.e. a small p-channel mosfet driven by the same pin of the driver. Plus weak pullups. Four extra parts per relay instead of two.Regards, Dieter

author: Kleinstein
author_rank: Super Contributor
timestamp: July 25, 2021, 05:22:38 pm
content: It is slight overkill, but mosfet gate drivers like TC4428, MIX4427, MCP14A... and similar are an option. However most types want at least 4.5 V supply.The coil would be between 2 such drivers. More relais could be used as a chain - to N+1 drivers for N relais.With some limitation to the initial phase one could also use 1 driver and a series cap (some 100 µF).With a 5 V supply something like 2 parallel channels of a ACT540 (or similar) each could also work.The method with the extra resistors to one side would need a higher rail (e.g. 2 x coil voltage) and more powerfull drivers, like ULN200x.

author: Ian.M
author_rank: Super Contributor
timestamp: July 25, 2021, 05:36:55 pm
content: @Dieter: Whoops, I didn't spot that the driver is only guaranteed to sink 70mA!

author: Gyro
author_rank: Super Contributor
timestamp: July 25, 2021, 09:19:21 pm
content: Quote from: Zero999 on July 24, 2021, 03:30:24 pmQuote from: dietert1 on July 25, 2021, 05:28:44 amYes, I didn't claim that it was a perfect design, but I think it would work for a one-off.The 4.5V relay pulls 23mA, and the 5V pulls 21mA, both at rated voltage of course, before the voltage drops of the ACT outputs. The bistable relay has a 'must operate' voltage of 75%.It would take a little bit more fiddling with the specs and a calculator to double check but I think it's workable with 4.5V relays. With 5V supply, the guaranteed ACT tristate output voltage drops are ~0.75V (high) and ~0.44 (low) @24mA so about 1.2V total (typical at 25'C is more like 1V total). With the 4.5V relay you need a minimum of 3.4V to guarantee switching. leaving 400mV of slack for the full temperature range ACT spec (600mV typical at room temperature).A little slim, I agree, but achievable. Bumping the supply up to 5.5V would make things more comfortable (approx nominal coil voltage). The ACT logic would be operating within spec, and at half absolute maximum rating.The 3V relay would work too, the 33mA current would probably increase the voltage drop of the ACT outputs to bring the coil voltage to nearer 3V (the ACT spec sheet stops at 24mA). Itisdefinitely pushing the outputs harder though (outside nominal spec) - depending on how frequently the relays are going to get switched.Switching the relays in blocks of 8 (even if closely timed) would drop the peak supply current to something more acceptable - 30 relays switching simultaneously at 33mA is almost an amp. 8 relays at 23mA is only 184mA.

author: sijmen
author_rank: Contributor
timestamp: July 25, 2021, 11:07:06 pm
content: Quote from: Ian.M on July 25, 2021, 01:55:23 pmThanks Ian.M, I've now fixed the links.Yes, I did read the datasheet, but being honest, some if it didn't make sense. However, its from the helpful information from people like yourself which helps me focus in on those areas which I need to understand. I really do appreciate the feedback.Originally I was thinking I could run the whole circuit from a 3.3V source, but I've come to the realisation I'll need it to be 5v.Regards,Sijmen.

author: BrianHG
author_rank: Super Contributor
timestamp: July 26, 2021, 02:20:55 am
content: Have you considered low-side gate driver ICs. They can drive a good 1 amp out, do a logic level conversion from 3.3v to their VCC & you can run them with 12v relays if you like since they can usually be supplied with anything from 5v to 18v dc.Your only problem is that you get 2 per device.Something like a IX4340UETR from IXYS may work.What about combining the Toshiba's 'TBD62789APG' for high side with a normal 8 transistor array for the pull down?How about the MC33880?You can always use dual low voltage logic level N/P channel mosfets.Like the diodes incorporated 'ZXMHC3A01T8'I used to use one similar to these as a common and doubled my MCU outputs in parallel to drive 5v latching telecom relays in an array.

author: Zero999
author_rank: Super Contributor
timestamp: July 29, 2021, 07:59:50 am
content: If you have a 5V supply. How about this. Horribly inefficient, cheap and nasty, but will work. The relay only needs a 3ms pulse to activate, so perhaps the inefficiency is tolerable.By the way, it doesn't need any diodes, because the resistors dissipate the back-EMF quite nicely.

author: Kleinstein
author_rank: Super Contributor
timestamp: July 29, 2021, 08:16:01 am
content: The lenght of the requited pulse depends on the relais type. With 3 ms the relais may just reactor, but for a reliable operation it may need a slightly longer pulse. Some recommend 20 ms. Still this is a relatively short pulse and can be OK.

author: Zero999
author_rank: Super Contributor
timestamp: July 29, 2021, 08:20:36 am
content: Quote from: Kleinstein on July 29, 2021, 08:16:01 amYou're right. I misread the data sheet. The minimum set/reset pulse width is 10ms but it's a good idea to use longer pulses.https://au.mouser.com/datasheet/2/307/en-g6k-348800.pdf

author: Terry Bites
author_rank: Super Contributor
timestamp: July 29, 2021, 01:19:22 pm
content: Once youve solved the drive curent issue, you can use the "C" circuit to latch and unlatch.https://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwjEp4rDrojyAhVSi1wKHWOBAuIQFjAEegQIDBAD&url=https%3A%2F%2Fwww.te.com%2Fcommerce%2FDocumentDelivery%2FDDEController%3FAction%3Dshowdoc%26DocId%3DData%2BSheet%257F1-1773931-5%257F0717%257Fpdf%257FEnglish%257FENG_DS_1-1773931-5_0717.pdf%257F1-1773931-5&usg=AOvVaw2b0tm96w2TU_od0mCjaxLv

author: voltsandjolts
author_rank: Unknown
timestamp: July 29, 2021, 02:21:58 pm
content: Attaching that linked PDF here for posterity...C-circuit refers to the capacitor in series with the relay coil option (similar to the LTspice circuit shown above).

author: Zero999
author_rank: Super Contributor
timestamp: July 29, 2021, 04:13:52 pm
content: The downside with the capacitor is the latching relay must always be operated in one direction, when the power is first applied. I suppose two capacitors could be used, but it would act as a voltage divider.Here are a couple of more ideas. Both are more complicated than the previous, but have the advantage of only requiring one MCU pin, per relay. Setting it to the H-Z state will turn the relay off.The first one uses all common emitter transistors. It has a high quiescent current and low saturation voltage, so the relay & MCU can be powered off 3V. The resistors on the left hand side of the bridge are a slightly lower value, to compensate for the output resistance of the MCU.The second one uses an emitter follower for the one side of the bridge so can't really work well off 3V, but will be fine from 5V and 3.3V might be adequate.It's important to select resistor values, to keep the base voltage low enough, to prevent the transistors from turning on in the quiescent state.D1 to D4 can be bridge rectifier modules, or dual diodes, to keep the part count low.

author: Ian.M
author_rank: Super Contributor
timestamp: July 29, 2021, 05:29:08 pm
content: A MOSFET version of Zero999's first H-bridge circuit reduces the component count considerably as it eliminates the diodes and half the resistors.However to avoid severe shoot-through, its essential to chose MOSFETs so the total N and P MOSFET gate threshold voltages add up to greater than the supply voltage, while still providing a low enough Rds_on when driven to the rail, which limits the supply voltages it is suitable for. LTspice sim attached.

author: voltsandjolts
author_rank: Unknown
timestamp: August 01, 2021, 09:36:03 am
content: Quote from: Zero999 on July 29, 2021, 04:13:52 pmI think that is actually good practice.Latching relays can be affected by mechanical shock, so you can't guarantee which state they're in at power-on.So it's best to flick them to 'default state' at power-on anyway.

author: Kleinstein
author_rank: Super Contributor
timestamp: August 01, 2021, 09:41:19 am
content: The capacitor circuit may still need 2 switching cycles, if one can not guarntee the state of the capacitor (e.g. a short brown out to cause a reset).To be save one would need to first set and than reset. The first step after a reset may not work.With modern parts a driver (e.g. gate drive chip or 2/8 of an HC540) may be cheaper and smaller than the capacitor.

author: Zero999
author_rank: Super Contributor
timestamp: August 01, 2021, 09:46:22 am
content: Quote from: voltsandjolts on August 01, 2021, 09:36:03 amThen use another contact to monitor the state of the relay.

author: voltsandjolts
author_rank: Unknown
timestamp: August 01, 2021, 10:03:26 am
content: That might be an impractical idea, since a relay is often used for its isolation properties.Edit:...ahh, I see, buy a more expensive relay with more contacts to sense position. Hmmm, yuk.

author: dietert1
author_rank: Super Contributor
timestamp: August 01, 2021, 12:03:54 pm
content: You can also use a dual coil relay and use one coil as motor and the other one as sensor. An example is here:https://www.eevblog.com/forum/metrology/scannermultiplexers-for-voltage-references/msg3559537/#msg3559537Also i don't get the problem: If you want the relay in a certain state, drive it to that state. The relay scanners i built have been operating for months without any problem. Unreliable or unexpected switching was not observed.Regards, Dieter

author: Kleinstein
author_rank: Super Contributor
timestamp: August 01, 2021, 03:37:11 pm
content: Dual coil relays can even use a switch matix with diodes if many relays are needed. However that are also some nasty side effect from induced voltage in the not used coild. So things are a bit more complicated, but it is possible. So for some 8 relays (and thus 16 coils) one could use a 4x4 matrix with 4 high side and 4 low side drivers and 1 diode for each coil.

author: fastbike
author_rank: Regular Contributor
timestamp: August 31, 2022, 09:31:05 am
content: I'm a little late in following up but not sure if you ever got the answer you want.I'm using the following circuit with 12V single coil latching relays (Finder 40.61.6.xx), it was sourced form an existing 3 relay mcu controlled device. Each circuit has has two control pins from the mcu, a approx 20mSec pulse toggles the state (check your relay data sheet)