ENG3640 Microcomputer Interfacing Week #8 Data Acquisition Systems Part (B)

Slides:



Advertisements
Similar presentations
Transducers PHYS3360/AEP3630 Lecture 33.
Advertisements

Interfacing to the Analog World
Interfacing to the Analog World
Analog-to-Digital Converter (ADC) And
Sensors Interfacing.
Digital to Analogue Conversion
Digital to Analog and Analog to Digital Conversion
Announcements Assignment 8 posted –Due Friday Dec 2 nd. A bit longer than others. Project progress? Dates –Thursday 12/1 review lecture –Tuesday 12/6 project.
CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Analog to Digital (and back again) Interfacing a microprocessor-based system.
COMP3221: Microprocessors and Embedded Systems
5/4/2006BAE Analog to Digital (A/D) Conversion An overview of A/D techniques.
Shuvra Das University of Detroit Mercy
Lecture 9: D/A and A/D Converters
10/23/2003ME DAC Lecture1 DAC Sunij Chacko Pierre Emmanuel Deliou Thomas Holst Used with modification.
Analogue to Digital Conversion
Interfacing Analog and Digital Circuits
DIGITAL SYSTEMS TCE INTERFACING WITH ANALOG DEVICES (Week 12)
Unit 4 Sensors and Actuators
Interfacing with the Analog World Wen-Hung Liao, Ph.D.
Embedded Systems Development and Applications
Discussion #25 – ADCECEN 3011 Conversion Mosiah 5:2 2 And they all cried with one voice, saying: Yea, we believe all the words which though has spoken.
SENSORS AND TRANSDUCERS
1 Digital to Analog Converter Nov. 1, 2005 Fabian Goericke, Keunhan Park, Geoffrey Williams.
Engineering 80 – Spring 2015 Temperature Measurements
Digital to Analog Converters
Classification of Instruments :
Sensors Introduction Describing Sensor Performance Temperature Sensors
Digital to Analog and Analog to Digital Conversion
Lecture 3: Bridge Circuits
Electronic Devices Ninth Edition Floyd Chapter 13.
Topic 1 different attributes that characterize sensors ETEC 6405.
Digital to Analog Converters
EKT314/4 Electronic Instrumentation
Digital-to-Analog & Analog-to- Digital Conversion Anuroop Gaddam.
Basics of Measurement and Instrumentation
Digital to Analog Converters (DAC) 1
1 Sensors and Measurements Penderia & Pengukuran ENT 164 Signal Processing Elements Hema C.R. School of Mechatronics Engineering Northern Malaysia University.
ACOE2551 Microprocessors Data Converters Analog to Digital Converters (ADC) –Convert an analog quantity (voltage, current) into a digital code Digital.
LSU 06/04/2007Electronics 61 Data Acquisition Electronics Unit – Lecture 6 Sensors and Transducers Signal conditioning Data sampling and recording.
©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist.
Introduction to Engineering Lab 4 – 1 Basic Data Systems & Circuit Prototyping Agenda REVIEW OF LAB 3 RESULTS DEFINE a DATA SYSTEM  MAJOR TYPES  ELEMENTS.
Analog to Digital conversion. Introduction  The process of converting an analog signal into an equivalent digital signal is known as Analog to Digital.
ELN5622 Embedded Systems Class 7 Spring, 2003 Aaron Itskovich
EKT 451/4 SEM 2 Chapter 6 SENSOR & TRANSDUCER SHAIFUL NIZAM MOHYAR
Biomedical Electrodes, Sensors, and Transducers
Digital to Analog Converters (DAC) 1 Technician Series ©Paul Godin March 2015.
Lecture 9: Modeling Electromechanical Systems 1.Finish purely electrical systems Modeling in the Laplace domain Loading of cascaded elements 2.Modeling.
1 Data-Converter Circuits A/D and D/A Chapter 9 1.
PREPARED BY V.SANDHIYA LECT/ ECE UNIT- 3 APPLICATIONS OF OP-AMP 1.
Analog/Digital Conversion
Digital to Analog Converter (DAC)
1. 2 Meghanathi Gaurang k ( ) Pandey Prashant D ( ) Mishra sandip R ( )
Engineering 80 – Spring 2016 Temperature Measurements 1 SOURCE: 3_standardbody__to-226_straightlead.jpg SOURCE:
Additional information on Passive Probes (10x) Take note that the scope’s input capacitance, C in must falls within the probe’s compensation range For.
Lecture Notes / PPT UNIT III
1 Summary Lecture: Part 1 Sensor Readout Electronics and Data Conversion Discovering Sensor Networks: Applications in Structural Health Monitoring.
Analog-Digital Conversion. Other types of ADC i. Dual Slope ADCs use a capacitor connected to a reference voltage. the capacitor voltage starts at zero.
Digital Logic & Design Dr. Waseem Ikram Lecture 45.
EKT 451 CHAPTER 6 Sensor & Transducers.
1 Transducers EKT 451 CHAPTER 6. 2 Definition of a Transducers   Transducer is any device that converts energy in one form to energy in another.  
MECH 373 Instrumentation and Measurements
Microprocessors Data Converters Analog to Digital Converters (ADC)
TRANSDUCERS PRESENTATION BY: Dr.Mohammed Abdulrazzaq
Analog-Digital Conversion
EI205 Lecture 13 Dianguang Ma Fall 2008.
Medical electronics II
Lesson 8: Analog Signal Conversion
Conversation between Analogue and Digital System
Chapter 7 Converters.
Data Acquisition Electronics Unit – Lecture 6
Presentation transcript:

ENG3640 Microcomputer Interfacing Week #8 Data Acquisition Systems Part (B)

2 Topics  Sensors  Signal Conditioning  Analog to Digital Converters  Sample and Hold Circuit ENG3640 Fall 2012

3 Resources  Huang, Chapter 12, Sections  12.1 – 12.6 Signal Conditioning Circuits ENG3640 Fall 2012

4 Sensors and Signal Conditioning Real World Measurand Transducer (sensors) Analog Mux Signal Conditioning Sample and Hold Circuit A/D Conv MCU D/A Conv Actuator ENG3640 Fall 2012

Transducers Transducer  a device that converts a primary form of energy into a corresponding signal with a different energy form  Primary Energy Forms: mechanical, thermal, electromagnetic, optical, chemical, etc.  take form of a sensor or an actuator Sensor (e.g., thermometer)  a device that detects/measures a signal or stimulus  acquires information from the “real world” Actuator (e.g., heater)  a device that generates a signal or stimulus real world sensor actuator intelligent feedback system 5ENG3640 Fall 2012

6 Sensors  Sensors connect the digital world to the analog real world 1. Position Based Sensors 2. Force Sensors 3. Temperature Sensors 4. Light Intensity Sensors 5. Pressure Sensors 6. Humidity Sensors 7. …. ENG3640 Fall 2012

7 Transducers: General Term  Transducers convert variable processes such as pressure, temperature, humidity e.t.c., into electrical signals such as voltage or current. It consists of: 1. Input interface element provides  Improved coupling between measurand s(t) and sensor (matching function)  Protection to the sensor from undesirable environmental effects  Conversion of s(t) to another physical variable s 1 (t) required by a sensor. 2. Sensor 3. Output interface element Input Interface Element Sensor Output Interface Element S(t)X(t)S 1 (t) ENG3640 Fall 2012

8 Shaft Angle With Potentiometer  Applications:  Accelerator pedal position  Steering wheel angle  Voltage V s changes because of the change in resistance  Simple application of Ohm’s law V = I x R  Shaft angle proportional to voltage V s  Outputs the angular position of the shaft ENG3640 Fall 2012

9 Linear Variable Displacement Transformer (LVDT)  Moving iron core changes properties of transformer  Iron core position changes primary/secondary voltage ratio  Difference in phase is measured and transformed to a voltage  Voltage measured is proportional to distance moved.  Applications:  Fluid level and flow  Deflection of Beams ENG3640 Fall 2012

10 Strain Gauge: Force Measurement  Resistance varies with the amount of stretching (strain)  Flexure can be measured with a strain gauge  Force can also be measured  The change in resistance is detected by measuring the voltage change in a Wheatstone bridge. ENG3640 Fall 2012

Passive Sensor Readout Circuit Photodiode Circuits Thermistor Half-Bridge voltage divider one element varies Wheatstone Bridge R3 = resistive sensor R4 is matched to nominal value of R3 If R 1 = R 2, V out-nominal = 0 V out varies as R 3 changes VCC R1+R4R1+R4 11ENG3640 Fall 2012

12 Temperature: Thermocouples  Outputs a voltage that is related to temp at the tip of the probe  Seebeck effect: current will flow through a junction of dissimilar metals if there is a temperature difference  The voltage produced is very minute (milli-volts)  The relationship between voltage and temperature is non linear  Varies from 6 uV/C to 90 uV/C ENG3640 Fall 2012

Temperature Sensor Options Resistance Temperature Detectors (RTDs) Platinum, Nickel, Copper metals are typically used positive temperature coefficients Thermistors (“thermally sensitive resistor”) formed from semiconductor materials, not metals often composite of a ceramic and a metallic oxide (Mn, Co, Cu or Fe) typically have negative temperature coefficients Thermocouples based on the Seebeck effect: dissimilar metals at diff. temps.  signal 13ENG3640 Fall 2012

14 Phototransistor: Light Detection  Current through external resistor varies with light intensity  Can be used to detect light levels or movement  Sensitive to different colors or wavelengths of light ENG3640 Fall 2012

15 Actuators Output Transducers: Actuators  Some common actuators include solenoids, relays, (triacs, SCRs  switch ac currents).  An increasing analog signal at the gate of the MOSFET increases the amount of current drawn through the dc motor shunt field (field control).  A relay is an electromagnetic switch with a coil and one or more contacts.  Applying voltage to the coil will cause open contacts to close and vise versa.  A solenoid is like a relay but moves a mechanical cylinder instead of electrical contacts. ENG3640 Fall 2012

16 Example  A Temp sensor has a measurement range of -10 to 140C. The output range is -2.5 to +5V. The sensor is connected to an 8-bit A/D. Indicate the offset, span, step size and resolution. Also what is the digital output of the A/D if the temp is +10C?  SOLUTION: 1. Offset  -2.5V, -10C 2. Span  5 – (-2.5V) = 7.5 V, 140C – (-10) = 150C 3. Step Size  7.5/2 8 = 29mv, 150/2 8 = 0.59C 4. Resolution 29mv at 8-bit  To find the digital output of A/D we have to solve the following equation (assuming relationship is linear!) Analog number = m x measurement + K ENG3640 Fall 2012

17 Cont.. Example 1. 5v = 140C x m + K v = -10C x m + K Subtract 2 from 1 7.5v = 150 C x m m = 7.5V/150C m  0.05V/C  Solve for K: 140C x (0.05V/C) + K = 5V K  -2V  Analog output  10C x 0.05V/C – 2V = -1.5V  Digital Number = (Analog Number – Offset)/Step Size  Digital output  -1.5V – (-2.5V)/29mv = (34.8) 10 == (22) 16 ENG3640 Fall 2012

18 Signal Conditioning  Raw sensor outputs are not always suitable for A/D conversion.  Signal conditioning circuits typically amplify the raw signal from the sensor (i.e. thermocouple)  Signal conditioning also provides: 1. buffering, 2. filtering, 3. offset shifting  Most signal conditioning circuits employ operational amplifiers ENG3640 Fall 2012

19 The Inverting/Non-Inverting Amplifiers ENG3640 Fall 2012

20 Voltage Scaling  There are situations in which the transducer output voltage are in the range of 0 ~ V Z, where V Z < V DD. Because V Z sometimes can be much smaller than V DD, the A/D converter cannot take advantage of the available full dynamic range, and therefore conversion results can be very inaccurate.  A voltage scaling circuit can be used to improve the accuracy because it allows the A/D converter to utilize its full range.  Example:  Suppose the transducer output voltage ranges from 0V to 100mV. Design a circuit to scale this range to 0~5V. ENG3640 Fall 2012

21 Voltage Scaling Circuit A V = 1 + (R2/R1) = (5V/0.1V) = 50  R2/R1 = 49  Choose R1 = 6.8K,  Then R2 = 330K.  The R2/R1 ratio is Error is smaller within 0.3%. ENG3640 Fall 2012

22 The Unity-Gain Buffer or Voltage Follower  Signal conditioning can also provide buffering  so that the sensor signal is not affected by anything else connected to the circuit (i.e. minimize loading  high input impedance and low output impedance) 22ENG3640 Fall 2012

23 Voltage Shifting-Scaling Circuit  There are transducers whose outputs are in the range of V 1 ~V 2 instead of 0V~VDD  (V 1 can be negative and V 2 can be smaller than V DD )  The accuracy of A/D conversion can be improved by using a circuit that shifts and scales the transducer output so that it falls in the full range of 0V~V DD.  A Level Shifting/Scaling Circuit would consist of: I. A summing circuit II. Inverting voltage follower ENG3640 Fall 2012

24 By choosing Appropriate values For V 1 and the Resistors, the Desired voltage Shifting and scaling Can be achieved. 24

25 Example Choose the appropriate values of resistors and the adjusting voltage so that voltage shifting/scaling circuit can shift the voltage from –1.5V ~ 3.5V to 0V ~ 5V. Solution: 0 = -1.5 × (R f /R 1 ) – (R f /R 2 ) × V 1 5 = 3.5 × (R f /R 1 ) – (R f /R 2 ) × V 1 By choosing V 1 = - 12V and R f = R 1 = R 0 = 15K , R 2 is solved to be 120K . Voltage Shifting/Scaling Circuit ENG3640 Fall 2012

26 A Difference Amplifier.  Use superposition to perform analysis  If (R 4 = R 2 ), (R 3 = R 1 ) then V o = R 2 /R 1 (V 2 – V 1 )  Can be used to shift offset ENG3640 Fall 2012

27 Integrator/Differentiator ENG3640 Fall 2012

28 Analog-to-Digital Converters: Types  A/D converters are classified according to several characteristics  Resolution (number of bits) typically 8 bits to 24 bits  Speed (number of samples per second) – several samples/sec to several billion samples/sec  Accuracy – how much error there is in the conversion  Classification Staircase ADC Successive Approximation Converters  Tracking ADC  Flash A/D Converters  Integrating A/D Converters ENG3640 Fall 2012

29 Flash A/D: Comparators  A Flash A/D utilizes comparators and encoders.  A comparator compares two voltage values on its two inputs.  If the input on the + input is greater than the voltage on the – input, the output will be logic high 29ENG3640 Fall 2012

30 Flash A/D: Encoders  What if D3 and D4 both high?  Solution? 30ENG3640 Fall 2012

31 Flash A/D: Priority Encoder  Example: 4-to-2 line encoder  Chooses the input with highest priority  An extra output “V” could be used to validate output 31ENG3640 Fall 2012

32 Priority Encoder with Valid 32ENG3640 Fall 2012

33 Flash (Parallel) A/D Converter  Flash A/D converters can sample at several billion samples/sec  A flash A/D Converter is the simplest to understand.  It compares an input voltage V in to a large number of reference voltages  An n-bit flash uses 2 n – 1 comparators!!!  The output is determined by which of the two reference voltages the input signal is between.  Each succeeding comparator switches from a low output to a high level as the analog input increases by q.  The largest flash A/D converter is 8-bits (255 comparators!) 3-bit A/D Converter Priority Encoder ENG3640 Fall 2012

34 Integrating A/D Converters  One of the lowest cost A/D Converters (often used in digital voltmeters)  Slow  used if parameter being measured is changing slowly (i.e., temperature)  Has an advantage in noisy environments (noise rejection capability)  Types:  Single Slope Integrator  Dual Slope Integrator ENG3640 Fall 2012

35 The Dual-Slope A/D Conversion Method  S 2 is closed to discharge the capacitor  S 1 switches between V A and V REF  During the 1 st period, converter integrates input signal V A for fixed time (T1)  During 2 nd period input is connected to V REF of opposite polarity so integration proceeds to zero during variable time (T2)  The counter will count during T2  representing input signal ENG3640 Fall 2012

36 The Dual-Slope A/D Conversion Method  The limited integration period results in normal-mode noise rejection only when the integration period is equal to one or more periods of the noise signal.  The time integral of this noise over integer multiples of the noise period is ZERO.  At 60Hz minimum signal integrate time is 16.7 ms ENG3640 Fall 2012

37 Binary Weighted DAC  The binary weighted DAC covered earlier is used for small word size systems. Why?  Two major problems 1. The large resistor spread required for large word sizes i.e. R 0 = 2R 1 = 4R 2 = 8R 3 …. 2. Problem with large resistor spread is difficulty of IC Fabrication 3. If value of LSB is inaccurate or drifts slightly due to temp change leads to an output error that is larger than 1 LSB  Solution? ENG3640 Fall 2012

38 Inverted R-2R Ladder Circuit  Is used to solve the problem of resistor spread and minimize drift problem in DACs with large value of N. The spread of resistance value for the ladder is now only a 2:1 spread. ENG3640 Fall 2012

39 Inverted R-2R Ladder: Analysis MSB LSB  I 0 = V REF /R?  I 1 = V REF /2R  I 1 will split in half in second node I 2 = I 1 /2  V REF /4R  Each succeeding vertical resistor has a value of current flow equal to half that of previous  I 1 = 2 I 2 = 4 I 3 = … = 2 N-1 I N  Thus as in binary weighted resistive network, the currents controlled by the switches are binary weighted. I0I0 2R//2R = R ENG3640 Fall 2012

40 The Glitch Problem in DACS  A Significant problem occurring in DACs is that of glitching.  Certain systems that are driven by a DAC ignore the glitches such as DC motors (do not respond to these sharp transients)  Bits of the code do not change simultaneously  Solution?  Use a Sample/Hold circuit ENG3640 Fall 2012

41 Sample and Hold Circuit Practical Circuit? ENG3640 Fall 2012

42 Sample and Hold Circuit: Practical Circuit  S/H circuit is a high quality capacitor and semiconductor switch.  If analog signal changes rapidly during conversion (errors may be introduce)  S/H reduces these errors by quickly sampling the signal and holding it STEADY while A/D converts  Buffer amplifier (voltage follower) has high input impedance to decrease the discharge of the capacitor.  S 1, closes during sampling period  allows input signal to charge C h  S 1, opens up again  leaving capacitor charged to the value of analog input signal. ENG3640 Fall 2012

43 Sample and Hold Circuit: When is it required?  A S/H is required if: The analog input changes more than one resolution during the conversion time.  Let dz/dt be the rate of change (max slope) of the ADC input voltage  Let Δ Z be the ADC resolution  Let T c be the ADC conversion time.  A S/H is required if dz/dt. T c > 0.5 Δ Z 43ENG3640 Fall 2012

44 Sample and Hold Circuit: Example  Assume we want to design a system to measure heart sounds, x. The useful range of y (output of microphone) is from -10 to +10mV. The desired resolution Δ Y, is 0.1mV. The maximum dy/dt is 2 V/s. What is the ADC conversion required to eliminate the need for a S/H? Signal Processing ADC Microphone x y Zn I. dy/dt x T c <= 0.5 Δ Y II. T C = (0.5 Δ Y )/(dy/dt) III. T C = (0.5 x V) / 2 V/s = 25 µ seconds. 44ENG3640 Fall 2012

45 Signal Sampling Rate  The rate at which you sample a signal depends on how rapidly the signal is changing.  If you sample a signal too slowly, the information about the signal may be inaccurate.  To get full information about a signal you must sample more than twice the highest frequency in the signal (Nyquist Criteria)  Practical systems typically use a sampling rate of at least four times the highest frequency in the signal. ENG3640 Fall 2012

46 Sampling  A 1,050 Hz signal sampled at 500 Hz looks like a 50 Hz signal. ENG3640 Fall 2012

47 Summary  There are two errors introduced by the sampling process:  Voltage quantization  due to finite word size of ADC  Time quantization  caused by the finite discrete sampling interval  Use a binary weighted DAC when resolution required is small, else use a ladder type DAC  A sample and hold circuit should be used when signal is changing fast for ADC or if you want to avoid glitch problems in DAC.  Flash ADC are fastest but expensive (use only if speed is of importance).  A successive approximation based ADC is suitable for most applications. ENG3640 Fall 2012

48ENG3640 Fall 2012

49 Successive Approximation A/D  Is based on intelligent trial-and-error method  Requires N clock periods for N-bit converter. ENG3640 Fall 2012

50 I  V & V  I I in R V out = -I in.R V in RLRL I out = V in /R 1 R1R1 ENG3640 Fall 2012