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.

How to interpret reading from LM335Z?

Status
Not open for further replies.

aghazi

Junior Member level 2
Joined
Jan 23, 2006
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,551
lm335z

Hi,

I have one LM335Z attached to analog pin RA2 of 16F877A. Using ADCIN, i am getting the value and then displaying it on LCD using DEC. Value I am getting is 149. At this particular moment, the output voltage reading from LM335 is 2.982v. My question is how to interpret the value (149) i am getting from A/D channel? How can i convert it to °C reading? By the way room temperature at this moment is 25°C.

Thanks in advance,

Regards,
AG
 

lm335z circuit

For optimum performance, with use of op-amp, you can align LM335 output range so that it fit to 0-5 volt.

for example you need to measure 0-125 deg centigrad.
make op-amp so that convert 2.73 to 0 volt and 3.98 (2.73+125*10mV/deg) to 5 volts.

Then use this formulla:
temperatue = 125 * (ADC read value)/ (ADC max value)
 

pic lm335z

hmmm. I am new to all this stuff but i do have a 741 opamp. Can you guide me how to attach/use it with lm335? Any schematic?

Thanks
AG
 

using lm335z

it might be easier to take the read value and shift right by 2 bits (div 4).

another way to do this is to make Vref- be 2.73

Added after 4 minutes:

it might be easier to take the read value and shift right by 2 bits (div 4).

another way to do this is to make Vref- be 2.73 and Vref+ be 3.73 and let the uC do the scaling. if super accuracy is not an issue you can use 2 dividers to get those voltages. I'd use 1% resistors.

If you wanted a wider range, you can make the range -50C to 150C (2.23 to 4.23), divide by 2 and then subtract 50.
 

lm335z

Quote from : **broken link removed**

The blue pot adjusts the reference voltage for the PIC's ADC. It must be 2.560V or else the ADC will not have the proper step size. A word about that- the PIC has 1024 steps on its ADC, and the ref is 2.56V so each step of the ADC is 2.56/1024 or 2.5mV. The LM335 temp sensors change 10mV per degree Celcius. These devices read out in kelvin, which at room temp is around 2.8V or so... too high for the PIC's ADC at 2.56V ref. I used the 12.K resistors to divide the output of the LM335's by 2 so that each degree is 5mV... exactly 2x what the PIC's ADC step size is. This means that for each step on the ADC, the temp has to change exactly .5 degrees C. So this means my ADC will now read out directly in degrees C. :) I don't have to do a messy conversion in software.

And the schematics :

**broken link removed**

Take care of ADCON1 register (address 9Fh) settings of PCFG3-PCFG0 A/D port configuration control bits of PIC16F877A.
The anode of LM336 must be tied to pin RA3 (VREF+)
The common point of the two equal resistors 12k7 is tied to whatever analog input of PIC you choose.

The 12k7 value it's not important. It's a must to find two 1% matching resistors.

I believe that worth spending some money for LM336.
Just because:
- you don't have to do a messy conversion in software
- you don't have to use dividers for 2.73v and 3,73v by using 1% resistors of different values
- a minimum temperature drift because you'll not use +5v power supply as reference for VREF+ or to get 2.73v and 3.73v

However if you like to play with op-amp in Circuit Cellar issue 25 of february/march 1992 Mark Nurczyk shares from his experience.
You can find the article in bellow attachement:
 

lm335z howto

i have find the solution for negative temperature with Lm335

temp_ulei = (adc_ulei * 0.48828) - 273.15;

this is the formula....
 

thankssss mr.silvio

---------- Post added at 23:48 ---------- Previous post was at 23:47 ----------

thanks mr. soulraven
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top