July 11, 2013

Using the internal Arduino thermometer

 Well to be more specific, there's an often-unknown ability to read the temperature from data generated inside the ATmega328P found on our Arduino and compatible boards. Enthusiast and student Chelsie has demonstrated this with a simple sketch based on an original, with a modification to display the results on an LCD module. Bear in mind that it won't be the most accurate thermometer out there - however it can give you a rough measurement at no expense when required. 

This is made possible due to the engineers at Atmel having some leftover connections in the microcontroller, so the code measures the voltage output from the 'secret' sensor, compares it against the internal 1.1 V precision reference and from that the temperature can be determined. And with some calibration accuracy can be improved. Either way, it costs you nothing to try it - so give it a whirl. The original code can be found here, and Chelsie's with the LCD is here. And for more, we're on twitter and Google+, so follow us for news and product updates as well. 

Although the above project is easy, you can get much better accuracy with a separate sensor, so to get started with your own temperature-controlled projects, consider using our TEMP: DS18B20-based temperature sensor module:

... or our HUMID: Humidity and Temperature sensor module based on the popular DHT22 sensor unit. Both modules are fully documented and easy to get started with. These are only two of over a dozen of our sensor and outputs modules available now from Freetronics!

Leave a comment

Comments have to be approved before showing up.