When building an arduino heat pump controller, the microcontroller itself is rarely your biggest thermal liability. An ESP32 or Arduino Mega running at 100% CPU load dissipates less than 0.5W. The real heat generators are the power supply dropping 24VAC to 5VDC, and the solid-state relays (SSRs) switching high-current loads like reversing valves, strip heaters, and condenser fans. If you rely on a linear regulator or undersized SSRs, junction temperatures will blow past the 125°C silicon limit in minutes, leading to erratic behavior or catastrophic latching.
To build a controller that survives the harsh environment of a mechanical room, you must engineer the thermal path from the silicon junction to the ambient air. This requires calculating thermal resistance, interpreting derating curves, and selecting the right enclosure airflow.
Thermal Path Math: Sizing the 5V Supply and Switching Components
The fundamental equation for thermal management is TJ = TA + (PD × RθJA), where TJ is junction temperature, TA is ambient temperature, PD is power dissipated, and RθJA is the junction-to-ambient thermal resistance (in °C/W).
How hot is too hot? While most silicon has an absolute maximum TJ of 125°C to 150°C, running components near this limit accelerates electromigration and degrades electrolytic capacitors. According to the Arrhenius equation, the operational lifespan of electronic components roughly halves for every 10°C rise in temperature. For a reliable heat pump controller, you must design your thermal path to keep TJ below 100°C, even when the mechanical room ambient (TA) hits 45°C (113°F) in the summer.
The most common mistake in DIY HVAC controllers is using a linear regulator like the LM7805 to drop rectified 24VAC (approximately 32VDC after a bridge rectifier and smoothing capacitor) down to 5V. Let's compare topologies for a 500mA load:
| Topology | Example Part | Efficiency | Power Dissipation (PD) | RθJA (No Heatsink) | Est. Temp Rise (ΔT) |
|---|---|---|---|---|---|
| Linear Regulator | LM7805 (TO-220) | ~15% | 13.5W | 65 °C/W | 877 °C (Fatal) |
| Switching Buck | LM2596 Module | ~75% | 0.83W | ~40 °C/W | 33 °C (Safe) |
| Isolated DC-DC | RECOM R-78E5.0-0.5 | ~90% | 0.27W | ~80 °C/W | 21 °C (Ideal) |
| AC-DC Module | Mean Well IRM-03-05 | ~78% | 0.70W | N/A (Enclosed) | ~15 °C (Best) |
As the table shows, the LM7805 will dissipate 13.5W. Multiplied by its 65°C/W thermal resistance, the junction temperature rises 877°C above ambient. It will hit its 150°C internal thermal shutdown limit in seconds, resulting in a controller that constantly reboots. Always use a switching buck converter or an isolated AC-DC module like the Mean Well IRM-03-05 for your Arduino's 5V rail.
Heatsink Selection and SSR Derating Curves
Heat pumps frequently use 24VAC for reversing valves and damper motors, but auxiliary strip heaters and some fan motors require switching 120V/240V AC at high currents. When using Solid State Relays (SSRs) like the Crydom D24 series, you must account for the forward voltage drop (VF) across the internal triac or SCRs.
Let's calculate the heatsink requirement for an SSR switching a 15A, 240V auxiliary strip heater:
- Forward Voltage (VF): ~1.2V (typical for AC SSRs)
- Power Dissipation (PD): 1.2V × 15A = 18W
- Max Ambient (TA): 45°C (mechanical room worst-case)
- Max SSR Case Temp (TC): 100°C (to maintain reliability)
- Case-to-Sink Resistance (RθCS): 0.5°C/W (using a quality silicone thermal pad)
We need to find the required Sink-to-Ambient thermal resistance (RθSA):
RθSA = ((TC - TA) / PD) - RθCS
RθSA = ((100 - 45) / 18) - 0.5 = 3.05 - 0.5 = 2.55°C/W
You must select a heatsink rated for 2.55°C/W or lower. A real-world part that fits this requirement is the Aavid Thermalloy 530702B02500G, which provides a thermal resistance of roughly 2.5°C/W in natural convection. If your enclosure restricts airflow, you must drop to a larger extrusion or add forced air.
Enclosure Airflow and Thermal Failure Signatures
Even with correctly sized component heatsinks, the microclimate inside your controller enclosure can defeat your thermal design. Heat pump controllers are typically housed in NEMA 1 (indoor, dust-light) or NEMA 12 (dust-tight) enclosures mounted near the air handler. A sealed NEMA 12 enclosure acts as an oven, trapping the 18W+ of heat generated by your SSRs and power supplies.
What Airflow and Enclosure Changes Buy You
Thermal resistance drops dramatically when you move from natural convection to forced convection. Adding a single 40mm, 12V DC ball-bearing fan (like a Noctua NF-A4x10) blowing across your SSR heatsinks can reduce the RθSA by 50% to 70%. This allows you to use smaller, cheaper heatsinks while maintaining a lower TC.
If you cannot use a fan, you must vent the enclosure. Install louvered vents at the bottom of the enclosure and screened vents at the top. This creates a passive chimney effect, drawing cool air from the room across the heatsinks and exhausting it out the top. Ensure the vents are fitted with fine mesh to prevent wasps and rodents from nesting on your PCB.
Failure Signatures of Thermal Stress
When your Arduino heat pump controller begins to overheat, it rarely fails silently. Recognizing these signatures early can prevent a locked-out compressor in the dead of winter:
- ESP32 WiFi Dropping: The ESP32's RF power amplifier generates significant heat during transmission. If the board's ambient temperature exceeds 85°C, the internal thermal throttling kicks in, reducing TX power and causing MQTT disconnects or dropped web sockets.
- Microcontroller Brownouts and I2C Lockups: As the 5V or 3.3V voltage regulators overheat, their output voltage sags. This causes the Arduino to brown out, or causes I2C temperature sensors (like the BME280) to pull the SDA line low and lock the bus, requiring a hard power cycle.
- SSR Latching (Failing Short): This is the most dangerous failure mode. If an AC SSR exceeds its maximum junction temperature, the silicon wafer can melt internally, causing the triac to fail in a closed (shorted) state. The load will remain energized even when the Arduino GPIO pin goes LOW.
To mitigate the SSR latching hazard, never rely solely on an SSR to break a high-power compressor or heater circuit. Always wire a mechanical contactor in series with the SSR. The Arduino triggers the SSR for zero-crossing, silent switching (preventing contactor chatter and EMI), and the SSR subsequently energizes the mechanical contactor's coil. If the SSR fails short, the mechanical contactor's physical air gap will still break the circuit when the thermostat calls for off, ensuring NFPA 70 (NEC) safety compliance and preventing a runaway heater.
By calculating your RθJA paths, selecting switching power supplies over linear regulators, and sizing your heatsinks based on worst-case mechanical room temperatures, your Arduino heat pump controller will operate reliably for years without thermal throttling or silicon degradation.






