Forums

El cheapo sensor

Started by bitrex December 22, 2017
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:

<https://www.dropbox.com/s/0uyog13luvguh6e/vcc.png?dl=0>

<https://www.dropbox.com/s/i5u0rld7nl58xsp/temp.png?dl=0>

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!
On 12/22/2017 07:32 AM, bitrex wrote:
> 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
'45 that is, the '25 isn't a particularly good value for only 2k of program memory