>
section 13 of 183 min read

13. Data Acquisition Systems

A data acquisition system (DAQ) connects multiple sensors to a computer for logging, analysis, and control.

rendering diagram...

13.1 Sample-and-hold

Before the ADC converts, the signal must be held constant during conversion (which takes time). A sample-and-hold (S&H) circuit closes a switch to charge a capacitor (sample), then opens (hold) while the ADC converts. Errors:

  • Aperture jitter. The switch doesn't open at exactly the same instant on every cycle; for fast signals this introduces voltage error proportional to slew rate.
  • Droop. During hold, leakage discharges the cap.
  • Acquisition time. Time to settle when sampling.

13.2 Multiplexer front end

To save on ADCs, a single ADC is shared across many channels via a multiplexer that selects one channel at a time. Each channel is sampled in sequence; sample rates per channel = total rate / number of channels. Trade-off: simultaneous sampling requires multiple ADCs.

13.3 ADC, processor, host interface

The ADC digitizes; the processor (microcontroller or FPGA) buffers, packetizes, and ships data to the host over USB, Ethernet, PCIe, or PXI. Modern DAQ devices include:

  • NI USB-6211 / USB-6363. Classic NI USB DAQs, 16-bit, up to 2 MS/s aggregate. LabVIEW-friendly.
  • NI PXI / PXIe DAQ. Modular instruments in a PXI chassis. Higher performance, multiple channels, used in production test.
  • Measurement Computing USB-1808X. 8 simultaneous-sampling channels.
  • Keysight U2300 / U2500 series USB DAQ.
  • DAQ HATs for Raspberry Pi. MCC 118, 128: low-cost, simultaneous sampling.

13.4 LabVIEW and Python

LabVIEW is the historical king of DAQ programming: graphical dataflow, drag-and-drop hardware integration, vast library of analysis VIs. Used heavily in test engineering and aerospace.

Python with PyVISA, NI-DAQmx Python bindings, or vendor-specific libraries (Keysight, Keithley, Rohde) is increasingly the language of choice. Free, open, easy to integrate with pandas, numpy, matplotlib, machine learning. The Python ecosystem now matches LabVIEW for most DAQ tasks and is the default in research labs and security work.

A simple example using PyVISA to read a voltage from a DMM:

python
import pyvisa
 
rm = pyvisa.ResourceManager()
dmm = rm.open_resource('USB0::0x0957::0x0607::MY12345678::INSTR')
dmm.write('*RST')
dmm.write('CONF:VOLT:DC 10,0.0001')   # 10 V range, 0.1 mV resolution
dmm.write('SAMP:COUN 100')             # 100 readings
readings = dmm.query_ascii_values('READ?')
print(f'Mean: {sum(readings)/len(readings):.6f} V')
print(f'Std:  {(sum((x - sum(readings)/len(readings))**2 for x in readings)/(len(readings)-1))**0.5:.6f} V')
dmm.close()

In a side-channel rig, a similar Python script triggers the target, captures a power trace from the scope, saves it, and loops. Tens of thousands of traces become a single npy file ready for correlation analysis.