Dynamic Data Acquisition
Section 1424 January 30, 2018
Abstract—This report records and analyzes data
collected using an Out of the Box Data Acquisition Device (DAQ). A DAQ and
LabVIEW were used to dynamically acquire reference and floating terminal
voltages. The data determined that the smaller the sampling window, the lower
standard deviation and uncertainty error. A strain gage was used in a
Wheatstone Bridge configuration to estimate the strain in an object. All
uncertainties were calculated and considered when estimating the strain. The
diameter calculated from the strain estimation proved to be relatively
accurate, but not precise.
Index Terms—DAQ, Strain Gage,
Uncertainty, Wheatstone Bridge
ATA acquisition is a necessary part of
engineering. This lab introduces dynamic data acquisition with an Out of the
Box Data Acquisition Device (DAQ). Data acquisition is the process of measuring
physical or electrical properties with a computer 1. A DAQ system consists of
sensors and hardware that convert signals from analog to digital so that they
can be used in a computer program such as LabVIEW 1. LabVIEW is a visual
programming language that can record and manipulate data. The DAQ and LabVIEW
were first used to measure the mean and standard deviation of a fixed 2.5
reference voltage. They were then used to quantify the accuracy of the DAQ by
measuring the mean and standard deviation of a battery voltage through
different sampling windows.
objective of the last part of this lab was to estimate the strain and diameter
of an object using a strain gage. A strain gage is a sensor whose resistance
varies when it changes length (in compression or tension). The strain gage was
attached in the unknown resistance location in a Wheatstone Bridge shown in
Fig. 1. This Bridge configuration makes it easy to calculate the strain based
on the differential voltage, source voltage, and gage factor 2. The strain
and thickness of the feeler gage can then be used to calculate the diameter of
measurements are taken in this lab, they are recorded continuously over a
period of time. This means every measurement is different, which creates a variation
and degree of uncertainty. This uncertainty is either given or quantified by
applying a standard deviation of the data. For calculating uncertainties
involving multiple variables, the Root-Sum-Square Approach was used.
Fig. 1. Wheatstone Bridge Diagram
2. Created using two voltage dividers where the source voltage is provided by
the DAQ. Ru is the unknown resistance.
Part I: Measurement of a Fixed Reference Voltage
A LabVIEW program was used with the DAQ to measure and report the
mean and standard deviation of a fixed 2.5 reference voltage.
LabVIEW Program Creation
A LabVIEW program was created that calculates the signal mean and
standard deviation from a fixed reference voltage on Channel 0. It used
“Gain_SP18.vi” as a sub-vi that acquired the signal from the DAQ. The program
was able to create a dynamically updating X-Y scatter plot of the standard
deviation of the signal as a function of time as well as export the data to an
excel spreadsheet file.
Connecting the DAQ
A short jumper wire was connected from the 2.5V output terminal
located on the lower right side of the DAQ to the AIN0+ terminal near the top
right side of the DAQ. Another wire was connected from the ground (GND)
terminal to the AIN0- terminal near the top right of the DAQ. The screws were
tightened to prevent the wires from falling out.
Measuring Reference Voltage
The DAQ was connected to the
laptop using a USB cable. The LabVIEW VI was run for 10 seconds on each of the four
sampling windows (1x, 2x, 4x, 8x) on Channel 0. The data was saved in an excel
Part II: Quantification of Accuracy in Measurements
A battery and a LabVIEW program were used to quantify the accuracy
of data acquisition with the DAQ.
LabVIEW Program Creation
A LabVIEW program was created that uses the “Gain_SP18.vi” as a
sub-vi to plot the raw voltage of the battery over a certain time in a
histogram. The program also calculates the mean and standard deviation of the
battery voltage and saves the data to an excel spreadsheet.
Connecting the Battery
A 1.5V battery was connected to the AIN0+ and AIN0-terminals on
the DAQ using wires.
Measuring Battery Voltage
The DAQ was connected to the laptop using a USB cable. The
acquisition time was set to 3 seconds and the sample rate to 1000 Hertz. The VI
was first run with a sampling window of +- 10V, and then repeated with smaller
sampling windows until saturation was detected.
Part III: Estimation of Strain in an Object using a Strain
A LabVIEW program and a strain
gage in a Wheatstone Bridge configuration were used to estimate the strain and
diameter of an object.
LabVIEW Program Creation
A LabVIEW program was created that uses “Gain_SP18.vi” as a
sub-vi to measure the two voltages (VG and VS) on
Channels 0 and 1 respectively. It calculated the tared VG, VS,
the standard deviation of VG, VS, and the strain and
saved these values as a function of time. It also plotted graphs of tared VG
and strain versus time.
Creating the Wheatstone Bridge
Three 120 ? resistors were connected
in parallel on the breadboard to create four nodes. The strain gage mounted on
the feeler gage acted as the unknown resistance in the Wheatstone Bridge. Wires
were connected from the top and bottom of the Bridge to the 5 V power supply on
the DAQ. To measure Vs, wires were connected from node 0 to AIN1-
and from node 3 to AIN1+. To measure Vg, wires were connected from
node 1 to AIN0- and from node 2 to AIN0+. Refer to Figure 1 for the Wheatstone
Measuring the Strain
The VI was first run with no
strain applied to determine the tare necessary to remove the bias error from Vg.
After the tare was subtracted, the feeler gage was strained in compression for
10-15 seconds to determine the variation in the tared Vg (?Vg)
and strain. A tape measure was then wrapped around a stool to measure the
circumference of the stool in order to calculate the diameter. Finally, the
strain gage mounted on the feeler gage was bent around the circumference of the
stool and data recorded. The strain measured in the strain gage was used to
determine the diameter of the stool.
The mean 2.5 reference voltage of the DAQ was recorded across the
four sampling windows for 10 seconds each. Figure 2 shows this data in
millivolts. Outlier data points were created when changing windows and were
eliminated from Figure 2.
Fig. 2. Mean Voltage (mV) vs. Time
(seconds). The sampling window started at 10 VPP, then was changed to 5 VVP,
2.5 VPP, and 1.25 VPP across the 40 seconds.
The standard deviation of the 2.5 reference voltage was recorded
across the four sampling windows for 10 seconds each. Figure 3 shows this data
in millivolts. Outlier data points were created when changing windows and were
eliminated from Figure 3.
Fig. 3. Standard Deviation (mV)
vs. Time (seconds). The sampling window started at 10 VPP, then was changed to
5 VVP, 2.5 VPP, and 1.25 VPP across the 40 seconds.
The mean and standard deviation of the battery voltage were calculated
from the data across each sampling window for 3 seconds. The sampling windows
were decreased until saturation was detected. The following data is shown below
in Table I.
mean and standard deviation
of battery voltage
Table 1 shows the mean and
standard deviation of the battery voltage on Channel 0 across each sampling
battery voltage was recorded continuously over 3 seconds of acquisition time. This
created a range of data points that formed a Gaussian distribution. Figure 4
below plots a histogram of this data taken during the 10 VPP sampling window.
Fig. 4. Count vs. Battery Voltage
(V). The data is grouped into ranges because each voltage measurement is very
precise. The count is the number of times the battery voltage was recorded in
Vg was tared, the strain gage mounted on the feeler gage was bent in
compression for 15 seconds. Figure 5 below shows the variation in ?Vg
using the sampling window of 0.3125 VPP.
Fig. 5. ?Vg (V) vs.
Time (seconds). ?Vg is the tared Vg used to reduce bias
error. A sampling window of 0.3125 VPP was used to provide the most accurate
measuring tape was wrapped around the circumference of the stool and measured
to be 111.50 cm. Using (2), the diameter of the stool (d) was calculated to be
35.49 cm. The strain gage mounted on the feeler gage was then bent around the
stool and ?Vg and Vs were recorded. Using (1) and a
constant gage factor (f) of 2.1, the
strain was calculated. Figure 6 below plots the strain in the strain gage as a
function of time. Outlier data points were eliminated when setting up and
removing the gage from the stool.
Fig. 6. Strain vs. Time (seconds).
This data represents the strain in the strain gage when bent around the
cylindrical stool top.
The average strain measured while bending the strain gage around
the stool top was 0.000995. The thickness of the feeler gage was given as 0.03
cm. Using (3), the radius of curvature of the stool () was calculated to be 15.08
cm. Using (4), the diameter of the stool top using the strain gage ( was calculated to be 30.12 cm.
The objective of Part I was to
measure the mean and standard deviation of a fixed 2.5 reference voltage using
LabVIEW and a data acquisition device. The mean voltage was closest to 2500 mV using
the 10 VPP sampling window, and then slightly decreased through the 5 VPP and
2.5 VPP windows (Fig. 2). The standard deviation was greatest using the 10VPP
sampling window and decreased through both the 5 VPP and 2.5 VPP windows (Fig. 3).
When using the 1.25 VPP sampling window, the mean was exactly 1.25 V and there
was no standard deviation. So when measuring a 2.5 reference voltage, the 2.5
VPP sampling window provided the most accurate results because of the lower
standard deviation. This sampling window was closest to the measured data
therefore providing a lower uncertainty. The 1.25 VPP sampling window had no
standard deviation because the 2.5 V signal that was being measured was outside
of the measurement range of the window. Therefore, it recorded the same mean
max signal of 1.25 V throughout. These results apply to all engineering systems
measured with the DAQ.
The objective of Part II was to
quantify the accuracy of the DAQ by measuring the mean and standard deviation
of a battery voltage through different sampling windows. The mean and standard
deviation decreased as the sampling window decreased (Table I). The measured
voltage created a Gaussian distribution centered about the mean for all
sampling windows (Fig. 4). The data collected was not random and many voltage
measurements were often repeated throughout the acquisition time. This is
because each sampling window has a certain resolution associated with it which
means the data can only get so specific. The results indicate that as the
sampling window decreases, the resolution increases. So the resolution and
accuracy of the data was highest when the smallest sampling window without
going below the mean was used (2.5 VPP). The 1.25 VPP sampling window resulted
in saturation because the battery voltage (about 1.6 V) was greater than 1.25.
These results apply to all engineering systems measured with the DAQ.
Part III and IV
The objective of Part III was to
estimate the strain and diameter of an object using a strain gage. When the
gage was in compression, the tared Vg decreased (Fig. 5). When the
gage was bent around the edge of the stool, the tared Vg increased
and created an average strain of 0.000995 (Fig. 6). This was used to calculate
the diameter of the stool as 30.12
cm. This was within 20% of the calculated diameter using the measuring tape. Based
on the data from Parts I and II, a sampling window of 5 VPP was used on Channel
1 to measure Vs, and a sampling window of 0.3125 VPP was used on
Channel 0 to measure ?Vg. This is because these sampling windows are
at or slightly above the magnitudes of the voltages. This creates the most
The tare operation was used to
subtract the bias error from Vg so that when no strain is applied to
the strain gage, Vg is very close to 0. A tare of 0.0040 was used
for the initial compression test, but was later changed to 0.0038 while
measuring the strain for the stool diameter. The tare was changed for every new
collection of data to reduce this bias error. When the strain gage was in
compression, the tared voltage (?Vg) decreased because a decrease in
length created a decrease in resistance in the unknown location. This created a
smaller voltage in the unknown divider circuit than in the known divider
circuit, therefore creating a negative differential divider voltage.
The diameter of the circular stool
was calculated with the least uncertainty by measuring the circumference of the
circle and dividing by ?. This is because the exact location of the center and
edge of the stool are unknown and can cause uncertainty. When calculating the
diameter using the strain gage, there were uncertainties in the differential
voltage, source voltage, gage factor, and feeler gage thickness. This created a
much higher uncertainty in the diameter. These results apply to similar
engineering systems, within reason. If the diameter of the object is too small
(~5cm), it would be impossible to use a strain gage to measure strain and
calculate the diameter. This is because the feeler gage would have to be bent
completely around the object to measure strain, which is not physically
Part I and II
Every measurement taken over a
period of time always results in some degree of uncertainty. There is random
noise associated with all measured data. This is still true when measuring
reference and battery voltages using the SADI DAQ. Each sampling window results
in a different mean and standard deviation of the data. In general, the lower
sampling window resulted in a lower standard deviation and therefore less
random error (Table I). This is because the resolution of the data increased as
the sampling window decreased, resulting in more accurate data. However, if the
sampling window was below the magnitude of the data, it resulted in saturation
and a standard deviation of 0. Therefore in order to minimize the uncertainty,
the sampling window that is at or slightly above the data should be used. So
for all future data acquisition with the DAQ, the correct sampling window
should be selected in order to maximize the accuracy.
Part III and IV
A strain gage attached to a
feeler gage can be used with a Wheatstone Bridge to measure the strain and
calculate the diameter of an object. The diameter calculated from the tape
measure (d) had significantly less uncertainty than the diameter calculated
from the strain gage (Ds). This is mainly due to the relatively high
standard deviations of the measured voltages using the DAQ. A single standard
deviation was used for all uncertainty calculations because it covers most the
data while eliminating any outliers. So for future strain diameter
calculations, a more precise data acquisition device and strain gage should be
used in order to reduce the uncertainty. All uncertainty calculations used (5)
– (9) and are reported in Table II in the Appendix.
Measurement with Uncertainty
Resistance of R1
120 ± 0.12 ?
Resistance of R2
120 ± 0.12 ?
Resistance of R3
120 ± 0.12 ?
120 ± 0.12 ?
Unstrained Tared Differential Voltage
0.0000262 ± 0.00255 V
Strained Tared Differential Voltage
0.00256 ± 0.00257 V
4.898 ± 0.00363 V
2.1 ± 0.0105
0.000995 ± 0.000999
Feeler Gage Thickness
0.03 ± 0.00025 cm
Radius of Curvature
15.075 ± 15.143 cm
Diameter calculated from strain
30.121 ± 30.286 cm
Diameter calculated from measuring tape
35.492 ± 0.0159 cm
“What is Data
Acquisition?” Ni.com. National
Instruments, 2018. Web. 25 Jan. 2018. http://www.ni.com/data-acquisition/what-is/.
2 Ridgeway, Shannon. “Mechanics of Materials Lab 1-Dynamic
Data Acquisition.” Ufl.instructure.com.
Web. 25 Jan. 2018.