Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

interface of lm35 to avr

Status
Not open for further replies.

mshh

Full Member level 6
Full Member level 6
Joined
May 30, 2010
Messages
349
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Location
usa
Activity points
3,871
I have problem with lm35 interface with atmega8. the temperature result is displayed on lcd and oscillates and it is n't constant i think it needs capacitor of Rc circuit. what is the best design.
 

Even for a body of mass as small as this sensor, the temperature variation should not be so substantial, although you did not specify how much. Depending on the distance where the sensor is to the A/D converter, or if no shielding were provided with the wiring, it is likelly getting noise, and for this reason a small vapacitor on its output would help to diminish the floating at its measured value.
 

i connected capacitor of different values at output but it didn't diminish. oscillation range .1-0.8 degree.
 

i connected capacitor of different values at output but it didn't diminish. oscillation range .1-0.8 degree.

Such oscillation does not seem as significant depending on what is being measured and how, as well as the time interval between samples. Is the sensor inside a probe, or is it exposed to the environment being monitored? Is this probe submerged in a liquid, or simply exposed to air? Is the sensor mounted onboard, or is it wired? Is this wire shielded? What is the distance between the sensor and the board input?
 

the sensor is connected directly to pcb board. it is mounted on air.I need high precision. 0.8 is significant to me.
 

it is mounted on air.I need high precision. 0.8 is significant to me.

You have not said what is the time interval between measurements, what if performing a moving average of the last values read? This has the same effect of an external capacitor, but now implemented via firmware, namely, as a low-pass digital filter, something like that (not tested):

Code:
int16 GetAverage ( int16 NewSample )
   {  
   NewValue = NewSample;
   Average = ( NewValue + Average - LastValue )/8;
   LastValue = NewValue;
   return ( Average );
   }

Anyway, without knowing the time interval of these samples, it is difficult to know if this solution is appropriate.
 

Hi,

You need to post your complete circuit, with power supply.
And your code...with some documentation in it.

What is your ADC reference voltage?

There are so many possible sources of noise..

Klaus
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top