use to write to the serial port and still read all the data into
Excel without losing anything was 15,000 baud. This
particular version of PLX-DAQ can read any baud rate, as
long as it matches the Serial.begin() value in the void
setup() function. The trick to use PLX-DAQ v2.8 effectively
to suck the data into Excel even at this slow rate is to turn
off the auto calculation. This way, we can still set up
graphs and other analysis which will not be executed in
real time, but only after all the data is brought in.
If data is written to the serial port slower, it can be
brought in and plotted in real time. This is why I created a
fast and a slow mode for data acquisition. In slow mode, I
get to see the processed data plotted in real time, as it is
being taken. I can take measurements on four channels up
to 10 Samples/sec and plot them in real time in the
spreadsheet. Way cool! Just remember to disconnect the
PLX-DAQ v2.9 controller before trying to upload another
sketch. It ties up the serial port.
As an example, I grounded all the inputs to the
channels, recorded 1,000 data points from each channel
as fast as I could, read them back into Excel, and plotted
up two channels. In addition, I calculated the average
value and standard deviation for each channel (see Figure
6). This shows the noise floor of the ADC. I measure a DC
value of less than 0.3 mV with an RMS value or standard
deviation of about 0.33 mV. This is basically ± 2 LSB levels.
If I measure the same channel multiple times and
average consecutive values, I can reduce this noise. It
decreases with the square root of the number of samples.
For example, I measured the RMS value of channel 0 with
no averages as 0.3 mV. When I measured 25 consecutive
samples, I got an RMS value of the noise as 0.057 mV.
This is almost exactly 1/5 of the single value noise. It
takes 85 µsec to measure four sequential channels. This
is an effective data rate of 12 kSamples per second. If I
measure just one channel and no
averages, I get a sample rate of 43
kSamples per second. This is the
limit for this system.
Modes of
Operation
What we can do with this
instrument is almost unlimited. I
Zero the arrays.
Loop npts2meas.
Measure the time data is taken.
Loop npts2ave.
Loop nptsChan.
Analog.read(each chan).
Add new measurement to previous values of that channel.
Store the sums in the array.
After all the measurements are made, go through each
index and divide by npts2ave.
Print the time and value for each channel for each index.
20 June 2017
■ FIGURE 7. Styrofoam box with the temperature sensor
and small fan to circulate the air. Four AA batteries were
mounted to a small board; a bag of ice was included, and
then dry ice was added to cool the air.
■ FIGURE 6. Screenshot of the Excel spreadsheet showing the raw exported
data and a plot of two channels when the inputs are connected to ground.
The plots show the 0.3 mV RMS voltage noise.