When makers ask "what is a temperature sensor," the basic textbook answer is a transducer that converts thermal energy into an electrical signal. But in the context of embedded systems and power electronics, a temperature sensor is the critical feedback node in a closed-loop thermal management system. Whether you are reading the internal die temperature of an ESP32 via its ADC or strapping a 10K NTC thermistor to the metal tab of a power MOSFET, the sensor dictates when your firmware must throttle PWM duty cycles, spin up a cooling fan, or trigger a hard shutdown to prevent silicon death.
Monitoring temperature is useless if you do not understand the thermal path from the silicon junction to the ambient air. This guide bridges the gap between reading a sensor value over I2C and actually engineering the heatsinks, airflow, and enclosure venting required to keep that value within safe limits.
Sensor Selection and the Thermal Path Math
Before calculating thermal resistance, you must select the right sensor for the physical location you are monitoring. Board-level ambient sensors react slowly to component spikes, while analog thermistors bonded directly to a component case provide near-instantaneous thermal feedback.
| Sensor Model | Interface | Accuracy (Typ) | Temp Range | Response Time (τ) | Best Application |
|---|---|---|---|---|---|
| TI TMP117 | I2C | ±0.1°C | -55 to 150°C | ~1.5s (in still air) | High-precision PCB ambient / calibration |
| NXP LM75A | I2C | ±2.0°C | -55 to 125°C | ~4.0s | General MCU enclosure monitoring |
| Dallas DS18B20 | 1-Wire | ±0.5°C | -55 to 125°C | ~750ms (max res) | Liquid cooling loops, external probes |
| Generic 10K NTC (β3950) | Analog (ADC) | ±1.0°C (calibrated) | -40 to 125°C | <1s (in epoxy) | Direct component tab / heatsink monitoring |
Calculating the Thermal Path (RθJA)
A temperature sensor mounted on a heatsink only tells you the case temperature, not the internal junction temperature where the actual heat is generated. To find the junction temperature ($T_J$), you must use thermal resistance ($R_\theta$), measured in °C/W. The total thermal path from junction to ambient is the sum of its resistances:
$R_{\theta JA} = R_{\theta JC} + R_{\theta CS} + R_{\theta SA}$
Junction-to-Ambient = Junction-to-Case + Case-to-Sink + Sink-to-Ambient
Worked Example: You are using an LM317 linear regulator (TO-220 package) to drop 12V to 9V at a continuous 1A load. The power dissipated ($P_D$) is $(12V - 9V) \times 1A = 3W$. The maximum allowed junction temperature ($T_{J(max)}$) is 125°C, and your sealed enclosure reaches an ambient temperature ($T_A$) of 50°C on a hot day.
- Maximum allowable $R_{\theta JA}$: $(125°C - 50°C) / 3W = 25 °C/W$.
- Junction-to-Case ($R_{\theta JC}$): The LM317 datasheet lists this as 5 °C/W.
- Case-to-Sink ($R_{\theta CS}$): Using a standard 0.5mm silicone thermal pad, this is roughly 0.5 °C/W.
- Required Sink-to-Ambient ($R_{\theta SA}$): $25 - 5 - 0.5 = 19.5 °C/W$.
A bare TO-220 package in still air has an $R_{\theta SA}$ of about 65 °C/W, which would result in a junction temperature of $50°C + (3W \times 65.5) = 246.5°C$—instantly destroying the part. You must add a heatsink with an $R_{\theta SA}$ of 19.5 °C/W or lower.
Derating Curves and Thermal Failure Signatures
Knowing the math is only half the battle; you must also interpret the manufacturer's derating curves and understand how thermal stress physically destroys components over time.
How Hot is Too Hot?
Silicon intrinsically stops functioning reliably around 150°C to 175°C, but you should never design for the absolute maximum. For a 10-year operational lifespan, keep your maximum $T_J$ under 85°C. Every 10°C increase in operating temperature roughly halves the expected lifespan of the component due to accelerated chemical degradation.
Derating curves show how much current or power a part can handle as ambient temperature rises. For example, a MOSFET rated for 30A at 25°C ambient might be derated to just 12A at 85°C ambient if no heatsink is applied. If your firmware reads 80°C from your NTC sensor and you are pulling 20A, you are operating outside the safe operating area (SOA), regardless of what the "absolute maximum" datasheet table says.
Unlike bipolar transistors, power MOSFETs have a positive temperature coefficient for $R_{DS(on)}$. As the die gets hotter, its resistance increases, which generates more heat ($I^2R$), which increases resistance further. If your temperature sensor detects a rapidly spiking case temperature without a corresponding load increase, your firmware must cut the gate drive immediately to prevent thermal runaway and catastrophic fire.
Failure Signatures of Thermal Stress
When thermal management fails, components rarely just "stop working" instantly. They exhibit specific failure signatures:
- Electromigration: Prolonged operation near $T_{J(max)}$ causes metal atoms in the silicon traces to physically migrate. This manifests as a slow, permanent increase in $R_{DS(on)}$ or forward voltage drop over months of use.
- Solder Joint Creep: Repeated thermal cycling (e.g., a 3D printer heated bed MOSFET turning on and off) causes the solder joints to expand and contract at different rates than the PCB. This leads to micro-cracking, resulting in intermittent high-resistance connections that your temperature sensor will read as sudden, unexplained thermal spikes.
- Die Attach Delamination: The epoxy bonding the silicon die to the metal leadframe degrades. The thermal path ($R_{\theta JC}$) effectively breaks. Your case-mounted sensor will read a cool 40°C while the internal junction is actually melting at 160°C.
Heatsink Sizing and Airflow Enclosure Tactics
Returning to our LM317 example requiring an $R_{\theta SA}$ of 19.5 °C/W, we need to select a physical heatsink and evaluate enclosure airflow. According to Analog Devices' thermal selection guidelines, matching the physical footprint and required thermal resistance is critical for natural convection.
Heatsink Selection with Wattage Basis
For a 3W load requiring 19.5 °C/W, a massive finned extrusion is overkill, but a bare tab is fatal. A stamped board-level heatsink like the Wakefield-Vette 680-125AB is an ideal choice. It is designed for TO-220 packages and provides an $R_{\theta SA}$ of approximately 12.5 °C/W in natural convection (still air).
Let us verify the final junction temperature with this part:
- Total $R_{\theta JA} = 5 + 0.5 + 12.5 = 18 °C/W$.
- $T_J = 50°C + (3W \times 18 °C/W) = 104°C$.
While 104°C is below the 125°C absolute limit, it is above our 85°C reliability target. To bridge this gap without buying a larger, more expensive extruded heatsink, we must alter the enclosure environment.
What Airflow and Enclosure Changes Buy You
Heatsink datasheets list $R_{\theta SA}$ in "natural convection" (0 LFM - Linear Feet per Minute). Introducing forced air drastically changes the physics of the boundary layer around the fins. Using the Wakefield-Vette thermal calculators and standard forced convection curves, moving just 100 LFM of air across the 680-125AB drops its effective $R_{\theta SA}$ from 12.5 °C/W down to roughly 7.0 °C/W.
Recalculating with a small 40mm enclosure fan pushing 100 LFM:
- New Total $R_{\theta JA} = 5 + 0.5 + 7.0 = 12.5 °C/W$.
- New $T_J = 50°C + (3W \times 12.5 °C/W) = 87.5°C$.
This brings us much closer to the 85°C reliability target. If you are designing a sealed NEMA or IP-rated enclosure where internal fans are impossible, you must calculate the required venting or external surface area. A standard rule of thumb for sealed enclosures is that you need roughly 1 square inch of exposed aluminum enclosure surface area per 0.1W of dissipated heat to maintain a 30°C internal-to-external delta. For high-wattage embedded systems, mounting the PCB directly to the aluminum enclosure wall using thermal interface pads turns the entire metal box into your heatsink, drastically lowering the effective $R_{\theta SA}$.






