Signal Conditioning and Data Acquisition System

117603
Back to Signal Conditioning and Data Acquisition System

Module 4: DAQ Systems

  1. Q1(h). A microcontroller-based DAQ system mainly performs: (i) Data storage only (ii) Conversion of physical signals into digital form (iii) Power amplification (iv) Battery charging2025?m

    Module 4: DAQ Systems

    A microcontroller-based DAQ system mainly performs:
    (i) Data storage only
    (ii) Conversion of physical signals into digital form
    (iii) Power amplification
    (iv) Battery charging

    View this question on its own page →
    Worked Solution

    Answer

    Correct option: (ii) Conversion of physical signals into digital form

    Explanation

    A microcontroller-based DAQ system acquires signals from sensors and converts them into digital values for processing.

    The typical sequence is:

    Sensor → Signal Conditioning → ADC → Microcontroller → Processing/Storage/Communication

    For example, an analog temperature sensor may produce 0–5 V. The ADC inside or connected to the microcontroller converts this voltage into a digital code, which the microcontroller can use to calculate temperature.

    Therefore, the correct answer is (ii).

  2. Q1(h). RS-485 is preferred when: (i) Analog filtering is required (ii) Only one sensor is used on a PCB (iii) Wireless communication is required (iv) Long-distance and multi-point communication is required20262m

    Module 4: DAQ Systems

    RS-485 is preferred when:

    (i) Analog filtering is required
    (ii) Only one sensor is used on a PCB
    (iii) Wireless communication is required
    (iv) Long-distance and multi-point communication is required

    View this question on its own page →
    Worked Solution

    Answer: (iv) Long-distance and multi-point communication is required

    RS-485 uses differential signalling, so it works up to about 1200 m with good noise immunity and supports up to 32 or more nodes on one bus.

  3. Q5(b). Explain the architecture and working of a microcontroller-based Data Acquisition (DAQ) system.20257m

    Module 4: DAQ Systems

    Explain the architecture and working of a microcontroller-based Data Acquisition (DAQ) system.

    View this question on its own page →
    Worked Solution

    Solution: Microcontroller-Based DAQ System

    Definition

    A microcontroller-based DAQ system uses a microcontroller to acquire, digitize, process, store and/or transmit sensor data.

    Architecture

    Sensor
      ↓
    Signal Conditioning
      ↓
    ADC ───────────────┐
      ↓                │
    Microcontroller ← Timers / Interrupts
      ↓
    Data Processing
      ├──→ Display
      ├──→ Memory / SD Card
      └──→ UART / SPI / I²C / USB → Computer/Network
    

    Working

    1. A sensor measures the physical quantity.
    2. Signal conditioning amplifies and filters the sensor output.
    3. The ADC converts the analog signal to digital data.
    4. The microcontroller samples the data at a programmed rate.
    5. Firmware performs scaling, calibration, filtering or feature extraction.
    6. The processed data is displayed, stored or transmitted.
    7. The controller can also generate control outputs based on measured data.

    Important Components

    • Sensors/transducers
    • Signal-conditioning circuits
    • ADC
    • Microcontroller
    • Timers and interrupts
    • Memory/storage
    • Communication interfaces
    • Display or actuator interface

    Advantages

    • Compact and low cost.
    • Programmable and flexible.
    • Easy data logging.
    • Real-time processing.
    • Multiple communication options.
    • Suitable for portable biomedical and industrial instruments.

    Example: Temperature Logger

    Temperature Sensor
           ↓
    Amplifier + Low-pass Filter
           ↓
    ADC
           ↓
    Microcontroller
           ↓
    Convert Code → Temperature
           ↓
    SD Card / LCD / USB
    

    The microcontroller periodically samples the temperature, converts the ADC code into temperature units, adds a timestamp and stores the result.

    Conclusion

    A microcontroller-based DAQ integrates measurement, conversion, processing, communication and storage into a compact embedded system.

  4. Q5(c). Describe hardware communication interface programming used to connect data loggers in microcontroller-based DAQ systems.20257m

    Module 4: DAQ Systems

    Describe hardware communication interface programming used to connect data loggers in microcontroller-based DAQ systems.

    View this question on its own page →
    Worked Solution

    Solution: Hardware Communication Interface Programming for Data Loggers

    A data logger needs communication interfaces to transfer acquired data between the microcontroller, sensors, memory devices and computers.

    1. SPI

    SPI (Serial Peripheral Interface) is a synchronous, high-speed interface using signals such as SCLK, MOSI, MISO and CS.

    MCU SCLK ───────── Device
    MCU MOSI ───────── Device
    MCU MISO ───────── Device
    MCU CS   ───────── Device
    

    It is commonly used with SD cards, external ADCs and DACs.

    Programming sequence

    1. Configure SPI clock and mode.
    2. Configure GPIO pins.
    3. Select the slave using CS.
    4. Transmit command/address/data bytes.
    5. Read returned data when required.
    6. Release CS.

    2. I²C

    I²C uses two lines:

    • SDA: data
    • SCL: clock

    It supports multiple addressed devices on the same bus.

    Typical sequence:

    START → Address + R/W → ACK → Data → ACK → STOP

    It is useful for EEPROMs, sensors and low-speed peripherals.

    3. UART/USART

    UART is an asynchronous serial interface using TX and RX. A typical frame contains a start bit, data bits, optional parity and stop bit(s).

    Typical configuration includes:

    • Baud rate
    • Data bits
    • Parity
    • Stop bits

    UART is commonly used to transfer logged data to a PC or another controller.

    4. USB

    USB provides higher-speed communication between the embedded data logger and a host computer. Firmware must configure the appropriate USB device class and endpoints according to the application.

    Basic Data Logger Flow

    Sensor → ADC → MCU RAM/Buffer → Communication Interface → Storage/PC
    

    The firmware normally uses a buffer so that data acquisition can continue while blocks of data are written to storage.

    Interface Selection

    Interface Main advantage Typical use
    SPI High speed, simple SD card, ADC/DAC
    I²C Addressed multi-device bus Sensors, EEPROM
    UART Simple point-to-point PC/debug/modem
    USB High-speed host connection PC data transfer

    Conclusion

    Communication interface programming involves configuring the peripheral, transferring data according to its protocol, handling errors/timeouts and buffering acquired samples so that continuous logging is reliable.

  5. Q6(a). Discuss microcontroller-based DAQ systems and their basic hardware organization.20267m

    Module 4: DAQ Systems

    Discuss microcontroller-based DAQ systems and their basic hardware organization.

    View this question on its own page →
    Worked Solution

    Microcontroller-based DAQ System

    A microcontroller-based DAQ uses a microcontroller as the central unit to acquire, process, store and transmit data. It is compact, low cost, low power and portable.

    Hardware organization

    MermaidDiagram
    Rendering diagram…
    Block Role
    Sensors Convert physical quantity to electrical signal
    Signal conditioning Amplify, filter, isolate
    Multiplexer Selects among several channels
    ADC Digitizes the signal
    Microcontroller Controls sampling, processing, scaling, logging
    RTC Adds timestamps
    Memory Stores data (SD card, EEPROM, Flash)
    Display / keypad Local user interface
    Communication Sends data to PC (UART, USB, SPI, I2C, Bluetooth, Wi-Fi)
    Power Battery or regulated supply

    Working

    1. Timer triggers sampling at fixed rate.
    2. MCU selects channel and starts ADC conversion.
    3. The result is scaled, filtered and time-stamped.
    4. Data is stored and/or sent to the PC.

    Advantages

    Low cost, portable, programmable, flexible and expandable. Limitations: limited speed and memory compared to PC-based DAQ.

    Exam tip

    Draw the block diagram with MCU at the centre and explain the 4 working steps.

  6. Q6(b). Compare SPI, I2C, USB, USART and UART with respect to lines, speed and typical use.20267m

    Module 4: DAQ Systems

    Compare SPI, I2C, USB, USART and UART with respect to lines, speed and typical use.

    View this question on its own page →
    Worked Solution

    Comparison of Serial Interfaces

    Feature SPI I2C USB USART UART
    Full form Serial Peripheral Interface Inter-Integrated Circuit Universal Serial Bus Universal Synchronous/Asynchronous Receiver Transmitter Universal Asynchronous Receiver Transmitter
    Lines 4 (MOSI, MISO, SCK, CS) 2 (SDA, SCL) 4 (VBUS, D+, D-, GND) TX, RX (+ XCK clock in sync mode) 2 (TX, RX) + GND
    Clock Synchronous Synchronous Embedded in data Sync or async Asynchronous (baud rate)
    Speed Up to tens of Mbps 100 kbps, 400 kbps, 3.4 Mbps 12 Mbps (USB 1.1), 480 Mbps (USB 2.0) and higher Up to a few Mbps 9600 to 115200 bps typical
    Topology Master with many slaves Multi-master, multi-slave Host with hubs and devices Point to point Point to point
    Distance Short (on PCB) Short (on PCB) Up to 5 m Short to medium Short (RS-232 up to 15 m)
    Typical use ADC, SD card, display EEPROM, RTC, sensors PC connection, data loggers Microcontroller to PC, modems GPS, Bluetooth modules, debug console

    Key notes

    • SPI is fastest for chip-to-chip links but uses more pins.
    • I2C needs only two wires and supports addressing; pull-up resistors are required.
    • USB is plug-and-play with power supply and standard drivers.
    • UART needs no clock; both sides must use the same baud rate, format 8N1.
    • USART can work as UART or with a shared clock for synchronous mode.

    Exam tip

    A table covering lines, speed and use is exactly what the question asks.

  7. Q7(a). Differentiate between RS-232, RS-485, Ethernet and USB interfaces used for data loggers.20267m

    Module 4: DAQ Systems

    Differentiate between RS-232, RS-485, Ethernet and USB interfaces used for data loggers.

    View this question on its own page →
    Worked Solution

    Data Logger Interfaces

    Feature RS-232 RS-485 Ethernet USB
    Signalling Single-ended, +/-3 to 15 V Differential Differential twisted pair Differential D+/D-
    Devices 1 to 1 (point to point) Up to 32 or more nodes (multi-drop) Many via switch 1 host to many via hub
    Max distance About 15 m About 1200 m 100 m per segment (copper) About 5 m per cable
    Speed Up to 115.2 kbps (typ.) Up to 10 Mbps at short range 10/100/1000 Mbps 12 Mbps to several Gbps
    Noise immunity Low High High Medium
    Duplex Full Half (2 wire) or full (4 wire) Full Half or full
    Power supply No No Optional (PoE) Yes (5 V bus)
    Cost Low Low Medium Low
    Typical use Old instruments, configuration Industrial networks, Modbus RTU Networked and remote logging Direct PC connection, download
    MermaidDiagram
    Rendering diagram…

    Selection guide

    • Long distance, many loggers, noisy plant: RS-485.
    • Remote monitoring over a network: Ethernet.
    • Quick local download: USB.
    • Simple one-to-one legacy link: RS-232.

    Exam tip

    Write the table and a one-line use case for each interface.

  8. Q8(b). A system uses an SPI-based 8-bit DAC to generate an analog output signal between 0–5 V. (i) Explain the SPI timing requirements and derive the formula for DAC output voltage. (ii) If the SPI clock is 4 MHz, calculate the maximum update rate achievable.20257m

    Module 4: DAQ Systems

    A system uses an SPI-based 8-bit DAC to generate an analog output signal between 0–5 V.
    (i) Explain the SPI timing requirements and derive the formula for DAC output voltage.
    (ii) If the SPI clock is 4 MHz, calculate the maximum update rate achievable.

    View this question on its own page →
    Worked Solution

    Solution: SPI 8-bit DAC

    Given:

    • DAC resolution = 8 bits
    • Output range = 0–5 V
    • SPI clock = 4 MHz

    (i) SPI Timing and DAC Output

    SPI is a synchronous serial protocol. The master provides the clock on SCLK, sends data on MOSI, and selects the DAC using chip select (CS).

    Typical sequence:

    CS ↓ → Send command/data bits on MOSI → Clock pulses → CS ↑ → DAC updates output
    

    The exact sampling clock edge and timing depend on the DAC's SPI mode specified in its datasheet.

    For an ideal 8-bit DAC, the input code ranges from:

    0 to 28−1=2550\text{ to }2^8-1=255

    For a 0–5 V output using the common ideal endpoint convention:

    Vout=D255×5V_{out}=\frac{D}{255}\times5

    where DD is the decimal DAC code.

    Thus:

    • D=0⇒Vout=0D=0 \Rightarrow V_{out}=0 V
    • D=255⇒Vout=5D=255 \Rightarrow V_{out}=5 V

    The approximate voltage step is:

    5256=19.53 mV\frac{5}{256}=19.53\text{ mV}

    The exact transfer function should follow the DAC datasheet if it uses a different reference/output convention.

    (ii) Maximum Update Rate

    An 8-bit DAC requires at least 8 clock cycles per update if the SPI frame contains only the 8 data bits.

    SPI clock:

    fSPI=4 MHzf_{SPI}=4\text{ MHz}

    Therefore:

    fupdate,max=4×1068f_{update,max}=\frac{4\times10^6}{8}

    fupdate,max=500,000 updates/s\boxed{f_{update,max}=500,000\text{ updates/s}}

    or:

    500 kUpdates/s\boxed{500\text{ kUpdates/s}}

    Important practical note

    If the DAC requires more than 8 bits per SPI frame—for example, command bits, address bits or control bits—the actual maximum update rate will be lower:

    fupdate,max=fSPINbits/framef_{update,max}=\frac{f_{SPI}}{N_{bits/frame}}

    Final Answer

    • DAC output: Vout=D255×5V_{out}=\frac{D}{255}\times5 V under the stated endpoint convention.
    • Approximate LSB step: 19.53 mV.
    • Maximum theoretical update rate for an 8-bit frame: 500 kUpdates/s.
  9. Q9(c). Write a short note on: UART and USART20267m

    Module 4: DAQ Systems

    Write a short note on: UART and USART

    View this question on its own page →
    Worked Solution

    Short Note: UART and USART

    UART

    Universal Asynchronous Receiver Transmitter: a serial link using two lines, TX and RX (plus GND), with no clock line. Both ends must use the same baud rate.

    Frame: 1 start bit (0), 5 to 9 data bits (LSB first), optional parity bit, 1 or 2 stop bits (1).

    MermaidDiagram
    Rendering diagram…

    USART

    Universal Synchronous/Asynchronous Receiver Transmitter: works as a UART, or in synchronous mode with a shared clock (XCK) that allows higher speed and no start/stop bits.

    Point UART USART
    Clock None, baud rate agreed Optional shared clock
    Modes Asynchronous only Async and sync
    Speed Moderate Higher in sync mode
    Lines TX, RX TX, RX, XCK

    Used with RS-232/RS-485 drivers, GPS, Bluetooth modules and PC serial links.

    Exam tip

    Draw the frame format and the UART vs USART table.