I need a clarification about these temperature sensor :~
I'm working with 2 identical sensor on 2 different Arduino, but with the well-known formula
temp = (5 * analogRead(0) * 100.0) / 1024.0
I get different values for the 2 sensors. I know there's a 0.5 ° error in the these values, but sometimes it's wrong of 1.5 ° or more.
So my answer: I assumed that "5" in the formula is the current voltage the LM35DZ is powered, but on real boards it's never exactly 5 V.
With the tester I've checked current voltages are:
Arduino 1 = 4.81 V
Arduino 2 = 5.17 V
Do you think that changing these values I'll get a "more real" value or "5" is the correct number ?
needs to replace "5" with the actual board voltage, 4.81V, 5.17V, etc. So it is not surprising that you get a large temperature error if you have a large reference voltage error.
--
The Rugged Motor Driver: two H-bridges, more power than an L298, fully protected
Back on the old board you will find a prety lengthy discusson/argumentabout this .
Look for my posts probably 12 to 18 months ago
The datasheet for arduino and the device datasheet together actually prove the variation can be up to two degrees out.
The problem is with arduino is the 5 Volts is as you say usually less . Trying to get an accurate measure of the exact voltage at the time is not as simple as Vref . It does not work . I spent weeks looking for an answer and gave up on the project .
I had sensors in freezers radioing readings each 60 secs but they were not accurate enough for my needs
Still looking though. The full programs are there too
You can get around all of the problems discussed above simply by moving to the Dallas temperature sensors, aka the "1-Wire" chips, or DS1820 and cousins.
needs to replace "5" with the actual board voltage, 4.81V, 5.17V, etc. So it is not surprising that you get a large temperature error if you have a large reference voltage error.
I'm working with the LM35 in a project of mine also (a solar water heater controller). It reads 5 LM35 sensors (ambient, panel temp, tank temp, pump outlet temp, and tank inlet temp).
I noticed this variation as well, and a made a calibrate function (accessed with a DR Robot LCD Keypad shield). What it does is lets me "calibrate" by comparing an LM35 reading with a known reading.. I enter the correct reading and it computes and stores a multiplier to use (multiplier = actual_temp / lm35_temp )... Then I add it into the formula to be:
One of the reasons I had to implement this multiplier calibration technique is that each LM35 has different length leads running to them (from about 5' to around 20'), so each one needs calibrated individually to compensate for voltage drop, etc. In the end it seems to work pretty well!
jondecker76:
I'm working with the LM35 in a project of mine also (a solar water heater controller). It reads 5 LM35 sensors (ambient, panel temp, tank temp, pump outlet temp, and tank inlet temp).
I noticed this variation as well, and a made a calibrate function (accessed with a DR Robot LCD Keypad shield). What it does is lets me "calibrate" by comparing an LM35 reading with a known reading.. I enter the correct reading and it computes and stores a multiplier to use (multiplier = actual_temp / lm35_temp )... Then I add it into the formula to be:
One of the reasons I had to implement this multiplier calibration technique is that each LM35 has different length leads running to them (from about 5' to around 20'), so each one needs calibrated individually to compensate for voltage drop, etc. In the end it seems to work pretty well!
Hi Jon and thank you for your answer
It's similar like my idea, but I can't understand how you can calculate the multiplier.
You try to get the temp value from the temp value. I assume you use the old temperature value and the old known temperature to calculate the multiplier for the new one. Is it right ?
You know an arduino can measure it's own Vcc (~5V)? 'arduino hidden functions' gives info from google. The trick is to measure the internal bandgap voltage with Vcc as reference and 'reverse' the calculation.
So you can measure with 2 meters, which one do you believe?
Possibility could be to first measure the internal bandgap with a multimeter/scope and go on from there.
It's similar like my idea, but I can't understand how you can calculate the multiplier.
You try to get the temp value from the temp value. I assume you use the old temperature value and the old known temperature to calculate the multiplier for the new one. Is it right ?
Pretty simple actually. How I am doing it is I go to a calibration screen on my LCD Keypad shield (DFRobot). I use the left and right arrow buttons to enter the known temperature (which I am getting from a manual thermometer). The LM35 is in measuring the same thing at the same time. After I enter the temperature, the multiplier is computed from the entered value and the actual value being read from the analog pin.