This document explains using Wheatstone Bridge to make a precise measurement for sensors such as strain gauges and load cells. The data will be acquired using the DAQ Assistant that is installed into LabVIEW with the NI DAQmx driver as a voltage and converted to a strain, force, or other engineering unit using basic programming in LabVIEW.
Measure the voltage differential across a Wheatstone Bridge with the analog input terminals of the myDAQ and convert the voltage to the desired engineering unit in LabVIEW.
Certain sensors and gauges, such as a strain gauge, output a very small change in resistance; this makes the task of detecting the changes in the sensor difficult. To measure such small changes in resistance or voltage, these sensors are almost always used in a bridge configuration with a voltage excitation source. The general Wheatstone bridge, as seen in Figure 1 below, consists of four resistive arms with an excitation voltage, VEX, that is applied across the bridge. We can then calculate the change in resistance of R3 by comparing VO to VEX, provided that the resistance of the other resistors are known, using the following equation:
Figure 1: Vishay NTCLE-100E-3103 10kΩ Thermistor
The Wheatstone Bridge is wired to your myDAQ as 2 analog inputs, one to measure VO and the other to measure Vex. We also must connect the +5V output pin of the myDAQ to the top of the bridge to serve as the excitation voltage high, and connect the Digital Ground (DGND) to the bottom of the bridge to serve as the excitation voltage low. This will allow us to measure the excitation voltage in case it is not exactly at a constant 5VDC. This will serve as a Remote Sense of the excitation voltage.
Figure 2: Wiring Diagram
The user interface we created shows the Voltage Drop, VO, the measured Excitation Voltage, Vex, and the ratio of the two.
Figure 3: LabVIEW Front Panel
In LabVIEW we need to measure the voltage drop across the terminals, as well as the excitation voltage applied to the bridge. The voltage drop is then divided by the excitation voltage to find the ratio between the two. This value is very useful in bridge-based measurements and more logic can be built in to tailor the application as needed. Finally, we will output the results to numeric indicators on the front panel.
Figure 4: Coding Block Diagram
The LabVIEW block diagram looks very similar to the coding block diagram
Figure 5: LabVIEW 2009 Block Diagram
(The attached LabVIEW code snippet can be dragged-and-dropped to a LabVIEW block diagram, use attached PNG file. After locating the PNG file, just drag the file icon onto a blank block diagram, as if you were dragging the file onto your desktop.)
Inside the while loop on the left is the DAQ Assistant. It’s configured to read a single value from the myDAQ ai0 and ai1 terminals each time it executes. Once a value is read for each channel it is passed down the wire and then split out into each value. Both the VO and Vex values are displayed on the front panel, and then the ratio of VO/Vex is calculated and displayed on the front panel. All of the code inside the While Loop continues to run until the Stop button is pressed on the front panel. The Wait VI (top right) delays execution of the while loop to every 100ms. Therefore the sampling rate is 10 samples per second, or 10 Hz.
In this VI the DAQ Assistant is configured for on-demand sampling of the analog resistance input channel. The following steps walk through the configuration of the DAQ Assistant from scratch:
Figure 6: DAQ Assistant Analog Input Configuration
*Note that sample time is set by the Wait VI and is set to sample 10 times per second (every 100ms) in this VI
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
The wiring diagram doesn't seem to be displaying properly, no matter the browser. Does anyone have a copy of the image?
Hello @ProfHanson - we were able to find the image and update this document.
The greatest sample rate that I can achieve is 10Hz (loop wait of 100ms). Lowering this wait amount doesn't increase sample rate, but increasing the wait lowers sampling rate. Am I missing something that is inhibiting a large sampling rate?
Maybe a Real-Time controller will give high sample rates?