TMP36 reading higher temperature

// converting that reading to voltage, for 3.3v arduino use 3.3
float voltage = reading * 4.811 / 1024; // My V Ref

That way you also measure the fluctuations of the power supply, like the effect of blinking LEDs.
You should always use one of the internal references of the Arduino when measuring voltages (not ratios).
Use analogReference(INTERNAL); in setup for an LM35 or TMP36.
That also gives you more A/D steps per degree. A 0.1C resolution instead of a 0.5C resolution.
Leo..

Wawa:

// converting that reading to voltage, for 3.3v arduino use 3.3

float voltage = reading * 4.811 / 1024; // My V Ref



That way you also measure the fluctuations of the power supply, like the effect of blinking LEDs.
You should always use one of the internal references of the Arduino when measuring voltages (not ratios).
Use analogReference(INTERNAL); in setup for an LM35 or TMP36.
That also gives you more A/D steps per degree. A 0.1C resolution instead of a 0.5C resolution.
Leo..

Yes, when I externally power my Arduino I use a 12 volt supply with a minor adjust I get down to about 9 volts. My one Uno board the regulator outputs a stable 4.811 volts so I use that in any code I experiment with. Works for me. I also like the ADS1115 board modules as they work well.

Thanks
Ron

4.811 is terrible for a 5V regulator. That's 4% low. Ugh.

CrossRoads:
4.811 is terrible for a 5V regulator. That's 4% low. Ugh.

I agree. I have two UNO boards. One board has a regulator out of 5.001 while the other is that 4.811. Never measured the mega or due mille nova boards for their onboard regulation. Short of remove and replace the regulator I figure it is what it is. As long as that error is known I can work around it or just use the newer better board.

Ron

Thanks. So to answer my question, there's basically variability between individual arduinos, meaning that the input voltage might vary?

junglistrex:
Thanks. So to answer my question, there's basically variability between individual arduinos, meaning that the input voltage might vary?

You may want to give this a read:

https://www.arduino.cc/en/Reference.AnalogReference#:~:text=The%20options%20are%3A,available%20on%20the%20Arduino%20Mega)

Pay attention where they mention chip part numbers too. :slight_smile:

Ron