was: Re: Tracy, math question: LM34s
Archiver
Posts: 46,084
Tracy,
Well, I have 2 LM34s. I tried them side by side on a breadboard, and they
read 30mV or more different. I am using a known to be reliable VOM. At one
time I stuck one (in a brass housing) into boiling and ice water, and it was
"reasonably" close, like 12.5mV/degree. I don't know how much cable length
(I have 50' on the current sensor) affects things, but there is a 100mV
difference between one with 50" of cable and one with 15'. The ADC is
mounted on a BOE, no cable at all except jumpers to the BS2SX. The sensor is
grounded to the brass tube it is in. The cable is 2 wires with a ground
around it type. What could be wrong with the wiring? The sensor itself is
hooked up correctly, or it wouldn't work.
And the ADC at least is affected by how much input voltage I give the LM34.
If I go above around 2v in, the ADC varies *wildly*, although the output of
the LM34 seems stable. I have it on a voltage divider from a 5V supply.
Perhaps it is the current that needs limiting? Self heating of the sensor?
Any good places to ask questions like this?
All that aside, once I figure out the actual mV/degree, how do I do the
Stamp Math to yield degrees?
Tracy, thanks a lot. I hope Parallax realizes that the main reason to use
Stamps is this forum.
Jonathan
Original Message
From: "Tracy Allen" <tracy@e...>
To: <basicstamps@yahoogroups.com>
Sent: Thursday, November 21, 2002 8:36 PM
Subject: Re: [noparse][[/noparse]basicstamps] Tracy, math question
> >I just changed the supply voltage to the LM34, which changed my output.
The
> >ADC now reads 715 at 104 degrees. Still using a 5.0 supply to the ADC.
Since
> >I may have to change power supplies again, and I expect that the added
wire
> >length to the sensor when it is actually installed is also going to
change
> >the output, how does someone as math challenged as I am recalibrate this
> >system? Aside from bothering you ;-)
> >
> >Also, I find the LM34 doesn't really do 10mV/degree as advertised. I am
> >going to test it to establish what it really does.
>
> Hi Jonathan,
>
> Changing the power supply should _not_ affect the signal voltage.
> LM34 output should be 10 millivolts per deg. F,, so long as the power
> supply is anywhere within the allowed range. If not, something is
> wrong with the wiring.
>
> I have been using LM34 for years, and have always found them to be
> very close to spec. Even on a 100 foot cable, the error due to
> ground loop current is less than 0.1 degree F, because the supply
> current is only 70 microamps. Are you checking it with a voltmeter?
> Look for a bad ground connection. Also, the output signal can
> oscillate wildly if the chip has to drive a cable in the range of
> inches to feet. That will make the readings appear whacko. You can
> isolate the chip from the cable with a 3kohm resistor or with an RC
> snubber.
>
> regards,
> -- Tracy
>
>
> >
> >Thanks again,
> >
> >Jonathan
> >
> >
> >
Original Message
> >From: "Tracy Allen" <tracy@e...>
> >To: <basicstamps@yahoogroups.com>
> >Sent: Thursday, November 21, 2002 9:10 AM
> >Subject: Re: [noparse][[/noparse]basicstamps] Tracy, math question
> >
> >
> > > >Hi Tracy, All,
> > > >
> > > >I am making a hot tub controller, using an LM34 sensor, a LTC1298 ADC
and
> >a
> > > >B2sx. I need help (as usual!) with the math. I want to be able to
display
> > > >the temp on an LCD, so I need to convert the ADC output to degrees.
How
> >do I
> > > >do this using "stamp math"?
> > > >
> > > >Let's say my tub is at 78 degrees, input is 0.788mV. So the ADC
yields
> > > >.788/5.0*4095= 645. How can I convert this?
> > > >
> > > >Thanks!
> > > >
> > > >Jonathan
> > >
> > > ADCresult=645
> > > degF = ADCresult */ 313
> > > debug "degrees F = ", dec degF/10,".".dec1 degF
> > > ' displays 78.8
> > >
> > > OR, for a little better precision in the 1/10ths digit:
> > >
> > > ADCresult=645
> > > degF = ADCresult */ 3125 + 5 / 10 ' with roundoff
> > > debug "degrees F = ", dec degF/10,".".dec1 degF
> > > ' displays 78.7
> > >
> > > OR, another way, using ** instead of */
> > >
> > > ADCresult=645
> > > degF = ADCresult ** 14464 +ADCresult
> > > debug "degrees F = ", dec degF/10,".".dec1 degF
> > > ' displays 78.7
> > >
> > > The factors to use in */ come from the ratio, 5000/4096=1.2207.
> > > You multiply that times 256 to get, 1.2207*256 = 312.5. That is the
> > > factor. Notice that 3125/2560 = 5000/4096, they are the same ratio.
> > > The Stamp */ command automatically does the division by 256.
> > >
> > > -- Tracy
> > >
> > >
> > > 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/
>
>
> 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/
>
>
>
Well, I have 2 LM34s. I tried them side by side on a breadboard, and they
read 30mV or more different. I am using a known to be reliable VOM. At one
time I stuck one (in a brass housing) into boiling and ice water, and it was
"reasonably" close, like 12.5mV/degree. I don't know how much cable length
(I have 50' on the current sensor) affects things, but there is a 100mV
difference between one with 50" of cable and one with 15'. The ADC is
mounted on a BOE, no cable at all except jumpers to the BS2SX. The sensor is
grounded to the brass tube it is in. The cable is 2 wires with a ground
around it type. What could be wrong with the wiring? The sensor itself is
hooked up correctly, or it wouldn't work.
And the ADC at least is affected by how much input voltage I give the LM34.
If I go above around 2v in, the ADC varies *wildly*, although the output of
the LM34 seems stable. I have it on a voltage divider from a 5V supply.
Perhaps it is the current that needs limiting? Self heating of the sensor?
Any good places to ask questions like this?
All that aside, once I figure out the actual mV/degree, how do I do the
Stamp Math to yield degrees?
Tracy, thanks a lot. I hope Parallax realizes that the main reason to use
Stamps is this forum.
Jonathan
Original Message
From: "Tracy Allen" <tracy@e...>
To: <basicstamps@yahoogroups.com>
Sent: Thursday, November 21, 2002 8:36 PM
Subject: Re: [noparse][[/noparse]basicstamps] Tracy, math question
> >I just changed the supply voltage to the LM34, which changed my output.
The
> >ADC now reads 715 at 104 degrees. Still using a 5.0 supply to the ADC.
Since
> >I may have to change power supplies again, and I expect that the added
wire
> >length to the sensor when it is actually installed is also going to
change
> >the output, how does someone as math challenged as I am recalibrate this
> >system? Aside from bothering you ;-)
> >
> >Also, I find the LM34 doesn't really do 10mV/degree as advertised. I am
> >going to test it to establish what it really does.
>
> Hi Jonathan,
>
> Changing the power supply should _not_ affect the signal voltage.
> LM34 output should be 10 millivolts per deg. F,, so long as the power
> supply is anywhere within the allowed range. If not, something is
> wrong with the wiring.
>
> I have been using LM34 for years, and have always found them to be
> very close to spec. Even on a 100 foot cable, the error due to
> ground loop current is less than 0.1 degree F, because the supply
> current is only 70 microamps. Are you checking it with a voltmeter?
> Look for a bad ground connection. Also, the output signal can
> oscillate wildly if the chip has to drive a cable in the range of
> inches to feet. That will make the readings appear whacko. You can
> isolate the chip from the cable with a 3kohm resistor or with an RC
> snubber.
>
> regards,
> -- Tracy
>
>
> >
> >Thanks again,
> >
> >Jonathan
> >
> >
> >
Original Message
> >From: "Tracy Allen" <tracy@e...>
> >To: <basicstamps@yahoogroups.com>
> >Sent: Thursday, November 21, 2002 9:10 AM
> >Subject: Re: [noparse][[/noparse]basicstamps] Tracy, math question
> >
> >
> > > >Hi Tracy, All,
> > > >
> > > >I am making a hot tub controller, using an LM34 sensor, a LTC1298 ADC
and
> >a
> > > >B2sx. I need help (as usual!) with the math. I want to be able to
display
> > > >the temp on an LCD, so I need to convert the ADC output to degrees.
How
> >do I
> > > >do this using "stamp math"?
> > > >
> > > >Let's say my tub is at 78 degrees, input is 0.788mV. So the ADC
yields
> > > >.788/5.0*4095= 645. How can I convert this?
> > > >
> > > >Thanks!
> > > >
> > > >Jonathan
> > >
> > > ADCresult=645
> > > degF = ADCresult */ 313
> > > debug "degrees F = ", dec degF/10,".".dec1 degF
> > > ' displays 78.8
> > >
> > > OR, for a little better precision in the 1/10ths digit:
> > >
> > > ADCresult=645
> > > degF = ADCresult */ 3125 + 5 / 10 ' with roundoff
> > > debug "degrees F = ", dec degF/10,".".dec1 degF
> > > ' displays 78.7
> > >
> > > OR, another way, using ** instead of */
> > >
> > > ADCresult=645
> > > degF = ADCresult ** 14464 +ADCresult
> > > debug "degrees F = ", dec degF/10,".".dec1 degF
> > > ' displays 78.7
> > >
> > > The factors to use in */ come from the ratio, 5000/4096=1.2207.
> > > You multiply that times 256 to get, 1.2207*256 = 312.5. That is the
> > > factor. Notice that 3125/2560 = 5000/4096, they are the same ratio.
> > > The Stamp */ command automatically does the division by 256.
> > >
> > > -- Tracy
> > >
> > >
> > > 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/
>
>
> 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/
>
>
>
Comments
>
>Well, I have 2 LM34s. I tried them side by side on a breadboard, and they
>read 30mV or more different.
What grade of part are these? The LM34CAH or LM34CAZ are the highest
accuracy grade ($$) and are tested to be within +/- 1 degree of the
true temperature. So it could happen by chance that you get two of
those that are as much as 20 millivolts apart, but still within spec.
The lesser grades are tested and guaranteed only to within +/- 2 'F,
or the LM34DZ to within +/- 3 'F. So if you are using LM34DZ, you
could get two that are within spec and still be 60 millivolts apart.
Another possibility is that the output of one of them is oscillating.
>I am using a known to be reliable VOM.
Also check the output on AC volts. If it is oscillating, you will see that.
>At one
>time I stuck one (in a brass housing) into boiling and ice water, and it was
>"reasonably" close, like 12.5mV/degree.
Insulated?
>I don't know how much cable length
>(I have 50' on the current sensor) affects things, but there is a 100mV
>difference between one with 50" of cable and one with 15'.
Test with the AC voltmeter. On my web site I have examples of how
to put an LM34 on a cable without causing oscillations.
>The ADC is
>mounted on a BOE, no cable at all except jumpers to the BS2SX. The sensor is
>grounded to the brass tube it is in.
That must mean you have an LM34H, LM34CH or LM34CAH.
>The cable is 2 wires with a ground
>around it type. What could be wrong with the wiring? The sensor itself is
>hooked up correctly, or it wouldn't work.
Do you have a resistor in series between the output leg of the sensor
and the cable, or an RC snubber? If not, it _will_ oscillate.
>
>And the ADC at least is affected by how much input voltage I give the LM34.
>If I go above around 2v in, the ADC varies *wildly*, although the output of
>the LM34 seems stable. I have it on a voltage divider from a 5V supply.
>Perhaps it is the current that needs limiting? Self heating of the sensor?
>Any good places to ask questions like this?
The LM34 requires a 5 volt power supply at least. (5 to 30 volts)
>
>All that aside, once I figure out the actual mV/degree, how do I do the
>Stamp Math to yield degrees?
It should be very close to 10mV per degree. The highest grade will
be between 9.9 and 10.1, but it is usually in my experience within
+/- 0.01 of 10.0. Even the lowest grade, (LM34DZ) specs a design
limit of 10.0 +/- 0.2 degrees F. If you are seeing something much
different, something is wrong. Or you have bad chips.
>
>Tracy, thanks a lot. I hope Parallax realizes that the main reason to use
>Stamps is this forum.
>
>Jonathan
>
>
>
>
>
Original Message
>From: "Tracy Allen" <tracy@e...>
>To: <basicstamps@yahoogroups.com>
>Sent: Thursday, November 21, 2002 8:36 PM
>Subject: Re: [noparse][[/noparse]basicstamps] Tracy, math question
>
>
>> >I just changed the supply voltage to the LM34, which changed my output.
>The
>> >ADC now reads 715 at 104 degrees. Still using a 5.0 supply to the ADC.
>Since
>> >I may have to change power supplies again, and I expect that the added
>wire
>> >length to the sensor when it is actually installed is also going to
>change
>> >the output, how does someone as math challenged as I am recalibrate this
>> >system? Aside from bothering you ;-)
>> >
>> >Also, I find the LM34 doesn't really do 10mV/degree as advertised. I am
>> >going to test it to establish what it really does.
>>
>> Hi Jonathan,
>>
>> Changing the power supply should _not_ affect the signal voltage.
>> LM34 output should be 10 millivolts per deg. F,, so long as the power
>> supply is anywhere within the allowed range. If not, something is
>> wrong with the wiring.
>>
>> I have been using LM34 for years, and have always found them to be
>> very close to spec. Even on a 100 foot cable, the error due to
>> ground loop current is less than 0.1 degree F, because the supply
>> current is only 70 microamps. Are you checking it with a voltmeter?
>> Look for a bad ground connection. Also, the output signal can
> > oscillate wildly if the chip has to drive a cable in the range of
>> inches to feet. That will make the readings appear whacko. You can
>> isolate the chip from the cable with a 3kohm resistor or with an RC
>> snubber.
>>
>> regards,
>> -- Tracy
>>
>>
>> >
>> >Thanks again,
>> >
>> >Jonathan
>> >
>> >
>> >
Original Message
>> >From: "Tracy Allen" <tracy@e...>
>> >To: <basicstamps@yahoogroups.com>
>> >Sent: Thursday, November 21, 2002 9:10 AM
>> >Subject: Re: [noparse][[/noparse]basicstamps] Tracy, math question
>> >
>> >
>> > > >Hi Tracy, All,
>> > > >
>> > > >I am making a hot tub controller, using an LM34 sensor, a LTC1298 ADC
>and
>> >a
>> > > >B2sx. I need help (as usual!) with the math. I want to be able to
>display
>> > > >the temp on an LCD, so I need to convert the ADC output to degrees.
>How
>> >do I
>> > > >do this using "stamp math"?
>> > > >
>> > > >Let's say my tub is at 78 degrees, input is 0.788mV. So the ADC
>yields
>> > > >.788/5.0*4095= 645. How can I convert this?
>> > > >
>> > > >Thanks!
>> > > >
>> > > >Jonathan
>> > >
>> > > ADCresult=645
>> > > degF = ADCresult */ 313
>> > > debug "degrees F = ", dec degF/10,".".dec1 degF
>> > > ' displays 78.8
>> > >
>> > > OR, for a little better precision in the 1/10ths digit:
>> > >
>> > > ADCresult=645
>> > > degF = ADCresult */ 3125 + 5 / 10 ' with roundoff
>> > > debug "degrees F = ", dec degF/10,".".dec1 degF
>> > > ' displays 78.7
>> > >
>> > > OR, another way, using ** instead of */
>> > >
>> > > ADCresult=645
>> > > degF = ADCresult ** 14464 +ADCresult
>> > > debug "degrees F = ", dec degF/10,".".dec1 degF
>> > > ' displays 78.7
>> > >
>> > > The factors to use in */ come from the ratio, 5000/4096=1.2207.
>> > > You multiply that times 256 to get, 1.2207*256 = 312.5. That is the
>> > > factor. Notice that 3125/2560 = 5000/4096, they are the same ratio.
>> > > The Stamp */ command automatically does the division by 256.
>> > >
>> > > -- Tracy
> > > >
You are a veritable font. I have now checked, and I do have the LM34DZs,
although the ad in all electonics says within +-1 degree, not +-2. So i
guess I need some LM34AZs.
>
> What grade of part are these? The LM34CAH or LM34CAZ are the highest
> accuracy grade ($$) and are tested to be within +/- 1 degree of the
> true temperature. So it could happen by chance that you get two of
> those that are as much as 20 millivolts apart, but still within spec.
> The lesser grades are tested and guaranteed only to within +/- 2 'F,
> or the LM34DZ to within +/- 3 'F. So if you are using LM34DZ, you
> could get two that are within spec and still be 60 millivolts apart.
>
No. Just in a sealed brass tube.
> >At one
> >time I stuck one (in a brass housing) into boiling and ice water, and it
was
> >"reasonably" close, like 12.5mV/degree.
>
> Insulated?
>
I will look at this.
> Test with the AC voltmeter. On my web site I have examples of how
> to put an LM34 on a cable without causing oscillations.
>
No, I don't. I bet this is why I can't run the LM34 on a full 5V. I take it
you mean in series with one end to the ADC input and the other to the LM34
output. I'll take a look on your site for a value, or try some [noparse];)[/noparse]
>
> >The cable is 2 wires with a ground
> >around it type. What could be wrong with the wiring? The sensor itself is
> >hooked up correctly, or it wouldn't work.
>
> Do you have a resistor in series between the output leg of the sensor
> and the cable, or an RC snubber? If not, it _will_ oscillate.
>
It's operating on 2.2V right now. While it's ouput dosen't change if I
increase the voltage, the ADC begins to read wildly. I bet it's oscillating,
as you mentioned above.
> >
> >And the ADC at least is affected by how much input voltage I give the
LM34.
> >If I go above around 2v in, the ADC varies *wildly*, although the output
of
> >the LM34 seems stable. I have it on a voltage divider from a 5V supply.
> >Perhaps it is the current that needs limiting? Self heating of the
sensor?
> >Any good places to ask questions like this?
>
> The LM34 requires a 5 volt power supply at least. (5 to 30 volts)
>
> >
Ok, so the LM34 I am using in the tub seems to be reading 7.9mV/degree, but
I am going to get a better grade. So, back to the very original question ;-)
how to convert this all to dgrees, with me being able to calibrate it with
whatever sensor.
Again and again THANKS TRACY!
Jonathan
of each other. The error is linear, if I correct for deviation in an ice
bath then they all stay within 0.1F of each other up through 90F.
I've just finished learning how to get my 12bit ADC from wildly swinging
readings to nearly rock steady (+-0.02F).
First rule - The power and ground traces to your LM34s and ADC ref+ and ref-
*MUST* go directly back to the regulator with *no* digital parts hooked to
them. Power all other chips, lcds etc with a seperate trace.
Use a reference diode to narrow your ADC's range. An LM34 is only good for
+5 to +300 F so why give it a +5 reference voltage (500F). Use a reference
diode (1.2ish or 2.5ish) to lower the reference voltage and decrease the
step size of your ADC. Power this diode from your analog power trace, not
the digital power trace. A multiturn pot also works but I find they vary a
bit once set.
Put RC filters on everything in sight. An 82 ohm resistor and 1uF tantalum
capacitor make a good combo. Just plug a resistor into the power line to
each LM34, lead it to the +side of the cap then the negative leg of the cap
to ground. I also used one of the reference diode and the VCC to the ADC.
Things quieted way down for me after taking these steps. They still jump
around by about 0.02F but thats just as likely to be random air currents as
electrical. Either way its so small as to not be a bother.
If you're using an 8 bit dac your jumpiness will be a little bigger. I'm
using a 12 bit so it has smaller increments.
Original Message
From: "Jonathan Peakall" <jpeakall@m...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, November 22, 2002 12:52 PM
Subject: Re: [noparse][[/noparse]basicstamps] was: Re: Tracy, math question: LM34s
> Tracy,
>
> You are a veritable font. I have now checked, and I do have the LM34DZs,
> although the ad in all electonics says within +-1 degree, not +-2. So i
> guess I need some LM34AZs.
>
>
> >
> > What grade of part are these? The LM34CAH or LM34CAZ are the highest
> > accuracy grade ($$) and are tested to be within +/- 1 degree of the
> > true temperature. So it could happen by chance that you get two of
> > those that are as much as 20 millivolts apart, but still within spec.
> > The lesser grades are tested and guaranteed only to within +/- 2 'F,
> > or the LM34DZ to within +/- 3 'F. So if you are using LM34DZ, you
> > could get two that are within spec and still be 60 millivolts apart.
> >
>
> No. Just in a sealed brass tube.
>
> > >At one
> > >time I stuck one (in a brass housing) into boiling and ice water, and
it
> was
> > >"reasonably" close, like 12.5mV/degree.
> >
> > Insulated?
> >
>
> I will look at this.
>
>
> > Test with the AC voltmeter. On my web site I have examples of how
> > to put an LM34 on a cable without causing oscillations.
> >
>
> No, I don't. I bet this is why I can't run the LM34 on a full 5V. I take
it
> you mean in series with one end to the ADC input and the other to the LM34
> output. I'll take a look on your site for a value, or try some [noparse];)[/noparse]
>
>
> >
> > >The cable is 2 wires with a ground
> > >around it type. What could be wrong with the wiring? The sensor itself
is
> > >hooked up correctly, or it wouldn't work.
> >
> > Do you have a resistor in series between the output leg of the sensor
> > and the cable, or an RC snubber? If not, it _will_ oscillate.
> >
>
> It's operating on 2.2V right now. While it's ouput dosen't change if I
> increase the voltage, the ADC begins to read wildly. I bet it's
oscillating,
> as you mentioned above.
>
> > >
> > >And the ADC at least is affected by how much input voltage I give the
> LM34.
> > >If I go above around 2v in, the ADC varies *wildly*, although the
output
> of
> > >the LM34 seems stable. I have it on a voltage divider from a 5V supply.
> > >Perhaps it is the current that needs limiting? Self heating of the
> sensor?
> > >Any good places to ask questions like this?
> >
> > The LM34 requires a 5 volt power supply at least. (5 to 30 volts)
> >
> > >
>
> Ok, so the LM34 I am using in the tub seems to be reading 7.9mV/degree,
but
> I am going to get a better grade. So, back to the very original question
;-)
> how to convert this all to dgrees, with me being able to calibrate it with
> whatever sensor.
>
> Again and again THANKS TRACY!
>
>
> Jonathan
>
>
> 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/
>
>
> Not so fast! I'm using six LM34DZs and they're all reading within 0.3 degF
> of each other. The error is linear, if I correct for deviation in an ice
> bath then they all stay within 0.1F of each other up through 90F.
Not the two I have. They read fairly linear, but there is a wide range
between them.
>
> I've just finished learning how to get my 12bit ADC from wildly swinging
> readings to nearly rock steady (+-0.02F).
>
> First rule - The power and ground traces to your LM34s and ADC ref+ and
ref-
> *MUST* go directly back to the regulator with *no* digital parts hooked to
> them. Power all other chips, lcds etc with a seperate trace.
I have been using a seperate power supply for the LM34. The ADC is mounted
on a BOE along with the Stamp. Power and sensor stuff is on a seperate
breadboard. Of course the grounds of both power supplies are tied together.
>
> Use a reference diode to narrow your ADC's range. An LM34 is only good for
> +5 to +300 F so why give it a +5 reference voltage (500F). Use a reference
> diode (1.2ish or 2.5ish) to lower the reference voltage and decrease the
> step size of your ADC. Power this diode from your analog power trace, not
> the digital power trace. A multiturn pot also works but I find they vary a
> bit once set.
This sounds like a good idea. Do you mean a zener diode?
>
> Put RC filters on everything in sight. An 82 ohm resistor and 1uF tantalum
> capacitor make a good combo. Just plug a resistor into the power line to
> each LM34, lead it to the +side of the cap then the negative leg of the
cap
> to ground. I also used one of the reference diode and the VCC to the ADC.
I'll try that too. Do the caps have to be tantalum? I don't have any laying
around, and I live *way* out in the sticks, so I'll have to order them.
Actually, I just thought of some old equipment that has some..might be time
for some surgery...
Here's the odd thing. When I input 5V to the LM34, I get *very* erratic
readings off the ADC. Makes no difference what power supply I use. When I
reduce the input to 2V using a volatge divider, I get very stable readings
with the bounce factor being around 3mV. I tried a 3.3k resistor in series
with the LM34 output as Tracy suggested, but the above condition persists.
Regards and thanks,
Jonathan
on the package) - my application only needs 30F to 90F so 5-123F is great.
I don't even know what the difference is between tantalum and other
capacitor materials/construction. I was told they work good and the results
back up that statement soooo.
I'm a newb at this electronics stuff but, your description of using 5v
making for erractic results and 2v smoothing it out makes me think you
aren't using big enough caps for the power supply. Think about what is
happening. As the phase drops toward zero volts, your caps discharge to keep
your supply at 5v. If they run out of juice your overall supply voltage
drops. If it drops below 5v but doesn't drop below two volts then your two
volt supply to the LM34 would produce a stable reading while a 5v would be
totally wonky.
I'm using 47uF caps for my 7805, what are you using?
>of each other. The error is linear, if I correct for deviation in an ice
>bath then they all stay within 0.1F of each other up through 90F.
You got lucky! Even with the LM34CAH, or LM34CAZ, I quite often get
chips that are off by as much as 10 millivolts (1 degree F). I am
calibrating against a NIST traceable thermometer in a deep thermos
bottle. Occasionally I get one that reads as much as 13 millivolts
off, which would be out of spec, but that happens so rarely that I
have not complained. Anyway, they would first say that maybe my
calibration setup is incorrect. When I first started working with
LM34s, I had an issue with the calibration. That was around 1976 or
so, when the chip first came out. I called up the National corporate
office and asked to speak with someone in tech support. It blew me
away. They transferred me right to Bob Pease himself, who, you
realize, is one of the major guru legends of analog electronic
design. He explained to me in great detail the procedure they use to
calibrate and select the grades at the factory, and how difficult it
had been to move from prototype to production, and how I could get
the best results in my own shop.
> I've just finished learning how to get my 12bit ADC from wildly swinging
> readings to nearly rock steady (+-0.02F).
Those were all excellent suggestions, Pat. I wonder, Jonathan, have
you tried feeding steady voltages from other sources into your ADC?
To see if the problem might be there instead of the sensor. Feed a
voltage in from the wiper of the potentiometer, with a 0.1 uf
capacitor from the wiper to ground.
> > First rule - The power and ground traces to your LM34s and ADC ref+ and
>ref-
> > *MUST* go directly back to the regulator with *no* digital parts hooked to
> > them. Power all other chips, lcds etc with a seperate trace.
>
>I have been using a seperate power supply for the LM34. The ADC is mounted
>on a BOE along with the Stamp. Power and sensor stuff is on a seperate
>breadboard. Of course the grounds of both power supplies are tied together.
For an experiment, try putting an LM34 on the breadboard right next
to the ADC. What ADC chip are you using, by the way?
>Here's the odd thing. When I input 5V to the LM34, I get *very* erratic
>readings off the ADC. Makes no difference what power supply I use. When I
>reduce the input to 2V using a volatge divider, I get very stable readings
>with the bounce factor being around 3mV. I tried a 3.3k resistor in series
>with the LM34 output as Tracy suggested, but the above condition persists.
Do you mean you are using the following circuit, but with 6 volts
replaced with 2 volts?
;---
+6 volts
|
cable 3 kohm |
signal ---/\/\
| LM34
common
|
`---
It won't work. The readings are stable because nothing is happening.
The absolute minimum supply voltage is 4.5 volts (5 volts per the
data sheet). Did you check for AC voltages using your VOM? Connect
the ground black lead of the VOM to the V- reference pin of your ADC.
Connect the positive red lead to
1) the power supply lead of the LM34?
2) the signal lead of the LM34?
3) the signal output lead of the LM34?
Do the same thing with DC voltages, at the same points, with the
negative lead connected to the V- reference of the ADC.
-- Tracy
> >Here's the odd thing. When I input 5V to the LM34, I get *very* erratic
> >readings off the ADC. Makes no difference what power supply I use. When I
> >reduce the input to 2V using a volatge divider, I get very stable
readings
> >with the bounce factor being around 3mV. I tried a 3.3k resistor in
series
> >with the LM34 output as Tracy suggested, but the above condition
persists.
>
> Do you mean you are using the following circuit, but with 6 volts
> replaced with 2 volts?
> ;---
> +6 volts
|
> cable 3 kohm |
> signal ---/\/\
| LM34
> common
|
> `---
> It won't work. The readings are stable because nothing is happening.
> The absolute minimum supply voltage is 4.5 volts (5 volts per the
> data sheet). Did you check for AC voltages using your VOM? Connect
> the ground black lead of the VOM to the V- reference pin of your ADC.
Yes, just as shown above. It IS working with a supply of 2.2V to the LM34,
quite well in fact, has kept the tub temp stable for 48 hrs. The output of
the LM34 is consistant and linear. As I said, if I up the supply of the LM34
to 5V, I get wildly varying ADC results. To make sure I have made clear the
symptoms, here it is:
System details:
LM34DZ sensor, using its own regulated power supply (as stable as the BOE or
better) and leads on a breadboard
LTC1298 ADC, mounted on and fed from the BOE
With 5V input to the LM34, I get a stable output within 2mV or so on the
output lead. The voltage is around 1.120V at 104F, equaling 9.7mV/degree.
Hook this up to the ADC, and I get wildly varying results. With 2.2V input
into the LM34, I get stable output within 2mV or so. The voltage is around
830mV at 104F, equaling 8mV/degree. Hook this up to the ADC, and I get nice
stable results, +/- 2 or so. The resistor 3k (I am using a 3.3k) in series
with the LM34 output makes no difference.
Any idea what gives here? Obviously the LM34 doesn't like running at 2.2V,
it isn't supposed to and the calibration is off (but linear!). So I want to
run it on 5V, but I'm going to have to solve this problem.
> Connect the positive red lead to
> 1) the power supply lead of the LM34?
> 2) the signal lead of the LM34?
> 3) the signal output lead of the LM34?
> Do the same thing with DC voltages, at the same points, with the
> negative lead connected to the V- reference of the ADC.
OK. Here are the results, this is with the syatem as it is, running the LM34
with 2.2V
1) AC: 4mV, DC: 5V or 2.2V, for the PSU and voltage divider feeding the
LM34, respectivly
2) I'm not sure what you mean by the signal lead.
3) AC: 0, DC 830mV at 104 degreesF
Thanks for all the input!
Jonathan