When makers ask, 'what are temperature sensors,' the standard answer is a transducer that converts thermal energy into an electrical signal. But in embedded electronics and power design, a temperature sensor is not just a component for logging room weather—it is a critical feedback node for thermal management. Silicon dies have strict junction temperature limits, and exceeding them leads to logic errors, accelerated degradation, or catastrophic thermal runaway.
Whether you are designing a high-current motor driver for a Raspberry Pi rover or managing the onboard LDO of an ESP32-S3 in a sealed outdoor enclosure, you must map the thermal path from the silicon junction to the ambient air. This requires understanding sensor selection, thermal resistance math, and heatsink sizing.
Sensor Types and Thermal Mapping
Temperature sensors in embedded systems generally fall into four categories, each with distinct trade-offs regarding accuracy, response time, and physical placement. You must choose the right sensor based on whether you are measuring ambient enclosure temperature, PCB surface temperature, or estimating the internal junction temperature of a power IC.
| Sensor Type | Example Part | Interface | Accuracy | Response Time | Best Use Case |
|---|---|---|---|---|---|
| Digital IC | TI TMP117 | I2C / SMBus | ±0.1°C | Slow (Thermal mass) | Precision ambient monitoring, medical/industrial IoT nodes |
| Analog IC | TI LM35 | Analog Voltage | ±0.5°C | Moderate | >General purpose MCU ADC reading, simple over-temp shutoff |
| NTC Thermistor | 10kΩ 3950 B-Value | Resistance (Voltage Divider) | ±1.0°C (calibrated) | Fast (Glass bead) | 3D printer hotends, battery pack surface monitoring |
| RTD | PT100 Class A | Resistance (Requires Amplifier) | ±0.15°C | Moderate | High-reliability industrial process control, HVAC |
For PCB-level thermal management, the TI TMP117 is a benchmark digital sensor. However, placing a TMP117 on the opposite side of the board from your power MOSFET will only tell you the ambient temperature inside the enclosure, not the case temperature of the MOSFET. To map the actual thermal path, you often need to embed a fast-response NTC thermistor directly into the thermal pad via on the PCB, or use a power IC that exposes its internal junction temperature via an analog 'TSENSE' pin.
The Math: Junction-to-Ambient Thermal Paths
To prevent silicon death, you must calculate the junction temperature ($T_J$). The governing equation for steady-state thermal resistance is:
$T_J = T_A + (P_D \times R_{\theta JA})$
Where $T_A$ is ambient temperature, $P_D$ is power dissipated in watts, and $R_{\theta JA}$ is the total thermal resistance from Junction to Ambient in °C/W. Total thermal resistance is a series chain, much like resistors in a DC circuit:
$R_{\theta JA} = R_{\theta JC} + R_{\theta CS} + R_{\theta SA}$
- $R_{\theta JC}$ (Junction-to-Case): Fixed by the silicon manufacturer based on the package (e.g., TO-220, SOT-223).
- $R_{\theta CS}$ (Case-to-Sink): The resistance of your Thermal Interface Material (TIM). A bare metal-to-metal joint might be 2.0°C/W; a thin layer of quality thermal paste drops this to ~0.5°C/W.
- $R_{\theta SA}$ (Sink-to-Ambient): The resistance of your heatsink and the surrounding air. This is the only variable you control via heatsink selection and airflow.
Interpreting the Derating Curve
A common mistake is reading the 'Maximum Power Dissipation' on page 1 of a datasheet (e.g., 75W for a TO-220 MOSFET) and assuming it applies universally. That 75W rating assumes the case temperature is held at 25°C. As the case temperature rises, the allowable power drops linearly. This is the derating curve. If the derating factor is 0.5W/°C above 25°C, and your case temperature reaches 100°C, the maximum allowable power drops to 37.5W. Designing without consulting the derating curve is the fastest way to melt a PCB trace.
Heatsink Selection and Airflow: Buying Margin
Let us run a concrete heatsink selection example. You are driving a 10A load using an N-channel MOSFET in a TO-220 package. The MOSFET has an $R_{DS(on)}$ of 0.05Ω at 25°C.
- Calculate Power Dissipation: $P_D = I^2 \times R_{DS(on)} = 100 \times 0.05 = 5W$.
- Define Limits: Max $T_J = 150°C$ (derated from 175°C for safety). Worst-case ambient $T_A = 50°C$ (inside a sealed NEMA enclosure in summer).
- Calculate Required Total Resistance: $\Delta T = 150 - 50 = 100°C$. $R_{\theta JA(max)} = 100°C / 5W = 20°C/W$.
- Subtract Known Resistances: TO-220 $R_{\theta JC} = 1.5°C/W$. Thermal paste $R_{\theta CS} = 0.5°C/W$.
- Find Required Heatsink: $R_{\theta SA} = 20 - 1.5 - 0.5 = 18°C/W$.
A bare TO-220 in free air has an $R_{\theta SA}$ of roughly 62°C/W, which will result in a junction temperature of 360°C (instant failure). We need a heatsink rated for 18°C/W or lower in natural convection. The Aavid (Boyd) 530602B02500G is a standard extruded aluminum heatsink that provides roughly 18.5°C/W in natural convection. This barely passes our math.
What Airflow and Enclosure Changes Buy You
Operating at the absolute mathematical limit leaves zero margin for spikes in ambient temperature or dust accumulation on the fins. This is where forced convection changes the game. The datasheet for the 530602B02500G shows that at 200 LFM (Linear Feet per Minute) of airflow, the $R_{\theta SA}$ drops from 18.5°C/W to roughly 6.0°C/W.
Adding a standard 40mm brushless fan (like a Noctua NF-A4x10 pushing ~5 CFM) inside your enclosure transforms the thermal environment. This drops your junction temperature from a perilous 149°C down to a highly reliable 83°C. If you cannot add a fan, you must increase the enclosure surface area (acting as a chassis heatsink) or switch to a larger finned extrusion, which increases cost and physical footprint.
Failure Signatures: How Hot is Too Hot?
How hot is too hot for this part? The absolute limit is defined by the silicon manufacturer's $T_J(max)$—typically 125°C for commercial embedded ICs (like the ESP32 or standard logic gates) and 150°C to 175°C for automotive or discrete power semiconductors. However, reliability engineering dictates that for every 10°C increase in operating temperature above the baseline, the expected lifespan of the component is halved (Arrhenius equation).
When you push thermal boundaries, components do not always fail with a dramatic pop. Thermal stress manifests in specific, measurable failure signatures:
While a MOSFET's $R_{DS(on)}$ increases with heat (which is good for current sharing in parallel), its leakage current ($I_{DSS}$) roughly doubles for every 10°C rise. In high-voltage, low-load switching states, this leakage can generate enough internal heat to trigger thermal runaway, destroying the die even when the main load is disconnected.
- Timing Skew and Logic Errors: As silicon heats up, electron mobility decreases. Propagation delays through logic gates increase. In high-speed interfaces (like SPI or DDR memory on a Raspberry Pi Compute Module), this skew can cause setup-and-hold time violations, resulting in random kernel panics or corrupted data buses.
- Electromigration: At sustained high current densities and temperatures (typically >100°C), copper and aluminum atoms in the IC's internal traces physically migrate. Over months or years, this creates voids (open circuits) or hillocks (short circuits) inside the silicon package.
- Solder Joint Fatigue: The silicon die, the copper PCB, and the plastic encapsulant all have different Coefficients of Thermal Expansion (CTE). Repeated thermal cycling (heating up under load, cooling down at idle) causes mechanical shear stress on the BGA balls or QFN pads, eventually leading to micro-cracks and intermittent connectivity.
- Brownouts and Voltage Sag: Linear regulators and internal bandgap references drift with temperature. An ESP32's internal brownout detector (BOD) may trip prematurely if the die temperature exceeds 85°C while pulling peak WiFi transmit current, causing endless reboot loops.
Ultimately, temperature sensors are your early warning system. By combining a high-accuracy digital sensor like the TMP117 for ambient tracking, a fast NTC thermistor for localized hot-spot monitoring, and rigorous $R_{\theta}$ math for your heatsink selection, you transition from guessing if your board will survive the summer to knowing exactly how much thermal margin you have left.






