El cheapo sensor

Dec 22, 2017 1 Replies

Some of the AVR microprocessors have an on-die temperature sensor and bandgap reference, including the 75-cent-in-quantity 8 pin ATTiny45. By connecting up the ADC registers the right way it can measure its own supply voltage and use that to help calibrate the temperature sensor; even without more sophisticated calibration temperature measurements seem accurate to within a couple degrees C, and Vcc measurements to within a couple mV. All without any external components



Here's a '25 logging its own Vcc and temperature to a PC over a software serial link at 9600 baud. Measured Vcc on a calibrated DMM is 5.15 volts, its readings are bouncing around between about 5.14 and 5.18:


The temperature rise is me pointing a heat gun on low setting at the top of the chip from about 1.5 feet away.



You get serial output, i2c interface, and microprocessor for "free", too!


'45 that is, the '25 isn't a particularly good value for only 2k of program memory

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required