I have a project, using a temperature sensor, TMP36 and Arduino. Basically its a bluetooth thermometer. Everything worked fine at breadboard and connected and energized by my notebook. Now I connected it to a 4 x AA recharchable batteries and I started to get wrong temperatures (running on USB, I get 22 degrees, running on batteries, I get 44 degrees).
As formula to get the temperature, I'm using this one:
Temp in °C=Vout(in mV)−50010Temp in °C=Vout(in mV)−50010
My debug info follows:
UPDATE
- USB (5v)
voltage read from TMP36 = 147
voltage converted to 5v arduino
(147 * 5.0) / 1024 = 0.71temperature = (0.71 - 0.5) * 100 = 21.78
- Battery
4 x reachargable AA = 1.2v (voltimeter says 5.6v) not enough energy to turn it on the BT module, but the board was turned on (power light was on)
- Recharged Battery
4 x reachargable AA = 1.2v (voltimeter says 6v.7)
voltage read from TMP36 = 171 voltage converted to 5v (I assume, that the arduino has a voltage regulator to limit the input to 5v, right?)
171 * 5.0 / 1024 = 0.83
temperature = (0.83 - 0.5) * 100 = 33
my questions are:
Is there a way to correct it via software or should I drop the voltage, using a diode/resistor?
At the datasheet its written that the input voltage range is from 7v to 23v. Does it means that it has a regulator to 5v internally to regulate my arduino to 5.5v? Does it means as well that I will need more battery to put it to work?
Arduino used is the Iteaduino BT