Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

Measuring Coil Resistance with NI 9219

I built a LV program that measures and records various elements of a dual coil electro-hydraulic servo control valve. The hardware components (relays, external test points, switches and power supply) are contained in CA-1000 and are interfaced with a NI cDAQ-9174 containing 2 NI 9225 for 78 VAC 400Hz LVDT measurements and 2 NI 9219s for switch positions, valve command, resistance, and temperature measurements. With the front panel switch positioned to 1 a resistance measurement of both torque motor coils is possible through the restored contacts of the relay in the CA-1000. This function works fine initially, until the switch is positioned to 2, which operates the relay in the CA-1000 and opens the contacts for coil resistance measurement; this prevents voltage from the valve command being applied to the NI 9219 port that is configured to measure resistance. When the switch is returned to position 1 the coil resistance indication flashes random numbers. I replaced the coil inputs with decade boxes set at the same values and switched positions seamlessly; I don't understand why this anomaly only occurs when I use a coil. Any help would be appriciated. Thank you.

0 Kudos
Message 1 of 17

Hello DonaldKM, 


Have you tried swithching the modules? Or maybe using another module instead of the one that is giving you trouble?




0 Kudos
Message 2 of 17

Hello Ernesto,

No I haven't tried switching ports or modules; however the module works fine during initial start up when measuring coil resistance, it just happens when I switch modes. It also works fine in both modes when connected to decade boxes. I am going to try to clear the resistance measuring task when applying voltage to the coils and clearing the voltage task when measuring resistance. The other option will be to create the task manually vice using DAQ assistant.

0 Kudos
Message 3 of 17

Hello DonaldKM, 


That sounds like a good troubleshooting step. Keep me posted. 




0 Kudos
Message 4 of 17

When voltage is removed from a coil (inductor), a back-EMF voltage spike is generated. This does not occur with a purely resistive load. You could be seeing the effect of the back-EMF. Depending on the voltage applied to the coil and it's inductance, the spike could be 10's or 100's of volts, enough to eventually damage other devices.


You may be able to add reverse-biased diodes across the coil to snub the spike, not sure if it will affect your measurements though.


Without seeing a schematic of your test setup, it is hard to say what the root cause is, but I suspect back-EMF.



"It’s the questions that drive us.”
0 Kudos
Message 5 of 17

I considered that very effect. I know that many relay that I work with have diodes that collapse the field to ensure that the relay restores. Do you feel that if I place a diode reversed biased with respect to the 9219 2-wire resistance connection that this will be enough to collapse this field? I will try and keep you posted. I will also try and post the drawings, they are done in Visio. Thank you.

0 Kudos
Message 6 of 17

The diode does not collapse the field. In many cases it will sustain the field for considerably longer than a circuit without it.  Why is that? Current through an inductor cannot be changed instantaneously. If you try to interrupt the current rapidly by opening an relay contact in series with the coil, very high voltages will be generated in an attempt to keep the current flowing. That is why you see arcing at relay contacts when switching inductive loads.


Consider the time constant of a circuit consisting of a resistance (R) and an inductance (L). The time constant T = L/R.  What is the resistance of an open contact? ~ infinity. So the time constant is very short. The energy that was stored in the inductor is dissipated in the ionized gases in the arc.


Now consider the case with a diode across the coil. When the relay opens, the diode begins conducting. The effective resistance of the conducting diode is ~ Vdiode/Icoil. Since Vdiode is ~0.7 V and the current may be in the 10s to 100s of mA, the resistance is a few ohms to a few 10s of ohms. L/R is much larger than in the arc/open circuit case so it takes much longer for the current (and the field) to decay. For many relays the mechanical action due to springs take similar amounts of time to the L/R of the coil/diode combination. In those cases adding a diode does not affect the operating time. The energy is disspated in the diode (and to some extent in the resistance of the wire of the coil).


The diode is there to protect the switching circuit against the high voltages generated by rapid switching of the current in the coil.


I had to look at this effect closely when I was asked to design a circuit which could collapse a strong magnetic field on sub-millisecond time scales.  We excited the coil with 12 or 24 V and allowed voltages close to 1000 V during the collapse.



0 Kudos
Message 7 of 17

What would your suggestion be to solve my problem and protect the DAQ? The coils in this valve operate independently, two channels. The coils have one leg tied to ground and the other leg is excited by a DC voltage. The DC voltage is supplied in both polarities and varying amplitudes depending on the direction and amount that the magnet positions the flapper to port hydraulics in the pilot stage of the valve. The resistance of these coils must be within the design specification in order to produce the desired flapper movement with respect to the command voltage; this is why I need to take the resistance measurement. The command voltage is measured across a 1 ohm shunt resistor to provide a mV reading equivalent to a mA input. This value along with the positioning of the two LVDTs attached to the main spool of the valve produce a desired hysteresis of input current to spool position of 10:1; 10mA input = 1 inch. Initial resistance measurements of the coils function without error. When I change the position of the tester to enable command voltage input, I open the input to the 9219 ports for coil resistance through relay contacts. The coils are selected independently through their own relays and share a common shunt resistor for command mV measurement. My problem is that when I shift from the resistance position to the command position and then shift back to the resistance position, I get a varying resistance display on both coils. This occurs even when there is no command on the coils. Any help would be appreciated. Thank you.

0 Kudos
Message 8 of 17

It seems that the time to switch is not a significant factor, so diodes are a good option. However, because the excitation is bipolar, a diode across the coil will not work.  Here are some possibilities:


1. Two diodes: Connect anode of one to the coil and the cathode to the positive power supply. Connect the other diode with opposite polarity to the negative power supply.

2. Two Zener diodes: Connect back-to-back (anti-parallel) across the coil. The Zener voltage must be higher than the maximum operating voltage to be applied to the coil and less than the voltage at which damage or improper operation of the connected devices will occur. This is typically the power supply voltage (magnitude) plus about 0.7 V.

3. Active clamping circuits. These would require careful design and construction and should be considered only if the suggestions above do not work.


I have a general idea of what you are doing, but a detailed schematic diagram, if you have one, would be very helpful. Although I think unlikely, it is possible that something about the way you have things connected is causing the problem.





0 Kudos
Message 9 of 17


Attached are the Schematic and Wiring Plan. Thank you.

0 Kudos
Message 10 of 17