Signal Conditioning and Data Acquisition System
117603Module 4: DAQ Systems
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
View this question on its own page →A microcontroller-based DAQ system mainly performs:
(i) Data storage only
(ii) Conversion of physical signals into digital form
(iii) Power amplification
(iv) Battery chargingWorked SolutionAnswer
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).
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
View this question on its own page →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 requiredWorked SolutionAnswer: (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.
Q5(b). Explain the architecture and working of a microcontroller-based Data Acquisition (DAQ) system.20257m
Module 4: DAQ Systems
View this question on its own page →Explain the architecture and working of a microcontroller-based Data Acquisition (DAQ) system.
Worked SolutionSolution: 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/NetworkWorking
- A sensor measures the physical quantity.
- Signal conditioning amplifies and filters the sensor output.
- The ADC converts the analog signal to digital data.
- The microcontroller samples the data at a programmed rate.
- Firmware performs scaling, calibration, filtering or feature extraction.
- The processed data is displayed, stored or transmitted.
- 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 / USBThe 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.
Q5(c). Describe hardware communication interface programming used to connect data loggers in microcontroller-based DAQ systems.20257m
Module 4: DAQ Systems
View this question on its own page →Describe hardware communication interface programming used to connect data loggers in microcontroller-based DAQ systems.
Worked SolutionSolution: 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 ───────── DeviceIt is commonly used with SD cards, external ADCs and DACs.
Programming sequence
- Configure SPI clock and mode.
- Configure GPIO pins.
- Select the slave using CS.
- Transmit command/address/data bytes.
- Read returned data when required.
- 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/PCThe 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.
Q6(a). Discuss microcontroller-based DAQ systems and their basic hardware organization.20267m
Module 4: DAQ Systems
View this question on its own page →Discuss microcontroller-based DAQ systems and their basic hardware organization.
Worked SolutionMicrocontroller-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
MermaidDiagramRendering 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
- Timer triggers sampling at fixed rate.
- MCU selects channel and starts ADC conversion.
- The result is scaled, filtered and time-stamped.
- 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.
Q6(b). Compare SPI, I2C, USB, USART and UART with respect to lines, speed and typical use.20267m
Module 4: DAQ Systems
View this question on its own page →Compare SPI, I2C, USB, USART and UART with respect to lines, speed and typical use.
Worked SolutionComparison 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.
Q7(a). Differentiate between RS-232, RS-485, Ethernet and USB interfaces used for data loggers.20267m
Module 4: DAQ Systems
View this question on its own page →Differentiate between RS-232, RS-485, Ethernet and USB interfaces used for data loggers.
Worked SolutionData 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 MermaidDiagramRendering 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.
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
View this question on its own page →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.Worked SolutionSolution: 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 outputThe 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:
For a 0–5 V output using the common ideal endpoint convention:
where is the decimal DAC code.
Thus:
- V
- V
The approximate voltage step is:
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:
Therefore:
or:
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:
Final Answer
- DAC output: V under the stated endpoint convention.
- Approximate LSB step: 19.53 mV.
- Maximum theoretical update rate for an 8-bit frame: 500 kUpdates/s.
Q9(c). Write a short note on: UART and USART20267m
Module 4: DAQ Systems
View this question on its own page →Write a short note on: UART and USART
Worked SolutionShort 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).
MermaidDiagramRendering 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.