The LM35DZ temperature sensor is a staple in embedded systems for its linear 10 mV/°C output and ease of use with microcontrollers like the Arduino and ESP32. However, treating it as a perfect, self-isolated thermometer leads to systemic measurement errors. The TO-92 plastic package has specific thermal mass, junction-to-ambient resistance, and environmental vulnerabilities. If you are measuring ambient air, board-level hotspots, or chassis temperatures, you must manage the thermal path between the target, the sensor's silicon die, and the surrounding environment.

This guide breaks down the junction math, interprets the derating curves, and provides actionable enclosure and heatsink strategies to ensure your LM35DZ reads accurately without drifting or failing.

Thermal Path Math: Junction-to-Ambient (θJA) and Self-Heating

Every semiconductor generates internal heat. For a temperature sensor, this self-heating is a direct source of measurement error. To calculate the actual temperature of the silicon die (junction temperature, TJ) relative to the ambient air (TA), we use the fundamental thermal resistance equation:

TJ = TA + (PD × θJA)

Where:

  • PD is the power dissipated by the sensor in Watts.
  • θJA is the thermal resistance from junction to ambient in °C/W.

The LM35DZ (TO-92 package) has a typical quiescent current of 56 μA. If you power it from a standard 5V Arduino rail, the power dissipation is minimal:

PD = 5V × 56 μA = 0.28 mW (0.00028 W)

According to the Texas Instruments LM35 datasheet, the θJA for a TO-92 package in still air is approximately 160 °C/W. Plugging in the numbers:

ΔT = 0.00028 W × 160 °C/W = 0.045 °C

At 5V, self-heating is negligible. However, if you power the LM35DZ from a 24V or 30V industrial PLC supply to maximize the analog output swing, the math changes:

PD = 30V × 56 μA = 1.68 mW
ΔT = 0.00168 W × 160 °C/W = 0.27 °C

A 0.27 °C offset matters in precision environmental monitoring. If you must run at higher voltages, account for this offset in your firmware calibration.

LM35 Package Thermal Resistance Comparison
Package VariantSensor ModelθJA (Still Air)θJC (Junction-to-Case)Best Use Case
TO-92LM35DZ~160 °C/W~40 °C/WAmbient air, light board monitoring
TO-220LM35DT~50 °C/W~2.5 °C/WChassis mounting, high thermal mass
TO-46 (Metal Can)LM35H~180 °C/W~30 °C/WHarsh environments, fast transient air

Derating Curves and "How Hot is Too Hot"

When reviewing the datasheet, engineers often confuse absolute maximum ratings with specified operating ranges. The absolute maximum junction temperature for the LM35 family is 150°C. Exceeding this will permanently damage the silicon and the TO-92 epoxy package.

However, "how hot is too hot" for accuracy is a lower threshold. The LM35DZ is calibrated to ±0.5°C at 25°C. As you approach the extremes of the -55°C to 150°C range, the error band widens to ±1.0°C or more. Furthermore, the TO-92 plastic package begins to outgas and degrade mechanically if held continuously above 125°C. For reliable, repeatable embedded designs, treat 100°C as the practical upper limit for the LM35DZ. If your target environment exceeds 100°C, you must physically isolate the sensor from the heat source or switch to a thermocouple/RTD interface.

Warning: Never use the LM35DZ to measure surface temperatures of power components (like MOSFETs or linear regulators) by simply pressing the TO-92 leads against the hot part. The plastic body is a thermal insulator, and the leads will conduct heat unevenly, yielding massive errors and potentially melting the solder joints on your protoboard.

Heatsink Selection and Chassis Coupling (TO-220 vs TO-92)

A frequent question on workbenches is whether to glue a small heatsink to the LM35DZ TO-92 body to improve thermal coupling. Do not do this. The TO-92 package is designed for ambient air coupling; adding a heatsink to the plastic body only adds thermal mass and insulates the sensor from rapid air changes.

If your application requires monitoring a high-power aluminum chassis, motor housing, or busbar, you must switch to the TO-220 variant (LM35DT). The TO-220 package features an exposed metal tab with a low junction-to-case thermal resistance (θJC ≈ 2.5 °C/W), allowing you to bolt it directly to the target or use a dedicated heatsink for thermal mass coupling.

Here is a real-world heatsink and interface selection example for mounting an LM35DT to an enclosed aluminum extrusion:

  1. The Sensor: LM35DT (TO-220), θJC = 2.5 °C/W.
  2. Thermal Interface Material (TIM): Bergquist Sil-Pad K10. This provides electrical isolation while maintaining a thermal resistance (θCS) of roughly 1.2 °C/W at standard mounting pressures.
  3. Heatsink / Target Mass: Aavid Thermalloy 531202B02500G. This is a standard extruded TO-220 heatsink with a natural convection θSA (sink-to-ambient) of 18.0 °C/W. (If bolting directly to a massive chassis, θSA drops to near zero, but we use the heatsink value for a worst-case isolated scenario).

Total Thermal Path Calculation:
θJA(total) = θJC + θCS + θSA
θJA(total) = 2.5 + 1.2 + 18.0 = 21.7 °C/W

Compared to the TO-92's 160 °C/W, this 21.7 °C/W path ensures the silicon die tracks the chassis temperature almost instantly, with virtually zero self-heating error. For deeper insights into mounting hardware and torque specifications, refer to TI's thermal management application notes regarding TO-220 tab interfaces.

Airflow, Enclosures, and Failure Signatures

What Airflow and Enclosure Changes Buy You

In a sealed, unventilated NEMA enclosure, the ambient air stagnates. The LM35DZ will end up measuring the localized micro-climate created by its own board's power supply and microcontroller, rather than the true room temperature. Introducing even minimal airflow (0.5 m/s) strips the thermal boundary layer off the TO-92 epoxy. This drops the effective θJA from 160 °C/W to roughly 100 °C/W, but more importantly, it forces the sensor to track the moving air mass rather than the PCB copper.

Design Rules for Enclosures:

  • Slot Placement: Mount the LM35DZ near the lower ventilation slots of an enclosure. Heat rises; placing the sensor near the top exhaust vents will expose it to the thermal exhaust of internal components.
  • PCB Isolation: If measuring true ambient air, route the LM35DZ on a small daughterboard connected via a 3-wire ribbon cable, keeping it physically separated from the main MCU and voltage regulators.
  • Conformal Coating: Always coat the TO-92 body and the exposed lead-frame boundary with acrylic or silicone conformal coating. Uncoated TO-92 packages are susceptible to moisture ingress, which causes severe hysteresis and drift in high-humidity environments.

Failure Signatures of Thermal Stress

When an LM35DZ is subjected to thermal abuse, it rarely fails as a clean "open circuit." Watch for these signatures on your oscilloscope or ADC logs:

  • Output Saturation: If the die exceeds 150°C, the internal bandgap reference collapses. The output pin will peg to the supply rail (VCC) or drop to GND.
  • Non-Linear Hysteresis: If the sensor reads 25°C on startup, reads 60°C under load, but then reads 28°C when it cools back down to ambient, the TO-92 epoxy has absorbed moisture or suffered mechanical micro-cracking from thermal expansion mismatch.
  • High-Frequency Noise: Thermal stress on the die-attach paddle can increase the output impedance of the sensor's internal op-amp, making the 10 mV/°C signal highly susceptible to EMI from nearby switching regulators.

LM35DZ Thermal FAQ

Does the LM35DZ need a heatsink for high-temperature environments?

No. The LM35DZ is a TO-92 package and physically cannot accept a standard heatsink. Furthermore, adding thermal mass to the plastic body will slow down its response time to ambient air changes. If your environment exceeds 100°C, you do not need a heatsink; you need to relocate the sensor away from the heat source or switch to a high-temperature probe like a PT100 RTD or K-type thermocouple.

How does self-heating affect LM35DZ accuracy in a sealed enclosure?

In a sealed enclosure with zero airflow, the heat generated by the LM35DZ (up to 0.27°C at 30V) cannot dissipate efficiently. More critically, the sensor will absorb the radiant heat from nearby components. The self-heating math assumes a massive, infinite ambient air sink. In a small, sealed plastic box, the "ambient" temperature rises locally, compounding the self-heating error with board-level thermal pollution. Always use 5V or 3.3V to minimize PD, and vent the enclosure.

What are the failure signatures of thermal stress on the LM35DZ?

The most common signature is non-linear hysteresis (the sensor reads a different baseline temperature after a heat cycle). This is usually caused by moisture expanding inside the TO-92 epoxy during heating, stressing the silicon die. In catastrophic thermal failure (>150°C), the internal bandgap reference breaks down, and the output voltage saturates at VCC or drops to 0V, triggering a hard fault in your microcontroller code.