Determining current position of latching relay? - Page 1
Forum section: electronics / beginners

author: LinuxHata
author_rank: Frequent Contributor
timestamp: July 09, 2023, 06:23:51 am
content: Hello.Say there is a circuit, which uses two coil, latching relay.We don't have access to relay contacts, so we don't know, in which position it currently is.Is there a way to determine position indirectly?What I thought is that coil, to which the anchor currently is attached, will have higher inductance, right?So by measuring it, theoretically, position can be determined. But how to do this in real life circuit, without making it too complex and expensive? Feed some AC thru the coil and use ADC of MCU to check the voltage change?

author: Doctorandus_P
author_rank: Super Contributor
timestamp: July 09, 2023, 08:23:33 am
content: At the moment a coil is turned on, the risetime of the current through the coil depends on it's inductance.You of course have to keep the current low enough, so the relay will not activate.Simplest way is to put an PNP transistor in the power supply, then to the relay coil, and then to a series resistor.Maybe add a comparator to get a more defined threshold (compared to a direct microcontroller input (Use 2 R's as a voltage divider)This probably also only works on the coil that turns the relay "on".But you will have to do some experimentation to determine whether the difference in inductance is big enough to make a reliable measurement.Another method is to add a Set / Reset flipflop to remember which coil was activated last.But this assumes the flipflop always has power.You can also use a (small) second bistable relay and set the coils parallel to the first one.But of course this assumes the relay's never get out of sync. Bistable relays can get reset by mechanical shock or vibration

author: LinuxHata
author_rank: Frequent Contributor
timestamp: July 09, 2023, 09:45:06 am
content: Relay has two coils, and "memory" idea by using flip-lfop or whatever else, won't work, because power can be on/off randomly.I'll measure indctances tomorrow and write back.

author: EPAIII
author_rank: Super Contributor
timestamp: July 09, 2023, 01:07:07 pm
content: Hard to say what would work for any particular relay. Even with two coils, a latching relay can work in different ways so you may or may not be able to detect anything with a test signal. Then you say there is no access to the contacts, but that is a vague statement. Electrical access? Mechanical access? Visual access? None of the above?Perhaps if we knew what you DO have access to we could better answer this.I can think of a few ideas. If you have access to the circuit both on the common and on at least one of the switchable contacts, you could introduce some kind of "out of band" signal on the common and then detect it on one or both of the switchable contacts. So, if an AC signal is normally passed in the relay, perhaps a DC level could serve as that "out of band" signal. Or if it is DC that is normally controlled, then an AC signal would work. Or just a different AC signal. Or a spike that could be detected by logic chips.I fear you will need to do some experimenting.

author: Manul
author_rank: Super Contributor
timestamp: July 09, 2023, 01:42:40 pm
content: I think the difference will be very small, a few percent at best. I would definitely target measuring both coils at the same time, aka differential measurement. Otherwise noise will be a big issue.

author: Siwastaja
author_rank: Super Contributor
timestamp: July 09, 2023, 02:49:44 pm
content: Depending on relay design, the change in inductance can be quite large even. A fixed-length on pulse, short enough not to actuate the relay, with current measurement timed at the end of pulse, could work. Most microcontrollers allows a timer module to give a single output pulse and also trigger ADC sampling from the same timer, at the specified counter value. All you need is some way to measure the current, e.g. shunt resistor.

author: David Hess
author_rank: Super Contributor
timestamp: July 09, 2023, 06:34:17 pm
content: Quote from: LinuxHata on July 09, 2023, 09:45:06 amA CMOS flip-flop will draw less than a microamp of quiescent current, so even a small lithium cell will allow it to retain state for decades.

author: floobydust
author_rank: Super Contributor
timestamp: July 09, 2023, 07:12:36 pm
content: I was responsible for a handheld multimeter product using latching relays, for range and function.They kept coming in for repairs, reading incorrectly.Turns out, the users would drop or bang/bump the multimeter and the latching relays would flip.The firmware never pulsed the relays unless it had to, so sometimes a range/function change could fix it.It drove the techs crazy because all the electronics worked fine.My policy with latching relays, always pulse them on power up or at least once where you can keep them in the expected state.If you have the energy to compare the two coil's inductance, I think it's easier to give them a blip.

author: LinuxHata
author_rank: Frequent Contributor
timestamp: July 10, 2023, 05:36:56 am
content: Haha, I'm actually designing a handheld multimeter for myself, and some latching relays will be used. Why I want to "read" them and avoid unnecessary "pulsing" is that mechanical reason, that they can change position on drop/impact, etc.

author: CosteC
author_rank: Regular Contributor
timestamp: July 10, 2023, 07:07:39 am
content: I had doubts if dual coil latching relay coils inductance changes with position of contacts. So I measured it.@ 1 kHz inductance was 43.3 mH and 37.5 mH. Measured with LRC bridge.It is measurable then, at least for EA2 relay.Does it make sense? Not much. Complexity of such measurement and probable need for calibration makes is systemic nonsense comparing to simple "just pulse it".

author: dietert1
author_rank: Super Contributor
timestamp: July 10, 2023, 08:40:41 am
content: One way to detect spontaneous position change by mechanical impact is to wire the coils to detect inducted pulse. I showed that here:https://www.eevblog.com/forum/metrology/scannermultiplexers-for-voltage-references/msg3559537/#msg3559537Regards, Dieter

author: Siwastaja
author_rank: Super Contributor
timestamp: July 10, 2023, 11:58:10 am
content: Quote from: David Hess on July 09, 2023, 06:34:17 pmYou don't need an external flip-flop for low-power 1-bit memory storage. Many microcontrollers (I'm somehow assuming the OP is using an AVR) have low-power modes with partial of full RAM retention around a microamp. All you then need is a battery cell or maybe an ultracapacitor.But, if the problem can be solved by sensing inductance, BOM will be cheaper and simpler than adding a battery, which is also something which wears out and has maybe 10-year lifetime.

author: CosteC
author_rank: Regular Contributor
timestamp: July 10, 2023, 12:04:33 pm
content: Memory does not solve primary problem, which is changing state due to mechanical shock, magnetic interference. It does not work also when system is totally off or in sleep.Inductance sensing work for some relays ( I tested it for one model) but may not work for other models of relays. Applying impuse to coil to SET/RESET it works always.