Automating Shop Dust Collection Blast Gates with ESP32: Tool-Sensing Auto-Switching Between Machines
- ESP32 DevKit development board
- SCT-013 non-invasive current transformer clamp sensors (100A, one per machine)
- Burden resistor kit or pre-wired CT sensor board
- MG996R or similar high-torque servo motors (one per blast gate)
- PCA9685 16-channel PWM servo driver board
- 5V 10A power supply for servo bank
- Plastic blast gates, 4 inch (one per machine drop)
- Project enclosure box, ABS
- Hookup wire and connector kit
- 3D printer filament for gate actuator brackets
- Zip ties and adhesive mounts
This site's existing guide to ducting and blast gates covers how to size pipe and gates for good static pressure across a multi-machine shop, but it assumes you're opening and closing gates by hand every time you switch machines — which, in practice, most shops stop doing consistently within a few weeks. This project replaces manual gates with servo-actuated ones that open automatically when a tool draws power and close everything else, so your dust collector's full suction always goes to whichever machine is actually running, without you touching a lever.
How It Works
The core idea is simple: a current transformer (CT) clamp sensor around each machine's power cord detects when that machine is drawing current, an ESP32 reads all the CT sensors continuously, and when it sees a machine's current cross a threshold (distinguishing "running" from "idle standby" — important for machines like table saws with soft-start electronics that draw a small standby current even when off), it commands that machine's blast gate servo to open and every other gate to close. The dust collector itself can either run continuously with this system, or you can add a relay to switch the collector on with the first active machine and off a few seconds after the last one stops, which saves real electricity and filter life in a shop where machines run intermittently.
Wiring Overview
Each machine gets one CT clamp sensor, installed by clamping it around one conductor of that machine's power cord (not both conductors together — a CT clamp measures the magnetic field from current flow, and clamping both hot and neutral together cancels the field to zero). The CT sensors output a small AC voltage proportional to current, which needs a burden resistor to convert to a voltage the ESP32's ADC can read, and typically a simple rectifier/smoothing stage or the ESP32's ADC sampled fast enough to catch the AC waveform's peaks. Pre-wired CT sensor boards (widely sold for solar/energy-monitoring projects) already include the burden resistor and often a bias network to center the output within the ADC's 0-3.3V range, which saves a fair amount of circuit debugging versus building the analog front end from scratch.
The PCA9685 servo driver connects to the ESP32 over I2C (SDA/SCL, typically GPIO21/22 on a standard ESP32 DevKit) and handles PWM generation for up to 16 servos, which is more channels than most shops need but leaves headroom for adding gates later. Servos need their own dedicated 5V supply sized for the total stall current of however many gates might move simultaneously — a single MG996R can draw over 1A under load, so a shop with four or five gates needs a supply rated well above what the ESP32's own 5V regulator can provide; never power servos from the ESP32's onboard regulator.
ComponentConnectionNotes CT sensors (per machine)ESP32 ADC pins (via voltage divider/bias circuit)One CT per machine circuit; ESP32 has multiple ADC-capable GPIOs (e.g. GPIO32-39 on the standard DevKit) PCA9685 driverI2C (GPIO21 SDA, GPIO22 SCL)Shared bus; address configurable via solder jumpers if you ever add a second board ServosPCA9685 PWM outputs, separate 5V supplyCommon ground between ESP32, PCA9685, and servo supply is required Dust collector relay (optional)ESP32 GPIO via relay module or SSRUse a relay rated for the collector motor's inrush current, not just running currentBuilding the Gate Actuators
Most plastic blast gates use a sliding plate rather than a rotating damper, which means a servo needs a simple crank-arm-to-slider linkage rather than a direct coupling. A 3D-printed bracket that clamps to the gate body and holds the servo with its horn connected to the slider via a short link arm works well — design the crank arm's throw to match the gate's full travel at the servo's usable rotation range (most hobby servos give a reliable 0-180°, but many blast gates only need 60-90° of arm rotation to fully open, so gear the linkage for that shorter, more precise range rather than using the servo's full sweep). Print brackets in PETG or ABS rather than PLA, since dust collection ductwork in an unheated garage or shed can see enough temperature swing over a year to make PLA parts brittle over time.
Firmware Logic
The ESP32 firmware loop is straightforward: sample each CT sensor's ADC value repeatedly over a short window (RMS current from an AC waveform needs multiple samples per cycle, not a single reading), compare the computed current against a per-machine threshold set above its idle/standby draw but below its running draw, and drive the servo bank accordingly. Add a short debounce/hold time (2-5 seconds) before closing a gate after current drops, so a momentary pause in cutting (repositioning stock on a table saw, for instance) doesn't slam the gate shut and reopen it seconds later. For shops running Home Assistant already (see this site's Home Assistant on Raspberry Pi guide), publish each machine's detected state over MQTT so you get a dashboard showing which tool is "active" at a glance, and can override any gate manually from the dashboard for maintenance or unusual setups like running two dust-producing tools at once.
Safety and Reliability Notes
- CT clamps are non-contact but still mains-adjacent: install them on de-energized circuits, dress wiring so the clamp cable can't be snagged or pulled into a moving machine, and never open a CT clamp's core while current is flowing through an enclosed loop on the primary side of a current transformer used elsewhere in the system (not applicable to simple clamp-on CTs, but worth knowing if you later add split-core CTs on a sub-panel).
- Fail-safe default: write the firmware so a sensor fault, Wi-Fi drop, or unexpected reset leaves gates in their last commanded position rather than forcing them shut (which would starve the collector's impeller if it's mid-cycle) or wide open (which would tank suction everywhere). A brief local timeout that holds position and flags an error over MQTT is safer than any automatic "fix" the firmware might attempt blind.
- Don't rely on this for combustible dust safety: this system optimizes suction distribution; it is not a substitute for proper grounding/bonding of ductwork or the general combustible-dust precautions covered in this site's dust explosion hazards guide.
- Manual override: keep physical access to each gate for manual operation if the electronics fail, and consider a simple "all gates open" fallback switch for troubleshooting.
Once tuned, this kind of system is one of those shop upgrades you stop noticing because it just works: walk up to the table saw, start cutting, and the collector is already pulling from the right gate before the blade finishes spinning up. The CT-sensing approach also scales cleanly — adding a sixth or seventh machine later is just another sensor input and another servo channel on the same PCA9685 board, not a rewire of the whole system.