S&I Unit4-1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

UNIT-4

1.1 DATA ACQUISITION METHODS: BASIC BLOCK DIAGRAM


Q).What is Data Acquisition ? or why do we use Data Acquisition (DAQ) system
A Data Acquisition (DAQ) system is a combination of hardware and software components designed to
collect, measure, and analyze physical phenomena from the real world.
These systems convert analog signals from sensors and transducers into digital data that can be
processed by a computer.

Here are the key components and functions of a DAQ system:

 Sensors and Transducers:


Detect and measure physical phenomena.
Convert physical quantities (e.g., temperature, pressure, light) into electrical signals.
 Signal Conditioning:
Amplifies weak signals to a usable level.
Filters out noise and unwanted frequencies.
Converts sensor signals into a form suitable for the ADC (e.g., voltage range).
 Analog-to-Digital Converter (ADC):
Converts analog signals from sensors into digital data.
Provides the digital representation of the analog input for processing.
 Data Acquisition Hardware:
Multiplexers: Allow multiple sensor signals to be processed by a single ADC.
Timers: Synchronize data acquisition events.

1
Digital I/O Interfaces: Allow communication with digital sensors and control devices.
Connection Interfaces: USB, PCI, PCIe, Ethernet, etc., to connect DAQ hardware to a computer.
 Data Acquisition Software:
Configures and controls the DAQ hardware.
Provides data visualization and logging capabilities.
Performs real-time data analysis and processing.
Interfaces with other software for data export and further analysis.
 Computer:
Runs the DAQ software.
Serves as the user interface for monitoring and controlling the data acquisition process.
Stores and processes the collected data.

Example
Suppose you are monitoring the temperature and pressure inside an industrial furnace. A DAQ system
in this case would include:
Temperature and Pressure Sensors: To measure the respective parameters.
Signal Conditioning Unit: To amplify and filter the sensor signals.
DAQ Hardware: With ADC to convert the signals into digital data.
DAQ Software: To display real-time temperature and pressure readings, log the data, and alert
operators if parameters exceed safe limits.
Computer: To run the DAQ software and interface with the user.
By integrating these components, the DAQ system provides a comprehensive solution for acquiring,
analyzing, and acting on data from physical processes and environments.

1.1.1 Important factors when designing or selecting a Data Acquisition (DAQ) system to
ensure optimal performance and accurate data collection.

These factors include:


Sampling Rate:
Determines how frequently data is collected.
Must be high enough to accurately capture the signals of interest (following the Nyquist theorem,
the sampling rate should be at least twice the highest frequency in the signal).

Resolution:
Refers to the number of bits used by the ADC to represent the analog signal.
Higher resolution provides more precise measurements but generates larger data files.

Accuracy:
The degree to which the measured values represent the true values.
Includes factors like sensor accuracy, signal conditioning accuracy, and ADC accuracy.

2
Range:
The span of input values that the DAQ system can accurately measure.
Should cover the expected range of the physical phenomena being measured.

Channel Count:
The number of input channels available for data collection.
Determines how many sensors can be connected and monitored simultaneously.

Signal Conditioning:
The need for amplifying, filtering, and converting signals to a suitable range and format for the ADC.
Important for ensuring signal integrity and accuracy.

Connectivity:
Types of interfaces available for connecting the DAQ system to a computer (e.g., USB, Ethernet, PCI,
PCIe).
Should match the computer's available ports and desired data transfer rates.

Environmental Conditions:
Consider the operating environment (e.g., temperature, humidity, vibration).
Ensure the DAQ system and sensors can withstand these conditions without degradation in
performance.

Cost:
The overall cost of the DAQ system, including hardware, software, and any additional accessories.
Should be balanced against performance requirements and budget constraints.

1.2 ANALOG AND DIGITAL IO


There are two categories of I/O devices : Analog and Digital
Analog Input (AI)
Function: Captures continuous signals from analog sensors and transducers (e.g., temperature
sensors, pressure transducers, strain gauges).
Components:
Sensors/Transducers: Convert physical phenomena into analog electrical signals.
Signal Conditioning: Amplifies, filters, and prepares signals for digitization.
Analog-to-Digital Converter (ADC): Converts the conditioned analog signals into digital data for
processing and analysis.

3
Analog Input Example:
Measuring temperature with a thermocouple.
Thermocouple generates a small voltage proportional to temperature.
Signal conditioning amplifies and filters the voltage signal.
ADC converts the analog signal to digital data.
DAQ software processes and displays the temperature.
Analog Output (AO)
Function: Converts digital data into continuous analog signals to control actuators, devices, or other
systems (e.g., signal generators, motor controllers).
Components:
Digital-to-Analog Converter (DAC): Converts digital data into analog signals.
Signal Conditioning: May include amplification and filtering to ensure the output signal meets the
required specifications.

Analog Output Example:


Controlling the speed of a motor.
DAQ software generates a digital control signal.
DAC converts the digital signal to an analog voltage.
Signal conditioning adjusts the voltage to the required level.
Analog signal controls the motor driver.
Digital Input (DI)
Function: Captures discrete signals from digital sensors or switches (e.g., on/off states, pulse signals).
Components:
Digital Sensors/Switches: Provide binary signals representing physical states.
Digital I/O Ports: Interface for capturing and processing digital signals.

Digital Input Example:


Monitoring the state of a limit switch in a machine.
Switch provides a binary signal (on/off).
Digital I/O port reads the signal.
DAQ software logs and responds to the switch state.

Digital Output (DO)


Function: Sends discrete signals to control digital devices or indicate states (e.g., LEDs, relays, digital
actuators).
Components:
Digital I/O Ports: Interface for sending digital signals to external devices.
Drivers/Amplifiers: May be required to drive higher power devices.

4
Digital Output Example:
Turning on an LED indicator.
DAQ software sends a digital command.
Digital I/O port outputs a high/low signal.
LED driver (if needed) amplifies the signal.
LED turns on or off based on the signal.

1.3 COUNTERS
Counters are essential components in digital systems and Data Acquisition (DAQ) systems used for
counting events, measuring frequency, timing intervals, and generating precise time delays.
Applications of Counters
Event Counting:
 Counting objects on a conveyor belt using a photoelectric sensor.
 Tracking the number of operations in a mechanical process.
Frequency Measurement:
 Measuring the rotational speed of a motor using a tachometer.
 Determining the frequency of a signal in electronic circuits.
Timing and Interval Measurement:
 Measuring the time between two events in a timing system.
 Calculating pulse width or duty cycle in pulse-width modulation (PWM) signals.
Position and Speed Measurement:
 Using quadrature encoders to measure position and speed of rotating shafts.
 Counting steps in stepper motor applications.

1.4 TIMERS
Timers are essential components in digital systems and Data Acquisition (DAQ) systems used for
generating precise time delays, measuring time intervals, and scheduling events.
Applications of Timers
Time Interval Measurement:
 Measuring the time between two events in scientific experiments or industrial processes.
 Calculating time-of-flight in ranging systems.
Generating Delays:
 Creating precise delays in control systems, such as delaying the start of a motor.
 Implementing debouncing for mechanical switches to filter out noise.
Periodic Event Scheduling:
 Scheduling regular tasks in embedded systems, such as sensor readings or data logging.
 Generating pulse-width modulation (PWM) signals for controlling motors or LEDs.

5
Real-Time Clock Functions:
 Keeping track of real-world time for data logging, event scheduling, and timestamping data.
 Providing time-based alarms and wake-up signals.
System Monitoring:
 Watchdog timers reset the system if it becomes unresponsive, ensuring reliability and
robustness.
 Monitoring and managing system operation within specified time constraints.
Q) difference between counters & timers ?

Feature/Aspect Counter Timer

Purpose Counts the number of occurrences Measures time intervals or generates


of events or pulses precise time delays

Primary Function Event counting, frequency Timing intervals, delay generation, real-
measurement time clock functions

Input External events or pulses (e.g., Clock pulses (internal or external clock
from sensors) source)

Output Count value (number of events) Time duration or time delay

Counting Mode Up counting, down counting, Up counting, down counting


up/down counting

Applications Counting objects, steps, rotations, Timing events, scheduling tasks, generating
frequency measurement delays, real-time clocking

Resolution Smallest detectable change in Smallest time increment measured or


input events generated

Range Maximum count value before Maximum time period measured or


overflow generated

Clock Source Typically external (sensor or Internal or external clock source


signal generator)

Examples Digital tachometers, flow meters, Delay circuits, PWM generation, RTCs,
event loggers watchdog timers

Measurement Number of occurrences Time duration


Focus

Typical Output Provides count data for further Triggers events or actions after a specified
Use processing time

1.5 TYPES OF ADC:


Analog-to-Digital Converters (ADCs) are essential components in digital systems and Data Acquisition
(DAQ) systems for converting analog signals into digital data. There are several types of ADCs, each

6
with its own characteristics, advantages, and typical applications.
Here are the main types:
(1). Successive Approximation Register (SAR) ADC
 Operation: Uses a binary search algorithm to convert the analog input into a digital output.
 Speed: Moderate.
 Resolution: High (typically 8 to 18 bits).
 Applications: Precision measurement, data acquisition systems, and applications requiring
moderate speed and high accuracy.
(2). Sigma-Delta (Σ-Δ) ADC
 Operation: Oversamples the input signal and filters the result to produce a high-resolution
output.
 Speed: Low to moderate.
 Resolution: Very high (typically 16 to 24 bits).
 Applications: Audio processing, instrumentation, and applications requiring high resolution and
noise reduction.
The sensitivity and resolution of an Analog-to-Digital Converter (ADC) are crucial parameters that
affect the accuracy and precision of digital measurements.
Sensitivity
Definition: Sensitivity in the context of an ADC typically refers to the smallest change in input voltage
that results in a change in the output digital code.
Resolution
Definition: Resolution is the smallest voltage increment that can be distinguished by the ADC, usually
expressed in bits.
Formula: For an ADC with N bits of resolution and a full-scale input range V FS, the resolution in volts is
given by:

Example: For a 12-bit ADC with a full-scale input range of 5V:

1.5.1 Operation of Successive Approximation Register SAR ADC

The SAR ADC performs the conversion in a sequence of steps, each refining the digital approximation of
the analog input signal. The key components of a SAR ADC include:
Sample and Hold Circuit (S/H): Captures and holds the input analog voltage constant during the
conversion process.
Comparator: Compares the analog input voltage to the output of the DAC (Digital-to-Analog
Converter).

7
Digital-to-Analog Converter (DAC): Converts the current digital approximation to an analog voltage
V d.
V ref ∗va lue
V d= n
2
Successive Approximation Register (SAR): A digital register that holds the current approximation of
the digital output.
Control Logic: Manages the conversion process and the successive approximation algorithm.
Example
For a 4-bit SAR ADC converting an analog input of 5.2V with a reference voltage ( V ref ) of 10V:
Initial Setup
Analog Input (V_in): 5.2V
Reference Voltage (V_ref): 10V
Resolution: 4 bits
Step Size: V_ref / (2^n) = 10V / 16 = 0.625V per step

Step-by-Step Conversion Process


Initialization
SAR Register: 0000
Description: At the start, the SAR register is initialized to zero. This register will hold the digital
approximation of the analog input as the conversion process proceeds.
(Step 1)
Set MSB
SAR Register: 1000
DAC Output Calculation: The DAC converts the binary code 1000 to an analog voltage. Since 1000 is
the decimal value 8, the DAC output is:
DAC Output=8×0.625V=5V
Comparison:
DAC Output: 5V
V_in: 5.2V
Since 5V < 5.2V, the comparator indicates that the SAR should keep the MSB as 1.
Result: SAR Register remains 1000.
(Step 2)
Next Bit (Second MSB)
SAR Register: 1100
DAC Output Calculation: The DAC converts the binary code 1100 to an analog voltage. Since 1100 is
the decimal value 12, the DAC output is:
DAC Output=12×0.625V=7.5V
Comparison:

8
DAC Output: 7.5V
V_in: 5.2V
Since 7.5V > 5.2V, the comparator indicates that the SAR should set this bit to 0.
Result: SAR Register changes to 1000.
(Step 3)
Next Bit (Third MSB)
SAR Register: 1010
DAC Output Calculation: The DAC converts the binary code 1010 to an analog voltage. Since 1010 is
the decimal value 10, the DAC output is:
DAC Output=10×0.625V=6.25V
Comparison:
DAC Output: 6.25V
V_in: 5.2V
Since 6.25V > 5.2V, the comparator indicates that the SAR should set this bit to 0.
Result: SAR Register changes to 1000.
(Step 4)
Next Bit (LSB)
SAR Register: 1001
DAC Output Calculation: The DAC converts the binary code 1001 to an analog voltage. Since 1001 is
the decimal value 9, the DAC output is:
DAC Output=9×0.625V=5.625V
Comparison:
DAC Output: 5.625V
V_in: 5.2V
Since 5.625V > 5.2V, the comparator indicates that the SAR should set this bit to 0.
Result: SAR Register changes to 1000.

Final Output
Final SAR Register: 1000
Digital Output (Binary): 1000
Digital Output (Decimal): 8

9
1.5.2 Operation of Sigma-Delta (Σ-Δ) ADC

Modulator block

Components of a Sigma-Delta ADC


Analog Input:
The analog signal that needs to be converted to a digital format.
Integrator (Σ):
Continuously integrates the difference between the analog input signal and the feedback signal
from the 1-bit DAC. This integration helps to shape the noise and spread it across a wider frequency
range.
Comparator (CMP):
Compares the output of the integrator with a reference level (usually zero). If the integrator output
is greater than zero, the comparator outputs a '1'; if it is less than zero, the comparator outputs a '0'.
This creates a high-speed bitstream.
1-bit DAC:
Converts the bitstream back into an analog signal. This feedback signal is then subtracted from the
analog input signal in the integrator. The 1-bit DAC ensures that the loop is closed and the system
remains stable.
Digital Filter (Decimation Filter):
Processes the high-speed bitstream to remove high-frequency noise. This filter converts the
oversampled bitstream into a lower-rate, high-resolution digital signal. It performs both noise filtering

10
and down-sampling (decimation) to achieve the desired resolution and sampling rate.

1.6 TYPES OF DAC:

1.6.1 Binary-Weighted DAC

Architecture: Uses resistors with values weighted in binary progression (e.g., R, 2R, 4R, etc.).
Operation: The digital input controls switches that connect the binary-weighted resistors to a
summing amplifier.
Advantages: Simple design and fast conversion.
Disadvantages: Requires precise resistor matching and becomes impractical for high resolutions due
to large resistor value ranges.
Applications: Medium-speed and medium-resolution applications.

1.6.2 R-2R Ladder DAC

Architecture: Utilizes a repeating structure of resistors with values R and 2R to create a binary-
weighted ladder network.
Operation: The digital input controls switches that connect different points of the R-2R network to
the output.
Advantages: Easier to design with higher resolutions, good linearity, and relatively simple layout.
Disadvantages: Still requires precision resistors, but less critical than binary-weighted DACs.
Applications: Audio, video, and medium to high-speed signal processing.

1.7 USE OF DATA SOCKETS FOR NETWORKED COMMUNICATION


Data sockets are essential for networked communication, facilitating the transfer of data between
devices over a network. They provide a standard API for network communication in many
programming languages and operating systems.
A socket is an endpoint for sending or receiving data across a computer network. Sockets allow for two-
way communication between devices, enabling the exchange of data over protocols such as TCP
(Transmission Control Protocol) and UDP (User Datagram Protocol).
Types of Sockets
Stream Sockets (TCP)
Type: SOCK_STREAM
Protocol: TCP
Characteristics: Connection-oriented, reliable, guarantees delivery of data, and ensures data order.
Use Cases: Applications requiring reliable data transfer, such as web browsers, email clients, and
file transfer services.
Datagram Sockets (UDP)
Type: SOCK_DGRAM
Protocol: UDP
Characteristics: Connectionless, unreliable, no guarantee of delivery or order, but faster and with
less overhead.

11
Use Cases: Applications where speed is critical and some data loss is acceptable, such as live video
streaming, online gaming, and VoIP.

12

You might also like