1

I am trying to use the Arduino Uno with the LMT86LP temperature sensor, but I am getting strange output voltages from the sensor.

I have the pins (from left to right, flat side facing forward) as VDD, OUT, and GND. VDD is connected to 5V, GND to GND, and Vout to A0 (analog pin 0). The readings from the Arduino are consistently around 360 mV but should be somewhere around 1800 mV as I measured the output of the sensor using a multimeter and got a constant 1.8 V.

Right now the code is very simple. I am just doing analogRead() and printing to the Serial Monitor.

per1234
4,2782 gold badges23 silver badges43 bronze badges
asked Jul 9, 2015 at 5:09

1 Answer 1

1

The result from analogRead() is in counts of full scale, not in volts. Since you are using a 10-bit ADC, full scale is 1024.

1.8V/5V⋅1024=368.64

answered Jul 9, 2015 at 5:12
7
  • Ah I see, thank you. However I seem to be getting negative values for the temperature. The calculations I am doing are like so, int vin = analogRead(A0); float mV = (vin/1024.0)*5000; float tempC = (mV-500)/10; Commented Jul 9, 2015 at 20:48
  • @user1982824: Why are you subtracting 500? Commented Jul 9, 2015 at 20:51
  • Sorry sorry, this actually what I'm doing, voltage = reading * (5.0 / 1024); tempC = (voltage - 0.5) * 100; and I'm getting values around 12.5 celsius Commented Jul 9, 2015 at 21:00
  • @user1982824: That equation doesn't match anything I can find in the datasheet. Commented Jul 9, 2015 at 21:08
  • should i be using the equation T = (10.888 - sqrt((-10.888)^2 +4*.0035*(1777.3-temp))/(2*-0.00347)) + 30 Commented Jul 9, 2015 at 21:12

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.