ADC: measuring negative voltage?

Hi there,

I wasn't sure to post this in this section. I searched for the term and I didn't found useful information so I hope that this post is not repeated.

Also before post I read the Analog to Digital conversion part of the atmega168 datasheet and it says literally that input range is 0v - 5v.

I'm not an electronic engineer so don't be rude :stuck_out_tongue:

I successfully wrote a program to the freeduino that uses an LCD and four 7-segment-displays to "measure temperature" from a LM35DZ sensor (http://labombiya.com.ar/images/DSC01066.JPG).

Actually, that value it's not converted. I also read the libraries docs, and I already know that the integer value returned from analogRead() it's ranged from 0 - 1023 with aprox 4.9mV per unit.

I'm aware of all what software concern but I'm disabled of the hardware part :frowning: Maybe I'm missing a hardware-trick to scale the voltage so -55mV will be 0mV and units will be changed.

LM35DZ is not capable of measuring below zero degrees, or at least that was what I read in a datasheet, but a professional friend mades me a schematic that it would be possibly to extend the low-end range of the sensor (http://labombiya.com.ar/images/temp.jpg).

(Don't look at the sch chip, it was illustrative from the autor with the caps too)

The thing is, if I get from ADC2 negative supply...what actually happens? I mean, datasheet says that the ADC input voltage range is 0v to 5v, and lib docs says that analogRead() returns an integer from 0 to 1023. Will analogRead() reads a value? Can I damage the input pins?

To be more abstract. Forget about my specific situation and think about a lm35 with full range configuration. That is, -55mV to 1500mV. As datasheet says, -55ºC to 150ºC. Seems the trick remains in making the scale, for instance, 0mV - 1555mV, being 0mV the low-end range, -55ºC. Am I wrong? I can't ask my friend he's busy on another things and he already helped me a lot. So I try not to bother him right now.

I'm testing empirically anyways. I recent put the lm35dz in a ziploc bag into the freezer. I'll watch for the results later on.

Thanks for your help, and btw, i didn't want to post in my previous post because the discussion was not directly related with my doubt.

Have a nice burning! xD
lapacho

you can use an opamp to add a small voltage to the voltage coming from the sensor. This will also ad to the positive voltage, but you can deal with that i software.

You could also set up an op-amp as an inverting amplifier, so that negative voltages are inverted into positive voltages. You'll need to arrange for a negative power supply for the op-amp, in either case.

thanks! I made the measuring with a multimeter and indeed Vout goes below Vss. The differences of this two (with the above schematics) it's the true temperature. So, my friend's trick works! :slight_smile:

Thanks for the tip with the opamp to both of you I'll gather info about it :slight_smile:

See ya!
lapacho

EDIT: viewing my stock I found a LM358 i'll use it as op-amp.

It sounds like you found a solution (maybe), but I'm curious. Are you actually going to measure temperatures near 55 below freezing? I don't know anything about this specific sensor, but it would seem to me that unless you're going below -40 C, you have nothing to worry about. I assume that the bottom of the voltage range corresponds to the bottom of the temperature range. Your freezer should be about 0 C. 55 below freezing is FRIGGIN COLD! According to xkcd, spit goes clink at -40 C.

lol!

Actually, i'm not going to measure that cold. But, the geographic site where I live sometimes temperature goes up to -20ºC. Winter, of course, so if lm35dz is not capable of measuring below 0ºC then it's useless for me. Actually, freezer was -119mV :slight_smile: 11.9ºC.

That's why I need to rise the current range so I can measure that with the freeduino analog pins. I made the test with a multimeter and with the sensor IN the freezer hanging wires because as soon i took it out the temperature rise a very high speed. Then I put the displays board and the result of that pin (Vout) was 0 (the integer zero I think, because when I open the door and the sensor started to get warmed the displays started to show values from that pin.

I'm reading textures of non-inverting amplifiers. I got a KA393 comparator and the LM358, so I think I could diagram one with one of them....let's see how good I am understanding :slight_smile:

best regards,
lapacho