I read that but that basically gives me 2 grounds. The supply ground and the new floating ground. Do I have to use 2 analog channels and read the difference or use a separate isolated supply? I was hoping to get away with just a single supply but that may not be possible.
Hi polymer52,
I was confused by the same thing. Think this is how it goes:
<IMG SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=3869&stc=1&d=126298242 8">
I was confused by the same thing. Think this is how it goes:
<IMG SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=3869&stc=1&d=126298242 8">
Ohh. I get it.
So it will take 2 A/D channels for each sensor. I'm using an 8 pin pic with 3 A/D channels in use and the 4th is used for the voltage ref. Looks like if I want full scale I'll have to go to an 18 pin pic or use the Dallas 1 wire devices which may be an option.
Thanks guys.
Yes, the Nat Semi app note method requires two channels. If the temperature is above "0" then the output will be above the GND terminal of the LM34, if the temperature is below "0", then the the output will be below the GND terminal of the LM34, but both of them will be positive with respect to PIC GND.
Read both channels. Subtract the smaller reading from the larger and compute the temp. If the channel 1 reading is larger than the channel 2 reading the temp is positive. Otherwise the temp is negative.
Another way that takes only one channel: Replace the two diodes shown in the application note with a 1.25V precision reference. Since you now know that the GND terminal of the LM34 is at 1.25V, "0" degrees will give you 1.25V into the A/D. -20 degrees will give you 1.05V (1.25V - (10mv/degree * 20 degrees)).
Yes, the Nat Semi app note method requires two channels. If the temperature is above "0" then the output will be above the GND terminal of the LM34, if the temperature is below "0", then the the output will be below the GND terminal of the LM34, but both of them will be positive with respect to PIC GND.
Read both channels. Subtract the smaller reading from the larger and compute the temp. If the channel 1 reading is larger than the channel 2 reading the temp is positive. Otherwise the temp is negative.
Another way that takes only one channel: Replace the two diodes shown in the application note with a 1.25V precision reference. Since you now know that the GND terminal of the LM34 is at 1.25V, "0" degrees will give you 1.25V into the A/D. -20 degrees will give you 1.05V (1.25V - (10mv/degree * 20 degrees)).
Yes! That sounds like what I need.
I'm using all the analog inputs on my little 12F683 and I don't have any extra pins to use 2 per sensor.
The 1.25v reference sounds perfect. I have some LM385's around here which are 1.235V if I can just find them.
Thanks.
Bookmarks