loading

What's Wrong With My Code or My Sensors?

Hey gotta question!

So I made an i'ble on how to make your own mini temperature sensor, and it worked great for a
while, but after time, the temperature settings started getting more off and off.

So what's wrong? I have the right conversion factors! If you go look at the Lm35's data sheet, I have all the
conversion factors to convert the analog out from the LM35 to a degrees.

Every time I use the LM35 with my arduino, it seems to work OK at first, the slowly slip and get worse.

Now on the LM35's data sheet there are 2 schematics for wiring the sensor, should I use the schematic with the resistor
for more accurate readings?

Thanks!

sort by: active | newest | oldest
caitlinsdad2 years ago

http://forum.arduino.cc/index.php?topic=117430.0

HavocRC (author)  caitlinsdad2 years ago
Complicated, complicated, after reading it 7 times I may have a vague idea of what he's trying to do . . .

In general, all materials have physical properties and respond to environmental factors. If we are passing an electric current through a material, measuring the voltage is one way to gauge "how it's feeling." Certain materials will let electrons flow through better when colder or restrict the flow when hot. That is what the thermocouple or the temperature sensor is doing because it is made from some material that responds to changes in temperature with changes in voltage. Now think of yourself when you get hotter or colder. There is a range of temperatures that you are comfortable in and then beyond that, you start sweating or shivering. The hotter or colder it gets, the more extreme the response. The voltage readings from the thermocouple respond in the same way. The manufacturer has tested and graphed the response curve in their datasheet and specified which is the normal operating range. Since it is not a straight line graph, you probably need a complicated formula instead of just an averaged conversion factor to translate the voltage into a temperature.

Other factors may come into play as the sensor warms up from use or there is less of a difference in the change of temperature it is subjected to. There is some drift in analog sensors or systems, much like the tuning went out in early analog electronic music synthesizers.Since the arduino has limited processing power, I think that user had a table to look up conversion factors for each of different chunks of the temperature scale. It's a little quicker in trying to fit the sensors response curve than trying to figure out some complicated formula.

So, when you go to college, take feedback and control systems to learn more.

HavocRC (author)  caitlinsdad2 years ago

Oh ok that makes sense. Thanks! Is there a standard temp sensor (with like arduino projects) I can get that already has a the formula down? Thanks!

http://www.adafruit.com/product/1782

is one but it is a temp sensor with the chip and a few bucks. Depends on the accuracy you need and what you want to do to set up the sensor to talk to the arduino.

HavocRC (author)  caitlinsdad2 years ago

Oookay. Thanks very much!