Project Overview
This project creates an automatic dust collection system for your workshop. When you approach a power tool (table saw, miter saw, router table), a PIR sensor detects your presence and turns on the dust collector. After you leave, the system runs for a short delay to clear remaining dust, then shuts off automatically.
Difficulty: Intermediate
Estimated time: 2-3 hours
Estimated cost: $25-35
How It Works
A PIR sensor mounted near each power tool detects when you approach. When motion is detected, the ESP32 activates a relay that turns on the dust collector. A timer keeps the collector running for 30-60 seconds after the last motion to clear residual dust. Multiple sensors can be connected to control a single dust collector from multiple tools.
Materials Needed
- ESP32 or Arduino (1)
- HC-SR501 PIR sensors (1-4, depending on number of tools)
- Relay module (5V, rated for dust collector motor current)
- Power supply (5V 2A)
- Jumper wires
- Project enclosure
- Wire and conduit (for sensor wiring)
Circuit Diagram
Connection Table
| Component |
Pin |
ESP32 Pin |
PIR Sensor 1 (Table Saw) |
OUT
| GPIO 4
| PIR Sensor 2 (Miter Saw) |
OUT
| GPIO 5
| PIR Sensor 3 (Router) |
OUT
| GPIO 6
| Relay Module |
IN
| GPIO 7
| Status LED |
Anode
| GPIO 2
|
表
Arduino Code
// Automatic Dust Collection System
const int numSensors = 3;
const int sensorPins[] = {4, 5, 6}; // Table Saw, Miter Saw, Router
const int relayPin = 7;
const int ledPin = 2;
unsigned long lastMotionTime = 0;
const unsigned long runAfterDelay = 60000; // 60 seconds after last motion
bool dustCollectorOn = false;
void setup() {
Serial.begin(115200);
for (int i = 0; i < numSensors; i++) {
pinMode(sensorPins[i], INPUT);
}
pinMode(relayPin, OUTPUT);
pinMode(ledPin, OUTPUT);
digitalWrite(relayPin, LOW);
digitalWrite(ledPin, LOW);
Serial.println("Dust Collection System Ready");
delay(60000); // PIR warm-up
}
void turnOnDustCollector() {
if (!dustCollectorOn) {
digitalWrite(relayPin, HIGH);
digitalWrite(ledPin, HIGH);
dustCollectorOn = true;
Serial.println("Dust collector ON");
}
}
void turnOffDustCollector() {
if (dustCollectorOn) {
digitalWrite(relayPin, LOW);
digitalWrite(ledPin, LOW);
dustCollectorOn = false;
Serial.println("Dust collector OFF");
}
}
void loop() {
bool anyMotion = false;
for (int i = 0; i < numSensors; i++) {
if (digitalRead(sensorPins[i]) == HIGH) {
anyMotion = true;
Serial.printf("Motion at sensor %d\n", i);
}
}
if (anyMotion) {
lastMotionTime = millis();
turnOnDustCollector();
}
if (dustCollectorOn && (millis() - lastMotionTime > runAfterDelay)) {
turnOffDustCollector();
}
delay(100);
}
Enhanced Version with Tool-Specific Delays
// Tool-specific delays (seconds after last motion)
const unsigned long toolDelays[] = {60000, 45000, 30000}; // Table saw: 60s, Miter: 45s, Router: 30s
unsigned long lastSensorTime[3] = {0, 0, 0};
void loop() {
unsigned long now = millis();
bool anyMotion = false;
unsigned long latestMotion = 0;
for (int i = 0; i < numSensors; i++) {
if (digitalRead(sensorPins[i]) == HIGH) {
lastSensorTime[i] = now;
anyMotion = true;
if (lastSensorTime[i] > latestMotion) latestMotion = lastSensorTime[i];
}
}
if (anyMotion) {
turnOnDustCollector();
}
if (dustCollectorOn) {
// Check if all sensors have exceeded their delays
bool allIdle = true;
for (int i = 0; i < numSensors; i++) {
if (now - lastSensorTime[i] < toolDelays[i]) {
allIdle = false;
break;
}
}
if (allIdle) {
turnOffDustCollector();
}
}
delay(100);
}
Sensor Placement Tips
- Mount sensors at chest height (1.2-1.5m) near each tool.
- Aim sensors to detect operator, not just tool movement.
- Adjust sensitivity to avoid false triggers from dust or movement across the shop.
- For large tools, position sensor to cover the operator's work area.
Installation Steps
- Assemble main control box: Place ESP32 and relay in enclosure near dust collector.
- Run sensor wiring: Run 3-conductor wire from each sensor to control box.
- Mount sensors: Position near each power tool.
- Connect dust collector: Wire dust collector motor through relay (ensure relay is rated for motor current).
- Power up: Connect 5V power supply.
- Test: Approach each tool and verify collector turns on and runs appropriate delay.
Safety Notes
- Ensure dust collector has proper overload protection.
- Use appropriately rated relay (dust collectors can draw 10-15A at 120V).
- Consider adding a manual override switch for maintenance.
- Keep wiring away from moving parts and heat sources.
Project Extensions
- Wireless sensors: Use ESP-NOW for wireless sensors to avoid running cable.
- Current sensing: Add current transformer to detect when tool is actually running.
- Blast gates: Add servo-controlled blast gates to direct suction to the active tool.
- Air quality monitor: Add particulate sensor to automatically run collector when dust is detected.
- Smart home integration: Add Wi-Fi to monitor dust collector runtime and tool usage.
Troubleshooting
- Dust collector not turning on: Check relay wiring. Verify relay is rated for motor load.
- False triggers: Adjust PIR sensitivity. Avoid pointing sensors at windows or HVAC vents.
- Sensor not detecting: Check wiring. Adjust sensitivity upward. Ensure sensor has clear view of operator.
- Collector turns off too quickly: Increase
runAfterDelay value.
Conclusion
This automatic dust collection system makes woodworking cleaner and more convenient. It ensures the dust collector runs only when needed, saving energy and reducing noise in the shop.