Subscribe to EDN
RSS
Reprints/License
Print
Email

Simple microcontroller-temperature measurement uses only a diode and a capacitor

Discharging a capacitor through the reverse leakage of a PN junction allows you to measure ambient temperature.

Andreas Grün, Wedemark, Germany; Edited by Martin Rowe and Fran Granville -- EDN, December 5, 2008

Using a PN-junction diode for temperature measurement usually depends on its 2‑mV/K temperature  coefficient. Conventionally, you must amplify and digitize this voltage with an ADC before you can use the value in a microcontroller. Less well-known is the fact that the reverse current of a PN-junction diode shows a good exponential dependency over temperature; increasing the temperature by approximately 12K doubles the leakage (Figure 1). An easy way to measure current over such a large range of two to three decades is to charge and discharge a capacitor and measure the time or frequency.

A general-purpose I/O pin of a microcontroller charges a capacitor either by using it temporally as an output or by enabling a pull-up resistor, which is available in some controllers (Figure 2a). After charging the pin, you configure it as a high-impedance input, and a capacitor discharges through the leakage current of the diode (Figure 2b). The discharge time then is proportional to the temperature of the diode; thus, the diode exhibits exponential behavior. Depending on the type of diode, the exponential behavior can be nearly ideal. Calibration of a base point is necessary because the absolute value of the current varies greatly at a given temperature.

See all of EDN's
Design Ideas

Selecting the diode and the value of the capacitor requires some care. The smaller the PN junction, the smaller the reverse current and the longer the discharging time. Periods longer than a few seconds are usually unsuitable. Making the capacitor’s value too low leads to errors because the capacitance of any cable and the capacitance of the PN-junction diode come into effect.

Typically, a power diode, such as a 1N4001 with a capacitance of 1 nF, gives suitable results. The discharge time is approximately 0.3 to 1 sec at room temperature, falling into the millisecond range at 100°C. The PN-junction diode of a power transistor should also work.

RSS
Reprints/License
Print
Email
Talkback
Canon Resource Center

Featured Company


Most Recent Resources

Advertisement
Related Content

No related content found.

  • 0 rated items found.
Advertisement

KNOWLEDGE CENTER

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)
Engineering Careers
Jobs sponsored by
Advertisement
About EDN   |   Site Map   |   Contact Us   |   Subscription   |   RSS
© 2012 UBM Electronics. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy

Please visit these other UBM Canon sites

UBM Canon | Design News | Test & Measurement World | Packaging Digest | EDN | Qmed | Pharmalive | Appliance Magazine | Plastics Today | Powder Bulk Solids | Canon Trade Shows