AI and I Suck
ESP32 Vacuum Sealer Controller
Replacing a failed vacuum sealer control board with closed-loop pressure control and WiFi parameter adjustment.
Overview
When the control board failed on a commercial vacuum sealer, the distributor was unable to provide a replacement board, leaving the choice between replacing the entire unit or building a new controller from scratch. Building from scratch won. The result is an ESP32-based system with a pressure sensor for closed-loop vacuum control, a state machine for precise cycle management, an OLED display for at-a-glance status, and a WiFi web interface for parameter adjustment from a phone — no app required.
The original board had no pressure sensor — it relied purely on timed sequences with no feedback. The new controller monitors actual chamber pressure and moves through each stage of the sealing cycle only when the correct conditions are met, producing more consistent and reliable seals.
How the Machine Works
Understanding the original machine's pneumatics was the most interesting part of this project. The vacuum sealer uses a clever differential pressure mechanism for the sealing bar clamp that requires no motor or dedicated actuator.
The sealing chamber contains a rubber bladder connected to the chamber via a solenoid valve (Valve 1). When the chamber is pumped down, the bladder evacuates along with everything else, so no clamping force is generated — the sealing bar stays up and the bag mouth is free to evacuate fully. When Valve 1 is de-energized, atmospheric air rushes into the bladder through the normally-closed valve. The pressure differential between the atmospheric-pressure bladder and the evacuated chamber pushes the sealing bar down firmly onto the bag, clamping it in place for the heat seal.
A second solenoid (Valve 2) vents the chamber back to atmosphere at the end of the cycle. As the chamber pressure returns to atmospheric, the differential disappears and the sealing bar lifts automatically.
Both solenoids are 120VAC normally-closed type, meaning they require power to open. This means the safe default state (power off) has both valves closed — the chamber stays sealed and the bladder stays connected to the chamber. The relay contacts switch the mains voltage directly to the solenoid coils.
Cycle Sequence
The controller implements a state machine with the following sequence:
Step |
State |
Action |
1 |
EVACUATING |
Valve 1 energizes (seals chamber), pump starts, pressure monitored until target vacuum reached. Fault if pump timeout exceeded. |
2 |
DWELL |
Pump holds vacuum for dwell time. Allows offgassing to settle before sealing. |
3 |
CLAMPING |
Valve 1 de-energizes. Atmospheric air enters bladder, differential pressure clamps sealing bar onto bag. Short settle delay. |
4 |
SEALING |
Heater bar energizes for seal time. Bag sealed under full vacuum. |
5 |
COOLING |
Heater off. Bar stays clamped, weld solidifies under pressure. |
6 |
VENTING |
Pump off. Valve 2 energizes for vent time, releasing chamber vacuum. Bar lifts as pressure equalizes. Bag collapses tightly around contents. |
7 |
IDLE |
Cycle complete. Ready for next bag. |
Hardware
The controller is built around an ESP32-DEVKITV1 module. The choice of ESP32 gives built-in WiFi for the web interface, two hardware I2C buses, and plenty of GPIO for all the outputs required.
Parts List
Component |
Description |
ESP32-DEVKITV1 |
Main controller, WiFi, runs firmware |
Adafruit MPRLS |
Absolute pressure sensor, 0-170 kPa, I2C (Adafruit #3965) |
SSD1306 OLED |
0.96" 128x64 I2C display for status readout |
4-Channel Relay Module |
5V opto-isolated, active LOW, switches... |
Greg Nuspel