LowPowerLab Forum

Hardware support => Low Power Techniques => Topic started by: EdM on November 05, 2019, 12:30:22 PM

Title: Single Diode Temperature Readings with the ICU
Post by: EdM on November 05, 2019, 12:30:22 PM
You can measure temperature by timing reverse-bias decay with the input capture unit. Not sure if this qualifies at the lowest possible power for a temperature reading but if you sleep the peripherals for sleep mode idle, and use a Shottky these readings can be made pretty quickly so it's not a bad option -and you can hang the diode right off the header pins in a tight build.


Temp (Celsius) vs ‘covered’ LED reverse-bias discharge time (Seconds) Red, Blue & Green color channels of a generic rgb LED shown.
The LED was encapsulated in black heat shrink tubing and the LED was connected directly to the IO pins.
There were no limit resistors on the LED during this test, and I had to remove the ‘timeout error’ catching in the light-sensor code to let the system run long enough to make these readings.

Title: Re: Single Diode Temperature Readings with the ICU
Post by: EdM on November 09, 2019, 12:54:59 PM
I should add a note here about the system oscillators. The ICU timing methods have trouble with temp compensation on the main system clock. So the diode methods fails on a RocketScream Mini Ultra because it's temp compensation kicks in at 20C - dramatically changing the main clock frequency, and creating a fierce discontinuity in the data. Not sure if that applies to the moteinos, but it's something to watch out for with any time based method.  While the clone board clocks are affected by temp, the effect is smoothly absorbed by the S&H constants.