Have the following ready:
Now, let’s build our CNC machine:
Download and install the grbl software on your Arduino. Follow the steps below (assuming that you already saved all the files on “GRBL Mater” folder):
a. Open the “GRBL Master” folder.
b. Open xloader
c. Browse for the GRBL shield hex file(grbl_v0_8c_atmega328p_16mhz_9600.hex)
d. Chose the right Arduino type (Uno(ATmega328)) and the right COM (use device manager to locate the COM connected to your Arduino).
e. Click on upload. Now the hex file is flashed to your Arduino.
f. Disconnect the Arduino from your PC.
Connect the power supply to the grblShield and test. Follow the steps below:
a. CAUTION – the grblShield does not have reverse polarity protection. If you hookup the supply voltage backwards, you will destroy your grblShield and need to send it back for a replacement.
b. Using your multimeter confirm the output voltage and polarity of your power supply. You should see approximately 24 volts.
c. Unplug the power supply.
d. Connect the V+ terminal on the power supply to the Vmot screw terminal on the grblShield.
e. Connect the V- terminal on the power supply to the GND screw terminal on the grblShield.
f. Confirm you have the wires between the power supply and grblShield connected properly.
g. Plug in the power supply and confirm your grblShield is working. You will see a blue LED light up near the screw terminals. Again, do not touch any of the terminals!
h. Unplug the power supply.
Connect the grblShield to your Arduino
Test the connection. Follow the steps below:
a. Power on your PC and launch the Arduino IDE.
b. Plug in the power supply for your grblShield.
c. Next connect the USB cable to your Arduino and PC.
d. Go to tools > Port and make sure that the proper COM is CHECKED.
e. Open the Serial Monitor by clicking on the icon located on the upper right corner (or use the main menu).
f. If all systems are go then you will see a welcome message in the console window “Grbl 0.8c ['$' for help]”.
g. Select “Both NL & CR” from the drop down menu at the lower right corner of the Serial Monitor.
h. If you received the welcome message, unplug your power supply and disconnect your Arduino from the PC.
c. Connect the other stepper motor to the Y terminal on the shield.
Test the stepper motor. Follow the step below:
a. Power on your PC and launch the the Arduino IDE.
b. Plug in the power supply for your grblShield.
c. Next connect the USB cable to your Arduino and PC.
d. Confirm your PC is talking to the grblShield by checking for the welcome message in the Serial Monitor “Grbl 0.8c ['$' for help].”
e. Next type “G00 X50” in the command window. This is a g-code command that tells the x axis to move 50 mm from its current position. (The grblShield defaults to mm but this can be changes to inches if you have to work in that unit system.)
f. Next type “G00 Y25” in the command window.
g. Next type “G00 X-30 Y42” in the command window.
h. Next type “G01 X57 Y-15 F300” in the command window.
i. Send a few more g-code commands.
Type “$$” in the command line.
Using Chilipeppr to control the CNC:
G01 X100 F300
G01 Y50
G01 X0
G01 Y0
c. Save the file as “Rectangle” in your GRBL Master folder.
d. Open your GRBL Master folder and you find your new file “rectangle” there.
e. Drag the file “rectangle” and drop it in the Chilipeppr workspace.
f. Click the run button located just above the Serial Port Console on the left hand side.