Adding Spindle Power Control to the Shapeoko
While finishing my basement a couple of years ago I bought an additional CNC mill - the Shapeoko3 XXL. I have worked on some pretty neat projects, most of which take a little bit of time. One of the things lacking is the ability to start/stop the router.
My shops a mess right now, I'm always in a state of cleaning/dirtying. But, the good news is, the experiment worked! Bottom line up front, I can now send a command to start/stop the Dewalt router through gcode.
What did it take to get here? I'll give a rundown of the parts list and what they are all doing
- Shapeoko 3 (I have the XXL, but they all use the same motion controller)
- Dewalt Trim Router (I have the DWP611)
- an 'IoT Relay'
You'll also need some tools and supplies:
- Philips Screwdriver
- Wirestrippers
- Soldering Iron
- Flux
- Solder
- Wire
Once the wires were soldered to the controller board, I attached the positive end to the IoT relay + and the negative to the IoT relay - and plugged the router into the 'normally off' plug. After that, the only modification to the gcode was to ensure that the following lines are in there (M3 S10000 and M5):
%
(TOOL/MILL,0.1,0.05,0.000,0)
(FILENAME: )
()
G21
G90
G0X0.000Y0.000Z5.000
(TOOL/MILL,12.7000,0,1.0000,0.0)
M6 T10
M3 S10000
....
G0Z5.000
G0Z5.000
G0Z5.000
M5
M30
(END)
Note that I put the M3 right after the tool change. Additionally, it was originally set to a spindle speed of 6100 or so, but since there is no spindle control, the S10000 sends the full +5V over the PWM to actuate the relay.