“This project describes a thermocouple thermometer, capable of measuring temperatures up to +1350°C, using just an ATtiny85 and an OLED display.
It uses the ATtiny85’s analogue-to-digital converter with a x20 gain option to measure the thermocouple voltage, and the internal temperature sensor to measure the ambient temperature (shown on the bottom line of the display), and it gives readings accurate to better than 5°C. Some possible applications include a cooking thermometer, a soldering-iron temperature monitor, or a wood burning stove temperature display.
I’ve recently wanted to build a circuit capable of measuring temperatures around 250°C, and so the temperature sensors I’ve used in previous projects, such as the DS12B20, aren’t suitable because they usually have an upper temperature limit of 150°C. The sensor of choice here is a thermocouple, which uses the fact that a junction between two different metals generates a small voltage proportional to temperature. The most common type of thermocouple, called the K type, uses chromel (a nickel-chromium alloy) and aluminel (a nickel/aluminium/manganese/silicon alloy).
One can use a custom thermocouple amplifier to translate the small voltage to a digital signal that you can read from a microcontroller; a popular choice is the MAX31855K which provides an SPI output .
However, it occurred to me that you could simply read the thermocouple directly using the analogue input on an ATtiny85. The ATtiny85 conveniently provides a 10-bit differential analogue input with a x20 gain option. A K-type thermocouple generates about 41µV/°C, so using the 1.1V voltage reference we can calculate the resolution and maximum range as follows:
Resolution = 1.1/(1024 x 20 x 41 x 10-6) = 1.31°C
Maximum = 1024 x 1.31 = 1341°C.
With oversampling one could get the resolution below 1°C which is definitely enough precision for many applications.
The ATtiny85 is one of a small number of AVR microcontrollers that include a gain option on the ADC inputs; the only others I know of are the ATtiny861, ATtiny167, and ATmega1284P.
Although K-type thermocouples will measure temperatures down to -200°C, for simplicity in this project I have only supported temperatures above room temperature. I may extend this in a future project if there’s any interest.”