LM335Z temp sensor

dadx4

New Member
I've ordered my DS18B20 but in the meantime I picked up a LM335Z which was available locally. I have no experience w/ READADC/READADC10 or this temp sensor.

1. Is it wired correctly?


GND --------|\
| \
+5v --[10k]--| ) LM335Z Temp Sensor
| | /
| NC-|/ 10mv/degKelvin
|
08M Input 1 (leg 6)


2. Proper math to convert READACD10 value to deg F?

Any help is much appreciated.

-DADx4
 

Michael 2727

Senior Member
I use this for the DS18B20 in part of my code.



readtemp 4, b1
let b1 = b1 * 9 / 5 + 32
if b1 <127 then goto '(somewhere)
' If not somewhere it goes here.
somewherelse:
let b1=b1-128
' the -128 is if the Temp goes below Zero.
 

Michael 2727

Senior Member
You can't get a º F reading below zero using this.
Also not every º F increment will be available
as it is derived from Deg C.

Edited by - Michael 2727 on 1/16/2006 4:35:25 AM
 

nbw

Senior Member
You could do some simple circuitry to shave say 273K off the 335's output, so that you're essentially starting from zero. Can't remember exactly how they work. The preference would be to do some simple maths at the software end of course.

In any event, you're going to have to convert that 10mV/K in a useful voltage for the PAX - 0-5V, with 1024 steps in 10-bit ADC mode. What I did with my LM35 (Celsius sensor) was to amplify the voltage output x10, because I only needed a small range. At 10mV/deg C, the new output becomes 100mV/deg C when amplified. Because I wasn't using a rail-to-rail op-amp, the max voltage it would put out was 3.6V, or the equiv of 36deg C. Perfect for me. Even if the temp got to 50 deg C, the op-amp would still only allow 3.6V into the PAX. Minimum is still 0 deg C. What this means is that I get to use much more of the 1024 step range offered by the 10-bit ADC.

Be aware that if you LM sensor is a fair distance away from the op-amp / PAX, you may need to R-C dampen the circuit at the sensor end so you don't get oscillating readings at the PAX. My sensor was 1.5m away - it was hopping around until I quietend it down.
 
Top