Tuesday, November 27, 2018

Automated Woodshop Dust Collection

tl;dr: You can see a quick demo of the second version, here:



Long Story:
A few years ago I built a basic shopvac controller, quickly followed up by a less dangerous and better version, similar to the iVac and found it really useful.  I was too lazy to turn the shopvac on for quick cuts, but almost always regretted it after, so automating my laziness was really convenient.  Last year a buddy got a 240v dust collector and I suggested we automate it, similar to I Like to Make Stuff's DIY solution for shopvacs.  I'd never designed my own PCB, so I decided this would be a good chance to try it out.  So I started with a requirements list:
  1. Control a 13amp 240v dust collector
  2. Automatically open/close blast gates of 4 or 6" size
  3. Support 120 and 240v tools.
  4. Support detecting current in-line, or by attaching a sensor to an extension cord.
  5. Have an override switch so you can force the gate open and DC on for repeated cuts
  6. Know when the bin on the dust collector is full.  It has a window you can peer through.
  7. Wireless communication between the sensors.  Because we can.

For my first iteration I designed a basic shield for an arduino Nano, using Eagle's PCB software, and then had it printed using oshpark.com, but I wasn't sure how to control the dust collector.  In previous use cases I'd controlled the shopvac using a Songle 15 amp relay, but that wouldn't work for the 2x 13amp 120v hot leads in a 3 wire 240v system.  While reading through the dust collector manual I saw it was using a large contactor, which seemed to fit the bill, but I couldn't find any 5v contactors, so I ended up using a basic 5v relay to push 120v AC to drive the contactor.



Upon showing my shield to a different friend they laughed at me and told me to get an atmega, the brains of an arduino, and build my own board from scratch.  Over the course of 3 months I designed my first PCB, learned how to reflow solder, and assembled a dozen or so circuit boards across several different iterations (and 2-3 week lead times).  Here's the first "production" PCB.  I used screw terminals to connect wires, and found this to be a real pain during assembly.





















Next up was controlling the blast gates.  I'd seen similar ideas for mounting a servo to open and close a metal blast gate, so that's what I did, using a mg996r RC car servo.  Here's a demo of the gate opening/closing.  This is just a prototype of the servo and gate mounted to a sheet of scrap plywood.




You can see I have an outlet and switch in a double gang electrical box along with a 5v 2amp PSU, my circuit board, and a current transformer, which detects current running through the outlet.

Here's a full demo of the system on my kitchen counter.  This was was unplanned.  Pardon the obvious lack of a script :p

Here's what the inside of the master control box looks like. You'll find:
  1. My custom PCB
  2. 5v relay (similar, but not the exact same)
  3. 5v 2amp power supply (overkill for this controller)
  4. Double pole contactor, 40amp (overkill)
  5. 4 wire dryer cord, plugs in to the wall, and connects to the input side of the contactor.  
  6. 120v extension cord for powering the electronics, because the neutral is not connected in the 240v garage wiring.
  7. Finally, a 3 wire 12 gauge extension cord to connect to the dust collector.  This is connected to the output side of the contactor.  Because the dust collector uses a momentary switch we can't simply plug the dust collector in and leave it switched on.  So we read the schematic for the dust collector and wired ourselves directly to the motor, bypassing the built in controller.


The first test, and a mini demo of the first version, installed in his garage:


A year later I bought a dust collector for myself, and even though I only have one tool permanently connected to it, decided to build another controller.

With the first version I found the original screw terminals to be a pain, so I redesigned the PCB adding JST ZH connectors which proved to be much, much easier to work with.  Scroll up to the top for a demo of the latest version, using the newest PCB.  Here's a rendering of the PCB used in the demo video at the top.


For this version, for fun, and to learn how to write an Alexa skill, I added Alexa integration, so I could ask the echo in my garage to turn the dust collector on.  Because I am using an atmega with an nrf24l01 my PCB doesn't have the ability to talk to Amazon Web Services, so I used a Raspberry Pi.  The Pi talks to AWS, and drives the dust collector via the switch input on the controller, just like the manual switch on the tool.  Here's the second controller, installed in my garage.  Being the second one I've assembled the wiring here is much cleaner.  Note: I have a 110v DC, so I wired the load and neutral through the contactor to make wiring a bit easier.  I was lacking white 22gauge wire so forgive me for using black and red.


The next version of the PCB adds an I2C header for more intelligent communication with the Pi, and removes the screw terminal headers.


Because why not? :)