Intro: X-Carve Extensions for Safety
Since the X-Carve lives in my classroom, it is important that I have lots of safety features surrounding it so that students can use it. In this project I have added some automation to the dust collection system and emergency stop both manual and automated.
The dust collection system turns on automatically when the X-Carve turns on the router and turns off automatically when the job is finished. (This is particularly advantageous on very long carving jobs!)
Also, I added an Emergency Stop button to the powerstrip that the X-Carve is plugged into, and a software controlled relay Emergency Stop which is triggered by a smoke detector. (Again, for if something goes horribly wrong on one of those crazy long carving jobs, and you aren't watching it).
Step 1: Connecting to the Dust Collector
$10 wireless remote outlet switch from Home Depot on the Dust Collector. The Key-fob style switch was what I was looking for for this project.
Step 2: Wire the Buttons to a Pair of Relays
I was surprised to find that the wireless dongle uses a 12V battery inside! This means to trigger the switches I needed to use a relay attached to the arduino. I used a two-channel relay block from Amazon.
Wire each switch on the dongle to one of the relay channels. Make sure to bridge the opposite sides of the switch. These are standard push-button switches.
The activation of the switch involves pressing the button and then releasing it. I found that for this dongle, I needed to hold the button down for at least 1 second, and even then it doesn't always work even though the wireless transmission is only about 5ft. (What can you expect from a $10 experiment). I programmed the relays to press the button 4 times in a row just to be sure--1sec on, 1 sec off, repeat 4 times.
Step 3: Power Wiring With Emergency Stop.
Wired two emergency stop features into the main power strip for the machine. One manual Big Red Button and one software controlled Relay.
The solid state relay is rated for 25A, which is more than I will ever be pulling through this system. The current required to keep the relay open though is slightly more than the arduino can power on its own, so there is a second relay connected to the arduino to switch this relay on (I found that amusing). The power source for this big relay is a 1200mAh 2S lipo battery normally used for R/C toys. It will eventually need recharging...
Step 4: Smoke/Gas Sensor
Mounted the gas sensor on the wall directly behind the X-Carve. If something goes wrong and the machine starts burning material instead of cutting, this smoke/gas sensor will trigger the Emergency Stop. This requires some calibrating to the level right and will likely depend on your sensor and general environment.
The sensor connects right back to an analog channel on the Arduino and gives a very easy to use value. Higher reading on the analog pin means higher concentration of bad stuff in the air. If that concentration is above the defined threshold, then E-Stop the machine.
The E-Stop can only be reset manually (another safety feature, and also requires no extra programming).
Step 5: The Arduino
Code is uploaded here. Connect Pin 2 to the YELLOW wire on your X-Carve's spindle control. You'll also need to connect the ground between this arduino and the arduino in the X-Carve as well. This is important because the relative voltages between the yellow wire and your pin 2 need to match.
Currently this arduino is powered by just a wall-wart (not connected to the E-STOP power strip!).