2025 question paper
Signal Conditioning and Data Acquisition System
26 questions
Q1(a). Data acquisition (DAQ) system is primarily used for: (i) Data storage (ii) Converting physical quantities into digital data (iii) Wireless communication (iv) Power amplification2025?m
Module 1: Introduction
View this question on its own page →Data acquisition (DAQ) system is primarily used for:
(i) Data storage
(ii) Converting physical quantities into digital data
(iii) Wireless communication
(iv) Power amplificationWorked SolutionAnswer
Correct option: (ii) Converting physical quantities into digital data
Explanation
A Data Acquisition (DAQ) system collects real-world physical signals and converts them into a form that a computer or microcontroller can process.
A typical DAQ sequence is:
Physical quantity → Sensor → Signal Conditioning → ADC → Digital Data → Processing/Storage
For example, a temperature sensor produces an electrical signal corresponding to temperature. The signal is conditioned if required and then converted into a digital value by an Analog-to-Digital Converter (ADC).
Why the other options are incorrect
- (i) Data storage: Storage may be included in a DAQ system, but it is not its primary purpose.
- (iii) Wireless communication: Wireless communication may be used for transmitting acquired data, but it is not the fundamental purpose of DAQ.
- (iv) Power amplification: Power amplification is not the primary function of a DAQ system.
Therefore, the correct answer is (ii).
Q1(b). Signal conditioning is required to: (i) Improve computer speed (ii) Modify the sensor signal for ADC (iii) Reduce sampling time (iv) Increase AC voltage2025?m
Module 2: Signal Conditioning Systems
View this question on its own page →Signal conditioning is required to:
(i) Improve computer speed
(ii) Modify the sensor signal for ADC
(iii) Reduce sampling time
(iv) Increase AC voltageWorked SolutionAnswer
Correct option: (ii) Modify the sensor signal for ADC
Explanation
Signal conditioning prepares a raw sensor signal so that it is suitable for accurate measurement and conversion by an ADC.
Common signal-conditioning operations include:
- Amplification – increases a weak sensor signal.
- Filtering – removes unwanted noise and interference.
- Isolation – protects circuits and reduces ground-loop problems.
- Linearization – improves the relationship between sensor output and measured quantity.
- Level shifting – adjusts the signal to the ADC input range.
For example, if a sensor produces 0–100 mV while an ADC accepts 0–5 V, an amplifier can increase the sensor signal before conversion.
Therefore, the correct answer is (ii).
Q1(c). Filtering is mainly used to remove: (i) Useful signals (ii) High-frequency noise (iii) DC (iv) Mechanical vibrations2025?m
Module 2: Signal Conditioning Systems
View this question on its own page →Filtering is mainly used to remove:
(i) Useful signals
(ii) High-frequency noise
(iii) DC
(iv) Mechanical vibrationsWorked SolutionAnswer
Correct option: (ii) High-frequency noise
Explanation
A filter is a signal-conditioning circuit that allows desired frequency components to pass while attenuating unwanted frequency components.
In DAQ systems, filters are commonly used to remove high-frequency noise, electrical interference and other unwanted components before the signal reaches the ADC.
For example, a low-pass filter allows low-frequency measurement signals to pass while reducing high-frequency noise.
Importance in DAQ
Filtering improves:
- Signal quality.
- Measurement accuracy.
- ADC performance.
- Resistance to unwanted interference.
- Protection against aliasing when used as an anti-aliasing filter before sampling.
Therefore, the correct answer is (ii).
Q1(d). A first-order filter consists of: (i) One resistor and one capacitor (ii) Two inductors (iii) Operational amplifier only (iv) A transformer2025?m
Module 2: Signal Conditioning Systems
View this question on its own page →A first-order filter consists of:
(i) One resistor and one capacitor
(ii) Two inductors
(iii) Operational amplifier only
(iv) A transformerWorked SolutionAnswer
Correct option: (i) One resistor and one capacitor
Explanation
A basic first-order RC filter is made using one resistor and one capacitor. It has one energy-storage element and therefore has a roll-off of approximately 20 dB/decade beyond its cutoff frequency.
For a simple RC low-pass filter, the cutoff frequency is:
Below the cutoff frequency, the signal passes with relatively little attenuation. Above the cutoff frequency, higher-frequency components are increasingly attenuated.
Therefore, the correct answer is (i).
Q1(e). Which of the following is NOT part of a typical microcontroller? (i) CPU (ii) RAM (iii) I/O Ports (iv) Hard Disk2025?m
Module 3: Embedded Microcontrollers – PIC18F / Others
View this question on its own page →Which of the following is NOT part of a typical microcontroller?
(i) CPU
(ii) RAM
(iii) I/O Ports
(iv) Hard DiskWorked SolutionAnswer
Correct option: (iv) Hard Disk
Explanation
A typical microcontroller integrates essential computing and control resources on a single chip, such as:
- CPU: Executes program instructions.
- RAM: Temporarily stores variables and runtime data.
- I/O ports: Interface with sensors, actuators and external devices.
- Timers/counters: Generate timing functions and count events.
- Peripherals: May include ADC, communication interfaces, PWM and other modules.
A hard disk is a separate mass-storage device and is not normally an integrated component of a microcontroller.
Therefore, the correct answer is (iv).
Q1(f). A timer in a microcontroller counts: (i) External pulses only (ii) Internal clock pulses (iii) Code instructions (iv) Data bytes2025?m
Module 3: Embedded Microcontrollers – PIC18F / Others
View this question on its own page →A timer in a microcontroller counts:
(i) External pulses only
(ii) Internal clock pulses
(iii) Code instructions
(iv) Data bytesWorked SolutionAnswer
Correct option: (ii) Internal clock pulses
Explanation
A timer in a microcontroller is generally driven by the internal system clock or a clock derived from it. It increments its count at regular intervals and is used for generating delays, measuring time intervals, scheduling tasks and producing periodic events.
A counter can instead be configured to count external events or pulses.
Example
If a timer receives a 1 MHz clock, one clock period is:
The timer can therefore measure time by counting these clock periods.
Therefore, the correct answer is (ii).
Q1(g). RISC microcontrollers are characterized by: (i) Many complex instructions (ii) Simple and fast instructions (iii) No registers (iv) Only analog operations2025?m
Module 3: Embedded Microcontrollers – PIC18F / Others
View this question on its own page →RISC microcontrollers are characterized by:
(i) Many complex instructions
(ii) Simple and fast instructions
(iii) No registers
(iv) Only analog operationsWorked SolutionAnswer
Correct option: (ii) Simple and fast instructions
Explanation
RISC (Reduced Instruction Set Computer) microcontrollers use a relatively small and simple instruction set. Instructions are designed to execute efficiently, often in a small number of clock cycles.
Main characteristics of RISC
- Small and simple instruction set.
- Fast instruction execution.
- Large or efficient register usage.
- Simple instruction formats.
- Efficient pipelining in many architectures.
- Suitable for embedded real-time applications.
This approach makes the processor easier to implement and can provide high performance for a given clock frequency.
Therefore, the correct answer is (ii).
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(i). The main objective of data processing is to: (i) Reduce microcontroller load (ii) Extract meaningful insights (iii) Increase clock frequency (iv) Improve battery capacity2025?m
Module 5: Data Processing
View this question on its own page →The main objective of data processing is to:
(i) Reduce microcontroller load
(ii) Extract meaningful insights
(iii) Increase clock frequency
(iv) Improve battery capacityWorked SolutionAnswer
Correct option: (ii) Extract meaningful insights
Explanation
Data processing converts raw acquired data into useful information that can be interpreted or used for decision-making.
Typical processing operations include:
- Data cleaning and removal of invalid values.
- Noise reduction and filtering.
- Calibration and scaling.
- Averaging and statistical calculations.
- Feature extraction.
- Conversion into engineering units.
- Preparation of data for visualization or control.
For example, raw vibration samples can be processed to calculate RMS vibration, peak amplitude or frequency components, helping identify a machine fault.
Therefore, the correct answer is (ii).
Q1(j). Which of the following is not a data storage device used in embedded systems? (i) EEPROM (ii) SRAM (iii) SD card (iv) Transformer2025?m
Module 5: Data Processing
View this question on its own page →Which of the following is not a data storage device used in embedded systems?
(i) EEPROM
(ii) SRAM
(iii) SD card
(iv) TransformerWorked SolutionAnswer
Correct option: (iv) Transformer
Explanation
Embedded systems commonly use different types of memory and storage devices, including:
- EEPROM: Non-volatile memory used for storing configuration data and calibration values.
- SRAM: Fast volatile memory used for variables and temporary runtime data.
- SD card: Removable non-volatile storage suitable for large amounts of logged data.
A transformer is an electrical power/isolating component. It is not a data-storage device.
Therefore, the correct answer is (iv).
Q2(a). Explain the architecture and working of a Data Acquisition System (DAQ).20257m
Module 1: Introduction
View this question on its own page →Explain the architecture and working of a Data Acquisition System (DAQ).
Worked SolutionSolution: Architecture and Working of a Data Acquisition System (DAQ)
Definition
A Data Acquisition System (DAQ) is a system used to collect physical measurements from the real world, convert them into electrical and digital signals, process the acquired data, and finally display, store, or transmit the information.
Examples include temperature measurement, vibration monitoring, motor-speed measurement and heart-rate monitoring.
Basic Block Diagram
Physical Quantity ↓ Sensor / Transducer ↓ Signal Conditioning ↓ Multiplexer (for multiple channels) ↓ Sample & Hold ↓ ADC ↓ Microcontroller / Computer ↓ Processing → Storage → Display / Communication / ControlMain Components
1. Sensor / Transducer
Converts a physical quantity such as temperature, pressure, displacement or heart rate into an electrical signal.
2. Signal Conditioning
Prepares the sensor output for digitization. It may involve:
- Amplification
- Filtering
- Isolation
- Linearization
- Level shifting
3. Multiplexer
In a multichannel DAQ, a multiplexer selects one input channel at a time and sends it to the acquisition path.
4. Sample-and-Hold
Samples the analog signal and holds its value constant during ADC conversion when required by the ADC architecture.
5. ADC
The Analog-to-Digital Converter converts the conditioned analog voltage into a digital number. For an ideal -bit ADC with input range , the approximate LSB size is:
6. Microcontroller / Computer
Processes the digital samples, performs calculations and may execute control algorithms.
7. Storage and Display
Data can be stored in memory, SD cards or a computer and presented as numerical values, graphs or reports.
Working
- The physical parameter is measured by a sensor.
- The sensor produces an electrical signal.
- Signal conditioning amplifies, filters and scales the signal.
- The multiplexer selects a channel when multiple sensors are present.
- The signal is sampled and converted into digital form by the ADC.
- The microcontroller or computer processes the digital samples.
- The resulting information is stored, displayed, transmitted or used for automatic control.
Single-Channel and Multichannel DAQ
Type Description Single-channel Acquires data from one sensor/input. Multichannel Acquires data from several sensors/inputs using multiplexing or multiple ADC channels. Applications
- Temperature data logging
- Motor-speed monitoring
- Industrial process control
- Vibration monitoring
- Heart-rate monitoring
- Environmental monitoring
- Biomedical instrumentation
Conclusion
A DAQ system forms the complete measurement chain from physical quantity → sensor → signal conditioning → ADC → digital processing → storage/display/control. Its accuracy depends on sensor quality, conditioning, sampling rate, ADC resolution and proper noise reduction.
Q2(b). Describe the signal conditioning process in a DAQ system and explain how it is used in real-time applications.20257m
Module 2: Signal Conditioning Systems
View this question on its own page →Describe the signal conditioning process in a DAQ system and explain how it is used in real-time applications.
Worked SolutionSolution: Signal Conditioning Process and Real-Time Applications
Definition
Signal conditioning is the process of modifying a sensor's raw electrical output so that it becomes suitable for accurate measurement, analog-to-digital conversion, processing, and control.
A typical chain is:
Sensor → Amplification → Filtering → Isolation / Linearization → ADC → ProcessorWhy Signal Conditioning is Required
Sensor outputs are often:
- Very small in amplitude.
- Noisy.
- Non-linear.
- Outside the input range of the ADC.
- Sensitive to electrical interference.
- Referenced to a different ground potential.
Signal conditioning solves these problems before digitization.
Major Signal-Conditioning Operations
1. Amplification
A weak sensor signal is amplified to use the available ADC input range effectively.
For an amplifier:
where is the voltage gain.
2. Filtering
Filters remove unwanted frequency components and noise.
A low-pass filter is commonly placed before an ADC to remove high-frequency noise and prevent aliasing.
For a first-order RC low-pass filter:
3. Isolation
Isolation electrically separates the sensor side from the measurement electronics. It helps protect circuits and reduce ground-loop interference.
Common techniques include transformers, opto-isolators and isolation amplifiers.
4. Linearization
Some sensors have non-linear output characteristics. Linearization converts the sensor response into a more useful relationship with the measured physical quantity.
This may be performed using analog circuits or digitally in the microcontroller.
5. Level Shifting and Scaling
The signal is adjusted to match the ADC input range.
For example, if a sensor produces 0–100 mV and the ADC accepts 0–5 V, an amplifier can scale the signal so that the ADC uses more of its resolution.
6. Excitation
Some sensors such as resistive bridges require an excitation voltage or current. The signal-conditioning system may provide this excitation and measure the resulting response.
Real-Time DAQ Applications
Temperature Monitoring
Temperature Sensor → Amplifier/Filter → ADC → Microcontroller → Display/AlarmThe microcontroller continuously samples the sensor and can activate an alarm if temperature exceeds a limit.
Motor-Speed Monitoring
A speed sensor produces pulses proportional to motor speed. Conditioning removes noise and shapes the pulses before the microcontroller counts them.
Heart-Rate Monitoring
A biomedical sensor produces a small physiological signal. Amplification and filtering remove unwanted noise and interference. The conditioned signal is digitized and processed to calculate heart rate.
Importance in Real-Time Systems
Proper signal conditioning provides:
- Better measurement accuracy.
- Improved signal-to-noise ratio.
- Protection of ADC and processing electronics.
- Better use of ADC resolution.
- Reliable real-time decision-making.
- Reduced aliasing and interference.
Conclusion
Signal conditioning is a critical stage between the sensor and ADC. By amplifying, filtering, isolating, scaling and linearizing the sensor signal, it ensures that the DAQ system receives a clean and measurable signal suitable for reliable real-time monitoring and control.
Q3. Explain the different types of signal conditioning used in data acquisition systems.20257m
Module 2: Signal Conditioning Systems
View this question on its own page →Explain the different types of signal conditioning used in data acquisition systems.
Worked SolutionSolution: Types of Signal Conditioning in DAQ Systems
Signal conditioning prepares a sensor signal for accurate measurement and ADC conversion.
1. Amplification
Weak sensor outputs are increased to a suitable voltage range.
Operational amplifiers and instrumentation amplifiers are commonly used.
2. Filtering
Filters remove unwanted frequency components and noise.
- Low-pass: removes high-frequency noise.
- High-pass: removes unwanted low-frequency/DC components.
- Band-pass: passes a selected frequency band.
- Notch: rejects a narrow interfering frequency such as 50/60 Hz.
3. Isolation
Electrical isolation prevents unwanted current paths and protects the measurement system. Isolation amplifiers and opto-isolators are common methods.
4. Linearization
Some sensors have nonlinear input-output characteristics. Linearization converts the response into a more convenient relationship, either using analog circuits or software.
5. Level Shifting and Scaling
The signal is shifted or scaled to match the ADC input range. For example, a 0–100 mV sensor can be amplified to 0–5 V.
6. Excitation
Resistive and bridge-type sensors may require a stable excitation voltage or current before their output can be measured.
7. Signal Conversion
A conditioning stage may convert one signal form to another, such as current-to-voltage conversion for a 4–20 mA transmitter.
8. Sample-and-Hold / Anti-Aliasing
A sample-and-hold circuit maintains the signal during conversion, while an analog anti-aliasing filter limits frequencies above the useful measurement bandwidth.
Conclusion
The major conditioning functions are amplification, filtering, isolation, linearization, scaling, excitation and signal conversion. Proper conditioning improves signal-to-noise ratio, ADC utilization, accuracy and reliability.
Q4(a). Describe the various noise sources and noise reduction techniques in signal measurement systems.20257m
Module 2: Signal Conditioning Systems
View this question on its own page →Describe the various noise sources and noise reduction techniques in signal measurement systems.
Worked SolutionSolution: Noise Sources and Noise Reduction Techniques
Noise
Noise is an unwanted electrical signal that interferes with the desired measurement signal and reduces measurement accuracy.
Major Noise Sources
1. Thermal Noise
Produced by random motion of charge carriers in resistive components. Its noise power increases with temperature and bandwidth.
2. Shot Noise
Caused by the random arrival of charge carriers, especially in semiconductor devices and junctions.
3. Flicker Noise
Also called 1/f noise. It becomes important at low frequencies and is associated with electronic devices and materials.
4. Electromagnetic Interference (EMI)
Motors, transformers, switching circuits, mobile/radio transmitters and power lines can induce unwanted signals.
5. Ground Loops
Different ground potentials can create unwanted circulating currents and 50/60 Hz interference.
6. Crosstalk
A signal from one channel can couple into another through electrical or electromagnetic coupling.
7. Quantization Noise
Introduced when an analog value is represented by a finite number of ADC levels.
Noise Reduction Techniques
1. Shielding
Use shielded cables and conductive enclosures to reduce electromagnetic pickup.
2. Proper Grounding
Use a carefully designed grounding scheme and avoid unnecessary ground loops.
3. Twisted-Pair Cables
Twisting reduces pickup from external electromagnetic fields, especially for differential signals.
4. Differential Measurement
Measure the voltage difference between two signal terminals rather than relying on a common ground reference. This improves rejection of common-mode interference.
5. Filtering
Use low-pass, high-pass, band-pass or notch filters according to the measurement bandwidth.
6. Isolation
Isolation amplifiers, transformers or digital isolators can break unwanted electrical paths.
7. Short and Proper Wiring
Keep sensitive signal wires short, route them away from high-power cables and separate analog and noisy digital wiring.
8. Averaging and Digital Filtering
Repeated measurements can be averaged, and digital filters can reduce random noise after acquisition.
Conclusion
Noise reduction requires a combination of shielding, grounding, differential measurement, filtering, isolation and proper wiring. The best technique depends on the source and frequency of the interference.
Q4(b). Explain the architecture of a microcontroller with neat block diagram. Describe the basics of assembly language and C-language programming used for microcontrollers.20257m
Module 3: Embedded Microcontrollers – PIC18F / Others
View this question on its own page →Explain the architecture of a microcontroller with neat block diagram. Describe the basics of assembly language and C-language programming used for microcontrollers.
Worked SolutionSolution: Microcontroller Architecture, Assembly and C Programming
Microcontroller Architecture
A microcontroller is a compact integrated circuit containing a processor, memory, I/O and peripherals for embedded control applications.
┌─────────────────────┐ │ CPU │ │ ALU + Control Unit │ │ Registers │ └──────────┬──────────┘ │ System Bus ┌────────────────┼────────────────┐ ↓ ↓ ↓ Program Memory Data Memory I/O Ports Flash/ROM RAM/EEPROM GPIO │ │ │ └────────────────┼────────────────┘ ↓ Timers / Counters ADC / PWM / DAC SPI / I²C / UARTMajor blocks
- CPU: Executes instructions.
- ALU: Performs arithmetic and logical operations.
- Registers: High-speed temporary storage.
- Program memory: Stores firmware.
- RAM: Stores temporary variables and stack data.
- EEPROM/Flash: Stores non-volatile data or program code.
- GPIO: Interfaces with external sensors and actuators.
- Timers/Counters: Generate delays and measure/count events.
- ADC/DAC/PWM: Interface between digital electronics and analog systems.
- Communication peripherals: SPI, I²C, UART/USART and others.
Assembly Language Programming
Assembly language uses processor-specific mnemonics representing machine instructions.
Example:
MOVLW 05H MOVWF COUNT INCF COUNT, FThe exact instructions depend on the microcontroller architecture.
Advantages
- Precise hardware control.
- Efficient execution.
- Small and predictable code.
Limitations
- Difficult to write and maintain for large applications.
- Processor-specific.
C Language Programming
C provides structured, readable programming while still allowing direct hardware control through registers, pointers and bit operations.
Example:
#include <stdint.h> int main(void) { uint8_t count = 0; while (1) { count++; } }In practical firmware, initialization functions configure clocks, GPIO, ADC, timers and communication peripherals before the main loop executes.
Assembly vs C
Feature Assembly C Readability Low High Hardware control Very direct Direct through registers/APIs Portability Low Higher Development time Longer Shorter Optimization Can be highly optimized Compiler-dependent Conclusion
A microcontroller combines processing, memory and peripherals in one device. Assembly provides low-level control, while C provides a practical balance of performance, readability and portability for embedded DAQ applications.
Q5(a). Describe the working of ADC and DAC in a microcontroller system with examples.20257m
Module 3: Embedded Microcontrollers – PIC18F / Others
View this question on its own page →Describe the working of ADC and DAC in a microcontroller system with examples.
Worked SolutionSolution: ADC and DAC in a Microcontroller System
ADC: Analog-to-Digital Converter
An ADC converts an analog voltage into a digital code that a microcontroller can process.
Working
Analog Sensor → Signal Conditioning → ADC → Digital Code → CPU- The analog signal is applied to the ADC input.
- The ADC samples the signal.
- The input range is divided into discrete levels.
- The nearest digital code is generated.
- The microcontroller reads the code and converts it into engineering units.
For an ideal -bit ADC with input range :
Approximately, the ADC code is:
Example
For a 10-bit ADC with 0–5 V input:
DAC: Digital-to-Analog Converter
A DAC converts a digital number generated by the microcontroller into an analog voltage or current.
CPU → Digital Code → DAC → Analog Voltage → ActuatorFor an ideal -bit voltage DAC with reference :
The exact transfer equation depends on the DAC architecture and datasheet conventions.
Applications
- ADC: temperature, pressure, light and biomedical sensors.
- DAC: waveform generation, motor control references, audio and analog actuator control.
ADC vs DAC
Feature ADC DAC Conversion Analog → Digital Digital → Analog Input Voltage/current Digital code Output Digital code Analog voltage/current Use Measurement Control/output generation Conclusion
ADC enables the microcontroller to measure the physical world, while DAC enables it to generate controlled analog outputs.
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). Explain the complete data processing cycle in a microcontroller-based system.20257m
Module 5: Data Processing
View this question on its own page →Explain the complete data processing cycle in a microcontroller-based system.
Worked SolutionSolution: Complete Data Processing Cycle
Definition
Data processing converts raw acquired samples into meaningful information that can be stored, displayed, transmitted or used for control.
Processing Cycle
Data Acquisition ↓ Data Validation ↓ Pre-processing / Filtering ↓ Calibration & Scaling ↓ Feature Extraction / Computation ↓ Analysis ↓ Storage / Display / Communication / Control1. Data Acquisition
Sensors and ADCs generate digital samples at a selected sampling rate.
2. Data Validation
The system checks for missing, out-of-range or corrupted values.
3. Pre-processing
Noise may be reduced using averaging or digital filters. Signals can also be normalized or resampled when appropriate.
4. Calibration and Scaling
ADC codes are converted into engineering units such as °C, V, Pa or rpm.
5. Feature Extraction
Useful quantities are calculated from raw samples, such as peak, RMS, mean, frequency or heart rate.
For a set of samples , the mean is:
6. Analysis
Statistical, frequency-domain or trend analysis can be applied depending on the application.
7. Storage and Output
Processed or raw data can be saved to flash, EEPROM, SD card or a computer and displayed or transmitted.
Real-Time Considerations
The processing time must be sufficiently small compared with the sampling interval. Buffering and interrupts/DMA can help prevent sample loss.
Conclusion
A complete data-processing cycle transforms raw sensor samples into reliable, useful information through validation, filtering, calibration, computation and analysis.
Q6(b). Describe various data storage options available in microcontroller systems and explain how data can be logged or stored using programming techniques.20257m
Module 5: Data Processing
View this question on its own page →Describe various data storage options available in microcontroller systems and explain how data can be logged or stored using programming techniques.
Worked SolutionSolution: Data Storage Options and Data Logging
Data Storage Options
Storage Nature Typical use SRAM Volatile, fast Temporary buffers EEPROM Non-volatile Calibration/configuration data Internal Flash Non-volatile Firmware and small datasets External Flash Non-volatile Larger embedded storage SD card Removable, high capacity Continuous data logging USB/Computer External Long-term transfer/storage Data Logging Process
Sensor → ADC → MCU → RAM Buffer → Storage Interface → File/MemorySteps
- Initialize the sensor and ADC.
- Configure the sampling timer.
- Acquire a sample at every sampling instant.
- Convert the ADC code into the required format.
- Add a timestamp or channel identifier when necessary.
- Store samples in a RAM buffer.
- When the buffer is sufficiently full, write a block to non-volatile storage.
- Repeat until logging ends.
Why Buffering is Important
Storage devices such as SD cards may have variable write latency. A RAM buffer allows acquisition to continue while data is being written in blocks.
Example Pseudocode
while (logging) { sample = read_adc(); buffer[index++] = sample; if (index == BUFFER_SIZE) { storage_write(buffer, BUFFER_SIZE); index = 0; } }A real implementation should also handle write failures, buffer overflow, timestamps, file-system errors and safe shutdown.
Storage Selection
- Use EEPROM for small calibration/configuration data.
- Use Flash for firmware and moderate non-volatile data.
- Use SD cards for large continuous logs.
- Use computer/USB/network storage when very large datasets must be transferred or archived.
Conclusion
Efficient data logging depends on selecting suitable storage, using buffering and ensuring that the sustained storage throughput is greater than the incoming data rate.
Q7(a). Explain the various data retrieving and plotting techniques used in microcontroller-based and computer-based data acquisition systems.20257m
Module 6: Analysis
View this question on its own page →Explain the various data retrieving and plotting techniques used in microcontroller-based and computer-based data acquisition systems.
Worked SolutionSolution: Data Retrieval and Plotting Techniques
Data Retrieval
Data retrieval means reading stored or acquired data from a microcontroller, data logger or computer for further processing and visualization.
Common methods
- UART/Serial: Simple method for transferring measurements to a PC terminal or application.
- USB: High-speed transfer between embedded hardware and a computer.
- SPI/SD card: Data is retrieved from removable storage.
- I²C: Used to read data from sensors and EEPROMs.
- Network/Wireless: Data can be transferred remotely using appropriate communication hardware.
Typical Retrieval Flow
Sensor Data → Storage/Data Logger → Communication Interface → Computer → Analysis SoftwarePlotting Techniques
1. Time-Domain Plot
Plots signal amplitude against time.
Useful for temperature, heart rate, vibration and other time-varying signals.
2. XY Plot
Plots one measured variable against another, such as pressure versus temperature.
3. Frequency Spectrum
Uses techniques such as the Fast Fourier Transform (FFT) to show signal magnitude versus frequency.
Useful for vibration and periodic-signal analysis.
4. Trend Plot
Shows long-term changes such as temperature over several hours or days.
Typical Software Workflow
- Connect to the data logger.
- Retrieve raw samples.
- Parse the data format.
- Add timestamps/channel information.
- Apply calibration and units.
- Remove invalid values if required.
- Plot the data.
- Save the graph or processed dataset.
Example
For vibration data, the time-domain graph can show transient events, while an FFT plot can identify dominant vibration frequencies.
Conclusion
Data retrieval transfers stored measurements into an analysis environment, while plotting converts numerical data into visual information that makes trends, abnormalities and frequency components easier to identify.
Q7(b). Discuss various data analysis techniques used in embedded and data acquisition systems.20257m
Module 6: Analysis
View this question on its own page →Discuss various data analysis techniques used in embedded and data acquisition systems.
Worked SolutionSolution: Data Analysis Techniques in Embedded and DAQ Systems
1. Statistical Analysis
Basic statistics summarize acquired data.
Mean
Variance
Other useful measures include minimum, maximum, range and standard deviation.
2. Filtering
Digital low-pass, high-pass, band-pass and notch filters can remove unwanted frequency components.
3. Time-Domain Analysis
Examines how the signal changes with time. Peak value, RMS value, rise time, pulse width and zero crossings may be measured.
For samples , RMS is:
4. Frequency-Domain Analysis
The FFT (Fast Fourier Transform) converts sampled time-domain data into frequency-domain information. It is widely used for vibration, audio and periodic-signal analysis.
5. Trend Analysis
Long-term trends are examined to detect gradual changes, drift or degradation.
6. Threshold and Event Detection
The system can compare a measurement against predefined limits and generate an alarm or control action.
7. Correlation Analysis
Correlation measures the relationship between two signals or variables and can help identify related system behavior.
8. Feature Extraction
Important features such as mean, RMS, peak, frequency and pulse rate are extracted from raw data for classification or monitoring.
9. Calibration and Error Analysis
Measured values are compared with known references to determine offset, gain error, sensitivity and other measurement errors.
Embedded Implementation
To perform analysis on a microcontroller, efficient algorithms, fixed-point arithmetic where appropriate, buffering and interrupt/DMA-based acquisition may be used.
Conclusion
DAQ analysis combines statistical, time-domain, frequency-domain, filtering, trend, threshold, correlation and calibration techniques to convert raw measurements into useful engineering information.
Q8(a). A microcontroller system needs to store real-time vibration data at 10 kSamples/s, each sample being 16 bits. (i) Calculate the minimum memory size required for storing 5 minutes of data. (ii) Suggest a suitable data storage interface (SPI/I2C/Parallel) and justify with bandwidth calculations.20257m
Module 5: Data Processing
View this question on its own page →A microcontroller system needs to store real-time vibration data at 10 kSamples/s, each sample being 16 bits.
(i) Calculate the minimum memory size required for storing 5 minutes of data.
(ii) Suggest a suitable data storage interface (SPI/I2C/Parallel) and justify with bandwidth calculations.Worked SolutionSolution: Vibration Data Storage Calculation
Given:
- Sampling rate = 10 kSamples/s = samples/s
- Sample size = 16 bits = 2 bytes/sample
- Duration = 5 minutes = 300 s
(i) Minimum Memory Required
Data rate:
Convert to bytes/s:
For 300 seconds:
Therefore:
Using binary units, this is approximately:
So at least 6 MB decimal storage is required, excluding filesystem overhead and metadata.
(ii) Suitable Interface
The raw required throughput is:
or:
SPI
SPI is the best choice among the given options for a typical embedded data logger because it provides high throughput with simple hardware and is widely supported by SD cards and external memory.
Even a modest SPI clock of 1 MHz can theoretically transfer:
which is well above the required 20 kB/s, leaving margin for protocol and storage overhead.
I²C
I²C is convenient for sensors and EEPROMs, but its lower typical speed makes it less attractive for continuous high-rate storage.
Parallel
Parallel interfaces can provide high throughput but require more pins and hardware complexity.
Final Answer
- Minimum data storage: bytes ≈ 6 MB
- Raw data rate: 0.16 Mbps = 20 kB/s
- Recommended interface: SPI, because it easily provides sufficient bandwidth with low pin count and is well suited to SD-card/external-memory logging.
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(a). A DAQ system samples 4 channels simultaneously at 25 kS/s per channel. Each sample is 12 bits. The microcontroller writes data to an SD card via SPI at 12 Mbps. The SD card uses 512-byte sectors and write operations must be in whole sectors. The MCU packs samples channel-wise into frames and writes continuously. (i) Compute the raw data rate in Mbps and the required sustained write throughput in MB/s (account for packing). (ii) Design a framing strategy: pack samples into 512-byte sectors with minimal wasted space—compute how many samples per sector and how many sectors per second must be written.20257m
Module 5: Data Processing
View this question on its own page →A DAQ system samples 4 channels simultaneously at 25 kS/s per channel. Each sample is 12 bits. The microcontroller writes data to an SD card via SPI at 12 Mbps. The SD card uses 512-byte sectors and write operations must be in whole sectors. The MCU packs samples channel-wise into frames and writes continuously.
(i) Compute the raw data rate in Mbps and the required sustained write throughput in MB/s (account for packing).
(ii) Design a framing strategy: pack samples into 512-byte sectors with minimal wasted space—compute how many samples per sector and how many sectors per second must be written.Worked SolutionSolution: Multichannel DAQ Data Rate and SD-Card Framing
Given:
- Number of channels = 4
- Sampling rate per channel = 25 kS/s
- ADC resolution = 12 bits/sample
- SPI rate to SD card = 12 Mbps
- Sector size = 512 bytes
(i) Raw Data Rate
Total samples per second across all channels:
Each sample contains 12 bits, so:
Therefore:
In bytes/s:
So:
Account for packing
Because SD-card writes are byte-addressable, 12-bit samples cannot simply occupy 12 bits independently unless the firmware packs them.
A convenient packing scheme stores two 12-bit samples in 3 bytes:
Thus efficient packing produces exactly the theoretical raw rate of 0.15 MB/s, excluding filesystem and protocol overhead.
The available SPI bandwidth is:
Therefore the nominal raw data rate is only:
of the stated SPI link capacity, leaving substantial bandwidth margin.
(ii) 512-Byte Sector Framing
A 512-byte sector contains:
With 12-bit samples, the maximum number of complete samples is:
341 samples use:
So one sector can contain 341 complete 12-bit samples if the packing is bit-level, leaving:
unused.
However, a cleaner byte-aligned scheme is to pack 340 samples:
leaving exactly 2 bytes for metadata, a timestamp, frame counter, CRC, or padding.
Recommended framing
Use 340 samples per 512-byte sector and reserve 2 bytes for metadata, or use a 341-sample bit-packed payload with 4 unused bits plus a defined header/trailer.
At 100,000 samples/s:
Thus the system needs approximately:
with 340 samples/sector, ignoring additional metadata.
For maximum packing efficiency using 341 samples/sector:
so approximately 294 sectors/s are required.
Final Answer
- Raw data rate: 1.2 Mbps = 0.15 MB/s
- SPI capacity: 12 Mbps = 1.5 MB/s
- Maximum complete 12-bit samples in 512 bytes: 341 samples
- Efficient practical framing: 340 samples + 2 bytes metadata/padding
- Sectors/s: approximately 295 sectors/s for 340-sample frames, or 294 sectors/s with 341-sample bit packing.
The stated SPI bandwidth is comfortably sufficient for the raw acquisition rate.
Q9(b). A 14-bit ADC (counts 0...16383) is used with an input range of 0...2.500 V to read a temperature sensor whose output is linearly 0–2.5 V (for 0–200°C). During calibration you measure that a known 100°C reference gives an ADC code of 6550. (i) Compute the ideal LSB (in volts) and the ideal code corresponding to 100°C. (ii) From the calibration reading (6550), find the offset error in volts and in °C.20257m
Module 2: Signal Conditioning Systems
View this question on its own page →A 14-bit ADC (counts 0...16383) is used with an input range of 0...2.500 V to read a temperature sensor whose output is linearly 0–2.5 V (for 0–200°C). During calibration you measure that a known 100°C reference gives an ADC code of 6550.
(i) Compute the ideal LSB (in volts) and the ideal code corresponding to 100°C.
(ii) From the calibration reading (6550), find the offset error in volts and in °C.Worked SolutionSolution: ADC Resolution and Calibration Error
Given:
- ADC resolution = 14 bits
- ADC counts = to
- Input range = 0–2.500 V
- Temperature range = 0–200°C
- Sensor output = 0–2.5 V linearly
- Measured code at 100°C = 6550
(i) Ideal LSB and Ideal Code at 100°C
Step 1: Calculate ideal LSB
A 14-bit ADC has:
quantization intervals.
Therefore:
Hence:
Step 2: Ideal voltage at 100°C
The sensor is linear from 0 V at 0°C to 2.5 V at 200°C.
At 100°C, which is half of the temperature range:
Step 3: Ideal ADC code
Using the ideal ADC transfer convention:
So the ideal code is approximately:
(ii) Offset Error
Measured code:
Ideal code:
Code error:
Convert this code error into voltage using the LSB:
So the measured result is approximately 0.251 V below the ideal value.
Equivalent temperature error
The sensor has a range of:
Therefore its sensitivity is:
Hence:
Therefore, at the 100°C reference point, the calibrated reading corresponds to an error of approximately −20°C relative to the ideal transfer.
Cross-check Using Measured Code
Measured voltage corresponding to code 6550:
This corresponds to:
So a true 100°C input is being reported at approximately 79.96°C, giving an error of approximately:
Final Answer
Quantity Result ADC resolution 14 bit Ideal LSB 152.59 μV Ideal code at 100°C ≈ 8192 Measured code 6550 Code error −1642 counts Offset error ≈ −0.2506 V Equivalent temperature error ≈ −20.04°C Measured temperature equivalent ≈ 79.96°C Note: Strictly, a single calibration point reveals a combined offset/gain error unless the gain is independently known. Under the exam's stated linear-sensor assumption, the difference at the 100°C reference is treated as the offset error.