LTC1298 reading LM35
Archiver
Posts: 46,084
Hi,
I'm making progress now with my datalogger (*THNKS ALL, see BS2-USB
message).
But now i'm walking to someting strange!!
If i measure voltage on my Vout of the LM35CZ (Yes, i'm from Holland
so it is in Celcius)i take a reading from 0,2445V let's say 245mV.
If i take a ADC reading with y LTC1298 (single ended channel 1) a get
a readout from 190!! I now i miss someting but, can anyone explane it
to me..
De voltage to the LTC1298 and the LM35 are 5,002V reference voltage.
Thnks in advance
Willem
I'm making progress now with my datalogger (*THNKS ALL, see BS2-USB
message).
But now i'm walking to someting strange!!
If i measure voltage on my Vout of the LM35CZ (Yes, i'm from Holland
so it is in Celcius)i take a reading from 0,2445V let's say 245mV.
If i take a ADC reading with y LTC1298 (single ended channel 1) a get
a readout from 190!! I now i miss someting but, can anyone explane it
to me..
De voltage to the LTC1298 and the LM35 are 5,002V reference voltage.
Thnks in advance
Willem
Comments
That sounds about right. The ADC will not output millivolts in. The number
it generates is in relation to the reference voltage you give it. It can be
a pain to calibrate if the LM** isn't in a waterproof package, as raising
air temp with any accuracy is hard. So, use a multiple turn pot instead. As
the LM** outputs 10mV per degree, use the pot to feed a voltage of .3445V
and read the ADC. Take the result and subtract the 190 from it. You now know
what one degree equals on the ADC and can have the Stamp do the math and
turn it back into degrees.
A 5V reference won't make for a very accurate measurement. If you are
measuring normal air temps, I would recommend getting a 1.5V precision
regulator or a zener diode, depending on the resolution you want. This would
make your max temp that you can read 150 degrees.
One last thing, the LM35z is the least accurate. If you want to make sure of
precise output, check the LM35z versus a good thermometer.
Hope this helps,
Jonathan
www.madlabs.info
Original Message
From: "wrep" <basic@P...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, May 16, 2003 6:29 AM
Subject: [noparse][[/noparse]basicstamps] LTC1298 reading LM35
> Hi,
>
> I'm making progress now with my datalogger (*THNKS ALL, see BS2-USB
> message).
>
> But now i'm walking to someting strange!!
>
> If i measure voltage on my Vout of the LM35CZ (Yes, i'm from Holland
> so it is in Celcius)i take a reading from 0,2445V let's say 245mV.
> If i take a ADC reading with y LTC1298 (single ended channel 1) a get
> a readout from 190!! I now i miss someting but, can anyone explane it
> to me..
>
> De voltage to the LTC1298 and the LM35 are 5,002V reference voltage.
>
> Thnks in advance
>
> Willem
>
>
>
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>message).
>But now i'm walking to someting strange!!
>If i measure voltage on my Vout of the LM35CZ (Yes, i'm from Holland
>so it is in Celcius)i take a reading from 0,2445V let's say 245mV.
>If i take a ADC reading with y LTC1298 (single ended channel 1) a get
>a readout from 190!! I now i miss someting but, can anyone explane it
>to me..
>De voltage to the LTC1298 and the LM35 are 5,002V reference voltage.
>Thnks in advance
>Willem
Hi Willem.
The LTC1298 is almost right. The reading should be:
245/5002 * 4096 = 200
The output count would be directly in millivolts only if you use a
4.096 volt reference, because it is a 12 bit converter with 4096
counts. With a 5.002 volt reference, you get
5002/4096 = 1.2212 millivolts per bit.
To convert the reading you are getting back into millivolts, you
have to multiply times 1.2212, and on the Stamp you do that like this:
millivolts = reading ** 14496 + reading
The ** 14496 gives a good approximation to .2212 (14496/65536).
The reading of 190 when the input is 245 is still too low, though.
Check the power supply for good bypassing and a good ground
connection.
-- regards,
Tracy Allen
electronically monitored ecosystems
mailto:tracy@e...
http://www.emesystems.com
Thanks for your reaction. But a answer give more question's. So..
1.)Why feed the ADC with 0.3445V?
2.)You say to use a voltage reference of 1,5V to get a max. output
for 150 degrees (10mV/Grade) but is the output depending on the
reference voltage? i tought the output is 10mV/degree UNdepending of
the reference! it could be that the LM35CZ give's a 10mV/degree full
span? i think i'm lost now help!!
By the way I do have a stable signal (bypassing the power supply and
i'm only 1 digit wrong, THANKS TRACY as well!!)
willem
--- In basicstamps@yahoogroups.com, "Jonathan Peakall"
<jpeakall@m...> wrote:
> Willem,
>
> That sounds about right. The ADC will not output millivolts in. The
number
> it generates is in relation to the reference voltage you give it.
It can be
> a pain to calibrate if the LM** isn't in a waterproof package, as
raising
> air temp with any accuracy is hard. So, use a multiple turn pot
instead. As
> the LM** outputs 10mV per degree, use the pot to feed a voltage
of .3445V
> and read the ADC. Take the result and subtract the 190 from it. You
now know
> what one degree equals on the ADC and can have the Stamp do the
math and
> turn it back into degrees.
>
> A 5V reference won't make for a very accurate measurement. If you
are
> measuring normal air temps, I would recommend getting a 1.5V
precision
> regulator or a zener diode, depending on the resolution you want.
This would
> make your max temp that you can read 150 degrees.
>
> One last thing, the LM35z is the least accurate. If you want to
make sure of
> precise output, check the LM35z versus a good thermometer.
>
> Hope this helps,
>
> Jonathan
> www.madlabs.info
>
>
Original Message
> From: "wrep" <basic@P...>
> To: <basicstamps@yahoogroups.com>
> Sent: Friday, May 16, 2003 6:29 AM
> Subject: [noparse][[/noparse]basicstamps] LTC1298 reading LM35
>
>
> > Hi,
> >
> > I'm making progress now with my datalogger (*THNKS ALL, see BS2-
USB
> > message).
> >
> > But now i'm walking to someting strange!!
> >
> > If i measure voltage on my Vout of the LM35CZ (Yes, i'm from
Holland
> > so it is in Celcius)i take a reading from 0,2445V let's say 245mV.
> > If i take a ADC reading with y LTC1298 (single ended channel 1) a
get
> > a readout from 190!! I now i miss someting but, can anyone
explane it
> > to me..
> >
> > De voltage to the LTC1298 and the LM35 are 5,002V reference
voltage.
> >
> > Thnks in advance
> >
> > Willem
> >
> >
> >
> >
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the
Subject and
> Body of the message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
> >
> >
Sorry if I made it all more confusing. I'll see if I can make it more clear
or if I make it worse ;-0
I'll answer question 2 first:
2) I assume you are reading air temps or something else that is in the range
of less than 150 degrees C. If this is true, using a reference voltage of
1.5V will give you better accuracy than a reference of 5V.
The way the ADC works is it compares the sensor input voltage against the
reference voltage and produces an number between 0 and 4096 based on the
difference. So, with a 5V reference, as Tracy pointed out, you get about
1.2mV per bit. With a 1.5V reference, you get .366mV per bit, which is more
accurate. So, with a 5V reference, each degree = 8.33 on the ADC, and with a
1.5V reference, each degree = 27.32 on the ADC.
The reason it limits your sensor to 150 Degrees this way is that at 150
degrees the sensor will output 150mV, which is the same as the reference
voltage. At this or any higher temperature, all the ADC will return the
maximum value of the ADC, in this case with a 10 bit LTC1298, it would be
4096. A temp of 150 degrees = 4096, and so does 151, 152, 153 etc. It isn't
that it limits the sensor's output, it limits the ADC's output.
So, to get the best resolution of the sensor, you want a reference that is
just above or equal to the highest temperature you want to measure. I said
1.5V because that is an easy value to find in a precision zener diode or
precision voltage regulator to use as the reference voltage.
1) This is about calibration. As you found, real life often doesn't work
perfectly. So, although an input of 245mV *should* give you a result of 200
from the ADC. But you got 190, an error of 10. So if you feed the ADC
255mV, and get the result from the ADC, you can check the error to get a
factor to use in correcting the results.
Using a pot as I suggested, you can check the error along the whole range of
temps you want to read, average the error, and use that to correct your
readings.While the ADC will probably be consistent, this allows you to make
sure. Sounds like you have this straightened out, a error of 1 on the ADC
isn't anything to worry about.
Hope this didn't make it worse. If it does, let's get Tracy to explain in
;-)
Jonathan
www.madlabs.info
Original Message
From: "wrep" <basic@P...>
To: <basicstamps@yahoogroups.com>
Sent: Wednesday, May 21, 2003 1:23 AM
Subject: [noparse][[/noparse]basicstamps] Re: LTC1298 reading LM35
> Hi Jonathan
>
> Thanks for your reaction. But a answer give more question's. So..
>
> 1.)Why feed the ADC with 0.3445V?
> 2.)You say to use a voltage reference of 1,5V to get a max. output
> for 150 degrees (10mV/Grade) but is the output depending on the
> reference voltage? i tought the output is 10mV/degree UNdepending of
> the reference! it could be that the LM35CZ give's a 10mV/degree full
> span? i think i'm lost now help!!
>
> By the way I do have a stable signal (bypassing the power supply and
> i'm only 1 digit wrong, THANKS TRACY as well!!)
>
> willem
>
> --- In basicstamps@yahoogroups.com, "Jonathan Peakall"
> <jpeakall@m...> wrote:
> > Willem,
> >
> > That sounds about right. The ADC will not output millivolts in. The
> number
> > it generates is in relation to the reference voltage you give it.
> It can be
> > a pain to calibrate if the LM** isn't in a waterproof package, as
> raising
> > air temp with any accuracy is hard. So, use a multiple turn pot
> instead. As
> > the LM** outputs 10mV per degree, use the pot to feed a voltage
> of .3445V
> > and read the ADC. Take the result and subtract the 190 from it. You
> now know
> > what one degree equals on the ADC and can have the Stamp do the
> math and
> > turn it back into degrees.
> >
> > A 5V reference won't make for a very accurate measurement. If you
> are
> > measuring normal air temps, I would recommend getting a 1.5V
> precision
> > regulator or a zener diode, depending on the resolution you want.
> This would
> > make your max temp that you can read 150 degrees.
> >
> > One last thing, the LM35z is the least accurate. If you want to
> make sure of
> > precise output, check the LM35z versus a good thermometer.
> >
> > Hope this helps,
> >
> > Jonathan
> > www.madlabs.info
> >
> >
Original Message
> > From: "wrep" <basic@P...>
> > To: <basicstamps@yahoogroups.com>
> > Sent: Friday, May 16, 2003 6:29 AM
> > Subject: [noparse][[/noparse]basicstamps] LTC1298 reading LM35
> >
> >
> > > Hi,
> > >
> > > I'm making progress now with my datalogger (*THNKS ALL, see BS2-
> USB
> > > message).
> > >
> > > But now i'm walking to someting strange!!
> > >
> > > If i measure voltage on my Vout of the LM35CZ (Yes, i'm from
> Holland
> > > so it is in Celcius)i take a reading from 0,2445V let's say 245mV.
> > > If i take a ADC reading with y LTC1298 (single ended channel 1) a
> get
> > > a readout from 190!! I now i miss someting but, can anyone
> explane it
> > > to me..
> > >
> > > De voltage to the LTC1298 and the LM35 are 5,002V reference
> voltage.
> > >
> > > Thnks in advance
> > >
> > > Willem
> > >
> > >
> > >
> > >
> > >
> > >
> > > To UNSUBSCRIBE, just send mail to:
> > > basicstamps-unsubscribe@yahoogroups.com
> > > from the same email address that you subscribed. Text in the
> Subject and
> > Body of the message will be ignored.
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
> > >
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>