2957Views6Replies
LM35 Sensor?
I wanted to know how to convert the readings from a LM35 sensor to Celsius and Fahrenheit.I need them for a thermometer application. I would also like to have the arduino code to serial print the values
I wanted to know how to convert the readings from a LM35 sensor to Celsius and Fahrenheit.I need them for a thermometer application. I would also like to have the arduino code to serial print the values
Comments
Best Answer 9 years ago
The LM35 gives a fixed voltage change per deg change. The scale factor you apply to turn it into F or C is something you can work out easily.
The thing gives 10mV/deg C - very small input volts for an arduino too. Not allowing for noise, you can only read about 0.5C with it.
So deg F = 9(Deg C) /5 +32
Steve
Answer 9 years ago
2nd half of question:
*completely untested, ripped from this link
Be careful if you copy/paste to look for wrapped lines.
Answer 9 years ago
The Arduno's resolution is pretty crappy though - the sensivity will be horrible.
Answer 9 years ago
decent if it's what you have and don't need uber precision...
Would you not be able to trade precision for range? By altering the aRef from 5 down to 2.5 your readings would go from 0-100 to 0-50, with twice the voltage steps detected/degree.
Still agree, not a great sensor. I'd prefer something with an internal adc and i2c
Answer 9 years ago
Yes, tweaking the Vref to something lower would be a good plan - though these on-board ADCs are very noisy.
The LM35 is pretty accurate though, certainly compared to the +/- 2 deg "precision" sensors with digital interfaces, like Maxim make.. I ask you , how the heck can 2 deg C be "precision" ????
All you need is a cheap opamp to boost the signal, with a gain of 10 and practically no AC gain, and you're there.
Answer 9 years ago
repeatability answers that question. if repeatable, then it can be calibrated. It doesn't output discrete steps.