DIY 3D Tech

The On-Line Magazine for 3D Printing & CNC

Spindle and Laser Control for CNC Router using Gcode

In this episode we will look at using a dual relay board (amzn.to/1MeJCmN) connected to the GRBL controller to on and off either a spindle or small laser attached to the mill (we will be adding a 2 watt laser in another episode).  This is is current using pin 13 which is set control spindle direction as in stand PWM mode pin 12 for spindle enable does not respond to gcode commands and requires a change in the configuration.f and a recompile with upload.  I got the below table from (www.shapeoko.com/forum/viewtopic.php?f=3&t=5803) and it is a good reference if you want to make changes.

 

Disabling VARIABLE_SPINDLE will revert Grbl to the old pin layout, where spindle enable is on D12 and direction on D13. With it enabled, spindle enable/PWM is on D11 and direction on D13.

EDIT: Here’s a chart to make it a bit clearer.

VARIABLE_SPINDLE enabled:
D11 = Spindle enable/PWM speed
D12 = Z-limit
D13 = Spindle direction

VARIABLE_SPINDLE disabled:
D11 = Z-limit
D12 = Spindle enable (on/off only)
D13 = Spindle direction

VARIABLE_SPINDLE and USE_SPINDLE_DIR_AS_ENABLE_PIN both enabled:
D11 = Spindle PWM speed only
D12 = Z-limit
D13 = Spindle enable (on/off only)

 

Best Prices For The CR-10!

Creality CR-10S Pro 3D Printer 300X300X400mm Touch Screen Silent Motherboard

$539.99
End Date: Tuesday Feb-25-2020 18:08:47 PST
Buy It Now for only: $539.99
Buy It Now | Add to watch list

Used Creality CR-10S 300X300X400mm 3D Printer Large Print 1.75 mm with EXTRAS

$212.50 (5 Bids)
End Date: Tuesday Feb-18-2020 12:39:25 PST
Bid now | Add to watch list

Used Creality CR-10 MAX 3D Printer BL-Touch 450X450X470mm 2019 New Arrival

$699.00
End Date: Wednesday Mar-4-2020 2:06:25 PST
Buy It Now for only: $699.00
Buy It Now | Add to watch list

Creality CR-10 V2/CR-10S Pro/CR-X/CR-10S 3D Printer 300X300X400mm 1.75mm PLA

$499.00
End Date: Saturday Mar-14-2020 9:48:47 PDT
Buy It Now for only: $499.00
Buy It Now | Add to watch list

Creality CR-10S 3D Printer Dual Z-axis Filament Monitor 300*300*400mm DIY

$399.95
End Date: Thursday Mar-12-2020 17:55:47 PDT
Buy It Now for only: $399.95
Buy It Now | Add to watch list