Author Topic: Single Diode Temperature Readings with the ICU  (Read 279 times)

EdM

  • Newbie
  • *
  • Posts: 32
Single Diode Temperature Readings with the ICU
« 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.

https://thecavepearlproject.org/2019/11/04/single-diode-temperature-sensor-with-arduino-icu-via-reverse-bias-leakage/

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.


« Last Edit: November 05, 2019, 01:05:09 PM by Felix »

EdM

  • Newbie
  • *
  • Posts: 32
Re: Single Diode Temperature Readings with the ICU
« Reply #1 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.