Email us

Este artículo está en inglés. Ver el sitio en español

Cet article est en anglais. Voir le site en français

Dieser Artikel ist auf Englisch. Website auf Deutsch ansehen

Este artigo está em inglês. Ver o site em português

PTC heater enclosure won't hold temperature with PID

Control a PTC heater with time-proportional on/off switching: let the PID set a duty cycle, apply it over a fixed 15-30 s period through a zero-cross SSR, and sample the DHT22 no faster than its 2 s cadence. With a heater roughly four times the holding heat loss, a sealed box holds its setpoint within ±0.5 °C.

NEMA4 Enclosure engineering team · Published November 8, 2026 · 7 min read

Short answer: keep the PID, drop the PWM. Let the PID output command a duty cycle, apply it over a fixed 20 s period through a zero-cross SSR, keep the cycle between 15 and 30 s, and size the heater at roughly four times the heat the box loses at setpoint. A 100 W PTC heater in a small sealed stainless box that loses 26 W at 37 °C settles near 26% duty and holds its reading within ±0.5 °C. Fast PWM fails here because a PTC's resistance climbs as its ceramic warms: chopping the supply at sub-second speed cannot steer the power, and the DHT22 feeding the loop delivers a new value only every 2 s. Change the control method first; then tune.

Symptoms and what each one points to

Read the temperature trace and the output duty side by side; each failure pattern names its own cause.

  • Rises past setpoint, sags back, repeats every few minutes. A PTC's loop gain changes sharply near its regulating temperature, so gains that behaved on a cold box oscillate at setpoint.
  • Reaches setpoint, then sinks however high the output sits. The element's regulating temperature is too close to the box setpoint, leaving almost no power to deliver.
  • Output pinned near 100% and the box never arrives. The heater is smaller than the box's heat loss at that ambient; the worked example below shows the arithmetic.
  • Reading steps visibly every couple of seconds. That is the sensor: a DHT22 returns a new value at most every 2 s, and a D term turns those steps into output chatter.
  • Overshoot right after the output drops to zero. Heat stored in the ceramic keeps flowing after switch-off; a longer cycle period and a smaller integral term absorb it.

For a board-level PTC rather than a box heater, the selection points differ — see the PCB mounted PTC enclosure article.

Why PWM cannot steer a PTC heater

A switching-type PTC element has a resistance curve that dips slightly as it warms, then climbs steeply above its switch point. That steep rise is what makes the element self-regulating: heater power is V²/R, so past the switch point each kelvin of ceramic temperature cuts the power hard. Three consequences break a fast loop.

At PWM speed, duty barely matters. The ceramic's temperature moves over tens of seconds, so a chop of hundreds of hertz changes nothing within one pulse; the element settles wherever its own curve puts it. Near the switch point the plant's gain also swings hard, so gains tuned at 30 °C misbehave at 37 °C. And the loop's information is slow: the DHT22 updates at most every 2 s, and its slotted housing lags the surrounding air by tens of seconds in still air. With minutes of combined lag, any aggressive Kp rings.

Heat also keeps flowing after switch-off, because the element runs hotter than the air it heats. That stored heat is why ovens, incubators and cabinet heaters all cycle slowly: a period far longer than the sensor lag but far shorter than the box's cooling time makes the delivered power smooth. Commercial PID controllers driving resistive heaters through SSRs typically cycle at 15-30 s; that range is the default most controller manuals ship with.

For an AC heater, use a zero-crossing SSR: resistive loads under time-proportional control are exactly its job, every switch lands near a voltage zero, and switching hash stays off nearby electronics. A 24 V DC element needs only a plain DC SSR; the cycling logic is identical.

Checks before you re-tune

Each check takes minutes and tells you which cause you have.

  1. Log temperature and duty together, one line per 2 s, for an hour. An oscillation period of minutes points at stored heat plus integral action; a period of seconds points at a D term fighting quantized readings.
  2. Read the element datasheet. Note the regulating (switch) temperature and the rated power at your supply voltage. Keep at least 40 K between the regulating temperature and the box setpoint — a workable margin, because the steep part of the curve eats the output first. A 40 °C element on a 37 °C box has 3 K and collapses at setpoint.
  3. Compute the holding loss from the measured duty: loss (W) = duty (%) × heater rating (W) / 100. At 26% on a 100 W element, the box loses 26 W at setpoint — the same number the wall calculation predicts in the worked example. The duty-cycle method and its arithmetic are in the heat loss from heater duty cycle article.
  4. Watch the cool-down tail after switch-off. If the reading keeps climbing for more than 30 s, stored heat dominates and the integral term must stay small.

Sensor placement decides half the outcome: mount the DHT22 mid-height, out of the heater's plume, where air moves. The placement rules are in the ambient temperature measurement article.

The fix: a 20 s time-proportional cycle

  1. Turn hardware PWM off. Take the PID output, 0-100%, and convert it to on-time: on-time (s) = duty (%) × period (s) / 100. Start with a 20 s period.
  2. Switch at zero crossings and size the SSR with margin. Rate the SSR at twice the heater's hot running current; SSR datasheets derate their current above about 40 °C ambient. A 100 W, 24 V element draws 4.2 A, so a 10 A unit carries it.
  3. Update the PID once per new sensor reading, every 2 s, and recompute the duty then. Nothing useful happens between readings.
  4. Retune in this order. Raise Kp until a cold box just rings, then back off. Keep Kd at zero — a D term on ±0.5 °C steps arriving every 2 s amplifies noise, not motion. Add Ki last and small, with the integral clamped near the steady-state duty so a door opening cannot wind it up.
  5. Verify with a one-hour hold. The trace stays within ±0.5 °C of setpoint and the average duty sits within a few percent of the loss calculation's prediction.

While the box is still cold, long holds waste ramp time; the fast-heating controller notes show why one-minute steps, not holds, suit the warm-up phase.

Worked example: 26 W holding loss, 26% duty

Assume a sealed 304 stainless box, 12 x 12 x 8 in (300 x 300 x 200 mm), setpoint 37 °C, ambient 20 °C, heated by a 100 W 24 V PTC. Stainless walls pass heat at k = 3.7 W/m²K, the value this site's guides use.

  • Surface area: A = 2 × (0.30 × 0.30) + 4 × (0.30 × 0.20) = 0.42 m².
  • Holding loss: Q = 3.7 W/m²K × 0.42 m² × 17 K = 26 W.
  • Steady duty: 26 W / 100 W = 26%, which is 5.2 s on and 14.8 s off in every 20 s period.
  • SSR rating: I = 100 W / 24 V = 4.2 A; a 10 A unit gives the 2x margin.
  • Warm-up: take 5,000 J/K of effective thermal mass for the shell, rail and a light load — an illustrative figure, so weigh your own box and contents if the ramp matters. Full duty delivers 100 - 26 = 74 W of surplus, and 17 K × 5,000 J/K ÷ 74 W ≈ 1,150 s, about 20 minutes to setpoint.

Pick the element so its regulating temperature sits well above the process: for a 37 °C box, a PTC rated 100-130 °C keeps 63-93 K of margin, comfortably past the 40 K rule. When the loop settles, compare the measured duty with the 26% prediction. A large gap means the loss model or the sensor placement is off — fix that before tuning again.

Keeping it stable through the year

Ambient moves the duty faster than any retune. The table reworks the example box at a 37 °C setpoint.

Ambient Loss at setpoint Duty on the 100 W PTC On-time per 20 s
20 °C 26 W 26% 5.2 s
0 °C 57.5 W 57.5% 11.5 s
-10 °C 73 W 73% 14.6 s

At -10 °C the 100 W element still holds, at 73% duty; below that, step to a 150 W PTC, which brings the same ambient back to 49% duty. Read the table's logic rather than the exact watts: colder ambient, longer on-time, and the heater runs out of headroom as duty approaches 100%.

  • Move the sensor to mid-height in the return airflow, away from the heater plume and the door seal, and give the slotted DHT22 housing moving air.
  • A small internal circulation fan evens out hot pockets and cuts the sensor's lag; as the internal fans in a sealed enclosure article shows, fans inside a sealed box move heat around and remove none of it.
  • When the season turns, re-log one hour and read the new duty; the trend tracks the box's loss without any calculation.

If the heater's real job is dew-point control in a sealed outdoor box rather than a process temperature, the same 20 s cycle drives an anti-condensation PTC; its sizing method lives in the anti-condensation heater article.

When to re-specify the enclosure

Control fixes a control problem; these are box problems.

  • Duty above 70% at your coldest normal ambient, or warm-up that outlasts the shift: add heater watts, insulate the shell, or pick a smaller box, since the loss scales with wall area.
  • Condensation, not process temperature, is the real load: size the heater to the dew-point margin instead, as the condensation control strategy for humidity sensors sets out.
  • The enclosure itself leaks heat through air exchange — a tired door gasket defeats the wall arithmetic. Our sealed stainless boxes are rated NEMA 4X / IP66 by the manufacturer; not UL listed, and an HMI housing adds an IP65-type front seal with the display installed, manufacturer rated.
  • You are starting a new sealed box from scratch: inside dimensions, backplate clearance and module count go into the enclosure selector, which hands you a shortlist or a quote-ready set of numbers.

Catalog dimensions to compare

Compare these catalog dimensions with your component layout. Open each enclosure for its rating, material and usable space, then check those specifications against your application.

EnclosureMaterialOutside H x W x D / displayRating
16 × 12 × 8 in304 stainless16 x 12 x 8 inRated NEMA 4X / IP66 by the manufacturer; not UL listed
24 × 20 × 8 in304 stainless24 x 20 x 8 inRated NEMA 4X / IP66 by the manufacturer; not UL listed
30 × 24 × 10 in304 stainless30 x 24 x 10 inRated NEMA 4X / IP66 by the manufacturer; not UL listed
12 × 10 × 6 in304 stainless12 x 10 x 6 inRated NEMA 4X / IP66 by the manufacturer; not UL listed

Questions

What cycle time suits a PTC heater switched by an SSR?

Start at 20 s and stay within 15-30 s. A 20 s period spans 1,200 supply cycles at 60 Hz (1,000 at 50 Hz), so a zero-cross SSR lands close to a voltage zero on every switch. Lengthen toward 30 s when the trace oscillates; shorten only when warm-up feels sluggish.

Does duty cycling a PTC heater waste the startup power over and over?

Almost none of it. Cold ceramic means low resistance, so the first start pulls several times rated current — the heater datasheet's inrush figure says by how much. Between cycles the element cools only a few kelvin during a 15 s off period, so restarts draw near rated power and 20 s cycling adds little loss.

How tightly can a DHT22 hold a setpoint?

Hold the reading within ±0.5 °C, one sensor-accuracy band: the DHT22 is specified at ±0.5 °C and returns a value every 2 s at most. True air temperature can differ by that band, so add a second calibrated sensor where the process needs proof rather than control.

What PTC regulating temperature suits a 37 °C incubator box?

An element rated about 100-130 °C. That keeps 63-93 K above the setpoint, past the 40 K margin, so the heater still delivers near-rated watts at 37 °C. A 40 °C-regulating element holds only 3 K of margin, and its output collapses exactly when the duty cycle climbs.

Checklist before you order

Specify it once, built to your drawing

  • Environment and NEMA type: Type 1, Type 3R, Type 4, Type 4X, Type 6P, Type 12, Type 13 (manufacturer ratings, not UL listed)
  • Material: 304 stainless steel, 316L stainless steel, Powder-coated carbon steel, Aluminum, Polycarbonate, Fiberglass (FRP)
  • Size: inside or outside height, width and depth, with the depth your deepest component needs
  • Cutouts, glands and windows, dimensioned from one datum on each face
  • Mounting and access: wall, pole or stand, hinge side, mounting panel
  • Quantity: from one piece

Delivered in 10 business days, anywhere in the world. Counted from your order; for custom work, from your approval of the drawing.

Build it from 16 × 12 × 8 inRequest a custom quote

Check the heat load in the calculator · Outdoor enclosures: sizes for this job

Keep reading

More on outdoor, heat and moisture

All articles

Buying guides

The guides behind this answer

All guides