Its time to connect it all together and install the software.
You’ll first need to install GRBL on Arduino. This is fairly straight forward. Download GRBL from here. Unzip the grbl-master.zip and you’ll see another folder called grbl here. Add this folder as a library in Arduino. Now all you have to do is restart Arduino, select grbl from the File > Examples and hit Upload.
You can verify the upload by opening the serial monitor and you’ll see the GRBL opening lines along with its version.
Setting up GRBL
Before we get started, you’ll need to configure GRBL to your motor specifics and the required resolution (or micro-steps). I’ve set mine to 1/16 microstep (this is also listed on the Pololu page). This means that every motor resolution is divided into 1200 microsteps. Be careful when using this level of micro-stepping since higher stepping usually comes at the cost of reduced torque.
Since we’ve used a 20-tooth pulley and a 2mm timing belt, we need to calculate steps per mm count for GRBL. You can use this handy calculator from Reprapfor this. For us this count is 80. From the serial terminal you will need to type $ and press enter to change this value for the X and Y steps/mm. You can similarly change other values. I’ve not touched the homing settings in mine since I’m not using it in my setup. Its a good idea to set the maximum X and Y limits the motor will travel and the acceleration values as well. I’ve set my acceleration values as 6000 for X and Y and left the Z untouched (since I’m not using the Z axis).
You’ll also need to connect Step and Dir pins to Arduino. For the X-axis connect to Arduino D2 (step) and D5 (dir) and for Y-axis this is set to D3 and D6. Connect the laser to D11. Remember that all grounds on all boards should be connected. The Arduino is powered through the USB of the connected machine.
There are plenty of softwares for interpreting G-code, the language that GRBL outputs. The two that I love are grblControl and bCNC.
Inkscape is the preferred choice for converting vector graphics into Gcode and the latest version of Inkscape comes preloaded with G-codetools which is very handy. I won’t go into the details of how to use these since there are awesome instructables and tutorials on these on the web.
I eventually mounted the entire setup on a plywood board cut to size which has a 1mm Aluminium sheet on it. This now acts as my cutting board. The whole thing is enclosed in a black plastic enclosure with a red translucent top as a safety cover.