Actuators, Drives & Embedded State Machines
Driving the smoker's heater and organizing its behavior: why a solid-state relay switches the element fully on or off, time-proportioning to get any average power (0.7 s on in every 2 s window is 35 percent), zero-cross switching, the same idea as PWM for a DC blower motor on a charcoal smoker, and a state machine (off, preheat, hold, done, fault) where every state has an exit and every fault ends with the element off: open probe, chamber over 300 °F, or full power for 20 minutes with no rise.
- 4 min
- 6 steps
- 3 questions
- Lesson 52 of 78
In this lesson
- Switching a heater
- Time-proportioning
- The same idea for motors
- The states
- Faults
- What to take from this
Picking up where you left off.
Switching a heater
The smoker’s actuator is a resistance element: give it 120 V and it makes 1,500 W of heat. It can’t be “half on” through a simple switch, and dimming it with a big resistor would just waste power as heat in the resistor. Instead, a solid-state relay switches the element fully on or fully off from a low-voltage signal, with no moving contacts to wear out.
A zero-crossing SSR waits for the AC voltage to pass through zero before turning on, so the element switches on gently without a burst of electrical noise each time, which helps the thermocouple’s microvolts from the last two lessons.
Time-proportioning
To get partial power from an on-off switch, turn it on for part of a fixed window. With a 2-second window:
- 100 percent: on the whole 2 s;
- 35 percent: on 0.7 s, off 1.3 s;
- 0 percent: off.
The smoker’s thermal mass is huge compared to 2 seconds (its time constant is around 25 minutes), so the chamber only “sees” the average power. The PID’s output, 0 to 100 percent, becomes the fraction of each window the element is on. Industrial temperature controllers drive heaters the same way.
Quick check
35 percent of 2 seconds; the smoker’s slow response averages it smoothly.
The same idea for motors
A charcoal smoker controls heat differently: a small DC blower feeds air to the coals, and more air means more heat. The controller drives the fan with pulse-width modulation (PWM), the same on-off averaging but switched thousands of times a second so the motor just sees an average voltage and runs at a steady partial speed. The control logic, states, and tuning in the rest of the course are the same; only the actuator and its time constants change.
Playback is optional. If the player is unavailable, open the video at its source.
The states
A controller that only runs a PID loop handles the easy case and nothing else. Write the whole behavior as a state machine:
- OFF: element off; waiting for start.
- PREHEAT: element at full power until the chamber is within 20 °F of setpoint. Starting the PID far from setpoint would just saturate it at 100 percent while its integral term winds up; lesson 6 shows the overshoot that causes.
- HOLD: the PID drives the element through time-proportioning. Watch the meat probe.
- DONE: the meat probe reached its target (160 °F inside for bacon smoked at 225–250 °F 1); drop to a low warm-hold setpoint and signal.
- FAULT: element off, alarm on, stay there until someone resets it.
Every state needs a timeout and an exit. PREHEAT that never reaches setpoint isn’t a state, it’s a stuck controller.
Quick check
The tuning lesson shows windup pushing the temperature near 290 °F without it.
Faults
Any state can fall into FAULT. Decide the triggers in advance:
- Probe open or shorted: the converter flags it (lesson 2).
- Chamber over 300 °F: something is wrong; the independent high-limit thermostat (lesson 1) is the backup if this check fails too.
- No rise: 20 minutes at full power with no temperature increase means a dead element, a failed relay, or a probe that has fallen out and is reading the outside air. Turning the heat up is the wrong response to all three.
- Lid open: a sudden 30-degree drop. That’s not a fault, but the controller should freeze its integral term until the temperature recovers (lesson 6), or it will overshoot when the door closes.
Quick check
No rise at full power means something is broken, and a probe that fell out reads cold.
What to take from this
An SSR switches the element fully on or off; time-proportioning (0.7 s on per 2 s window = 35 percent) gives any average power because the smoker’s response is slow. Zero-cross switching keeps noise down; PWM does the same for a blower motor. Organize the controller as states (off, preheat, hold, done, fault), give each an exit, and make every fault end with the element off: open probe, over 300 °F, or no rise at full power.
Lesson complete
Nice work.
Sources for this lesson
- 1Joy Waite-Cusic, Jared Hibbard-Swanson. Making Cured Bacon at Home (PNW 784). Oregon State University Extension. 2025. verifiedDry cure or wet brine; Prague Powder #1 is 6.25 percent sodium nitrite and 93.75 percent salt, dyed pink and not the same as Himalayan pink salt; 1 teaspoon per 5 pounds of meat; dry-cured bacon is capped at 200 ppm nitrite commercially; Cure #2 not recommended for bacon (nitrosamines at high heat); cure 5-7 days at 40 F, flipping daily; smoke at 225-250 F to 160 F internal; refrigerate up to 7 days, freeze within 4 months.
Further reading
- Tony R. Kuphaldt. Lessons in Industrial Instrumentation (ch. 21 Continuous Temperature Measurement; ch. 29 Closed-Loop Control; ch. 30 Process Dynamics and PID Controller Tuning). ibiblio.org (Creative Commons Attribution 4.0). verifiedThermocouples: two dissimilar metals produce a temperature-dependent voltage; the junction at the instrument terminals is an unavoidable reference (cold) junction whose voltage must be compensated (example: a type K reading 14.30 mV with terminals at 73 F, which corresponds to 0.910 mV on the NIST ITS-90 table, means a tip voltage of 15.21 mV). Grounded-tip thermocouples respond faster but invite ground loops, so most industrial ones are ungrounded; exposed tips are fastest. The most common failure is open circuit (burnout); with high-impedance inputs an open thermocouple picks up noise from power lines and drives, so instruments need burnout detection. RTDs: platinum, alpha 0.00392, R = R0[1 + alpha(T - T0)]. Process dynamics: know the process before tuning; self-regulating, integrating, and runaway processes need different tuning; dead time (no response at all for a time) is far worse for feedback control than lag. Open-loop (manual) step test: measure dead time L and reaction rate R (max slope, percent per minute) for a step of size delta m; Ziegler-Nichols open-loop: P only Kp = delta m/(R L); PI Kp = 0.9 delta m/(R L), integral time 3.33 L; PID Kp = 1.2 delta m/(R L), integral 2 L, derivative 0.5 L; these are starting points only. Practical controller features: reset (integral) windup when the PV can't reach setpoint no matter how far the output is driven, output limits, manual/automatic modes and output tracking.