Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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.
Table of Contents
1. Objective:
2. Background:
3. What You Need:
4. Wiring Instructions:
5. LabVIEW User Interface:
6. Coding Strategy:
7. How It Works:
8. Tips and Tricks
9. Related Links
Objective:
Measure the voltage differential across a Wheatstone Bridge with the analog input terminals of the myDAQ and and
convert the voltage to the desired engineering unit in LabVIEW.
Background:
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:
zone.ni.com/devzone/cda/epd/p/id/641… 1/6
1/20/2011 Wheatstone Bridge Based Measurement…
1. NI myDAQ
2. LabVIEW
3. A Balanced Wheatstone Bridge with Sensors
4. Wire
Wiring Instructions:
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
Rem ote Sense of the excitation voltage.
zone.ni.com/devzone/cda/epd/p/id/641… 2/6
1/20/2011 Wheatstone Bridge Based Measurement…
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.
Coding Strategy:
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.
The LabVIEW block diagram looks very similar to the coding block diagram
zone.ni.com/devzone/cda/epd/p/id/641… 3/6
1/20/2011 Wheatstone Bridge Based Measurement…
(The attached Lab VIEW code snippet can b e dragged-and-dropped to a Lab VIEW b lock diagram , use attached PNG
file. After locating the PNG file, just drag the file icon onto a b lank b lock diagram, as if you were dragging the file onto
your desktop.)
How It Works:
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:
zone.ni.com/devzone/cda/epd/p/id/641… 4/6
1/20/2011 Wheatstone Bridge Based Measurement…
*Note that sam ple tim e is set b y the Wait VI and is set to sample 10 times per second (every 100m s) in this VI
Related Links
Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer.
Although technical support of this program may be made available by National Instruments, this program may not be
completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this
program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS"
WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET
FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
zone.ni.com/devzone/cda/epd/p/id/641… 5/6
1/20/2011 Wheatstone Bridge Based Measurement…
My Profile | RSS | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved. | E-Mail this Page
zone.ni.com/devzone/cda/epd/p/id/641… 6/6