Department of Computer Science and Information EngineeringNational Cheng Kung University
25
INTERFACING TO ADC AND SENSORSSignal Conditioning and Interfacing LM35 HANEL
Signal conditioning
is a widely used
term in the world of data acquisition¾It is the conversion of the signals (voltage, current, charge, capacitance, and resistance) produced by transducers to voltage, which is sent to the input of an A-to-D converterSignal conditioning can be a current-to-voltage conversion or a signal amplification¾The thermistor changes resistance with temperature, while the change of resistance must be translated into voltage in order to be of any use to an ADC
Department of Computer Science and Information EngineeringNational Cheng Kung University
26
INTERFACING TO ADC AND SENSORSSignal Conditioning and Interfacing LM35(cont’) HANEL
Getting Data From the Analog WorldAnalog world (temperature,
pressure, etc. )TransducerSignal conditioningADC Microcontroller
Department of Computer Science and Information EngineeringNational Cheng Kung University
27
Example:Look at the case of connecting an LM35 to an ADC804. Since the INTERFACING ADC804 has 8-bit resolution with a maximum of 256 steps and the TO ADC AND LM35 (or LM34) produces 10 mV for every degree of temperature SENSORSchange, we can condition Vin of the ADC804 to produce a Vout of 2560 mV full-scale output. Therefore, in order to produce the full-scale Vout of 2.56 V for the ADC804, We need to set Vref/2 = 1.28. Signal This makes Vout of the ADC804 correspond directly to the Conditioning temperature as monitored by the LM35. and Interfacing LM35(cont’) HANEL
0001 1110
300
30
0000 1010
100
10
0000 0011
30
3
0000 0010
20
2
0000 0001
10
1
0000 0000
0
0
Vout (D7 – D0)
Vin (mV)
Temperature vs. VTemp. (C)
outof the ADC804
Department of Computer Science and Information EngineeringNational Cheng Kung University
28
8051 Connection to ADC804 and Temperature SensorINTERFACING TO ADC AND SENSORSSignal Conditioning and Interfacing LM35(cont’) HANEL
5V CLK inCLK RVin (+)Vin (-)10k
VCCRDP2.5P2.6WRD0P1.0D1D2D3A GNDD4D5D6V/2refP1.7D7CSINTRGNDP2.7
XTAL1XTAL2
QD Q DQ Q
8051
ADC804
74LS74
LM35 orLM342.5k LM336
Set to 1.28 V
Notice that we use the LM336-2.5 zener diode to fix the voltage across the 10K pot at 2.5 volts. The use of the LM336-2.5 should overcome any fluctuations in the power supply