# Measuring Current with the NI Analog Voltage Input Channels

Updated Aug 8, 2023

## Environment

### Hardware

• Multifunction I/O Device
• DAQ (Legacy)
• Current Shunt
Current cannot be measured directly using a voltage analog input device. However, if a known resistance (shunt resistor) is placed in series with the load and the voltage across it is measured, the current through the load can be calculated using Ohm's Law. This is also common when current output sensors are used and there are no current input modules in the system, so voltage input modules can be used.

• Some Multifunction I/O devices have internal shunt resistors, which have a known resistance value. This can be selected upon configuration of a virtual channel, instead of setting up a circuit with an external resistor.
• Some devices such as the RM-4302 are not able to measure current directly compared to the TB-4302C, so external circuitry like the one noted in this article is necessary.
The measurement accuracy for this configuration is highly dependent on the resistor accuracy. Any resistors are acceptable, as long as the maximum expected current multiplied by the resistance does not exceed the input range of your input device. Figure 1: Ohm's Law

When measuring current in this fashion, the smallest value of shunt resistor compared to the load resistance should be used. This will create the smallest interference with the existing circuit. However, smaller resistances create smaller voltage drops, so a compromise between resolution and circuit interference must be made.

Note: To avoid damaging the shunt resistor, make sure the current passing through it does not exceed the current specifications for the shunt resistor. Figure 2: How to Connect a Shunt Resistor to a DAQ Board

Placement of the shunt resistor in the circuit is important. If there is no load device, connect the shunt resistor as shown above. If using a load and the external circuit shares a common ground with the computer containing the analog input device, then the shunt resistor should be placed as close to the ground leg of the circuit as possible, as shown in Figure 3. Figure 3: Correct Usage of a Shunt Resistor

If not, the common mode voltage produced by the shunt resistor may be outside of the specification for the analog input device. This can lead to inaccurate readings or damage to the board, as shown in Figure 4. Figure 4: Incorrect Usage of a Shunt Resistor