How to build your own CNC machine

in #cnc7 years ago (edited)

Have the following ready:

  1. Install the latest version of Arduino IDE from https://www.arduino.cc/en/Main/Software
  2. Read the following about GRBL Shield http://bit.ly/1Gh08xn
  3. Create a new folder anywhere on your PC and name it “GRBL Master”.
  4. Download and save the following in your “GRBL Master” folder:
    a. XLoader: http://bit.ly/1zMaraQ
    b. GRBL Hex: http://bit.ly/1vBO4R7 (download grbl_v0_8c_atmega328p_16mhz_9600.hex)

Now, let’s build our CNC machine:

  1. 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.

  2. 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.

  3. Connect the grblShield to your Arduino

  4. 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.

  1. Wire your stepper motor to the grblShield. Follow the steps below:
    a. Find the stepper motor coil pairs. You can find which wires are paired by using an ohmmeter (if you have one). A better way to find the coil pairs: Making sure none of the wire ends are touching, spin your stepper motor with your fingers. Depending on the size / holding torque this could be easy or pretty hard. All you really want from this is to get a feel how the motor spins without any of the wires connected to each other. Now that you know how it "feels" (how hard it is to spin with your fingers) connect 2 wires together. Just pick 2. Try to spin the motor again. If it feels the same then more than likely these are NOT connected to the same coil. Disconnect these wires. Connect one of the other wires to one of the first wire pairs you tried. Try to spin the motors again. This should be much harder. If this is so, you have found your wire pairs.
    b. Connect the 4 wires of the first motor to the screw terminal labeled X based on the following pinout table:

c. Connect the other stepper motor to the Y terminal on the shield.

  1. 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.

  2. Type “$$” in the command line.

Using Chilipeppr to control the CNC:

  1. Chilipeppr is a web based software that allow you to control your GRBL Shield. I recommend using GOOGLE CHROME web browser.
  2. Make sure to EXIT/CLOSE Arduino IDE.
  3. Go to Chilipeppr website http://chilipeppr.com/.
  4. Scroll down to “Serial Port JSON Server” section and click on “Download SPJS from GitHub”.
  5. Scroll down till you find the “Binaries for Downloads” section.
  6. Click on the appropriate system (Windows x64 for example).
  7. Extract to “GRBL Master”
  8. Go to the GRBL Master folder and click on “serial-port-json-server”.
  9. Here's a screenshot of a successful run on Windows x64. Make sure you allow the firewall to give access to Serial Port JSON Server or you'll wonder why it's not working. Keep it OPEN.

  1. Go to Chilipeppr website http://chilipeppr.com/.
  2. Scroll down and select GRBL Workspace. You will be directed to http://chilipeppr.com/grbl.
  3. Go to the lower right corner, select “grbl”, 9600 and check the Arduino UNO. The area will be highlighted green. Your screen should look like this:

  1. Enter different G code commands to test it.
  2. Open the Jogging screen on the upper right corner and return the motors to zero.

  1. Now let’s write a full G Code program and test it. Follow the steps below:
    a. Open a new “NOTEPAD” empty file.
    b. Type the following g code in your editor:

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.

Sort:  

This has to be used with Arduino.

seems like you have a lot of knowledge about progamming. I have to be honest I dont have a clue about it. just wanted to say that the video you linked is on private ,so wa cant watch it

Thanks for letting me know. I uploaded the public YouTube link.

no problem, video works now

@malubaidy nice tutorial thank you so much

Congratulations @malubaidy! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You made your First Comment

Click on any badge to view your own Board of Honnor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Very helpful bro!
Thank you!

Congratulations @malubaidy! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You got a First Reply
Award for the number of upvotes

Click on any badge to view your own Board of Honnor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Did you get the idea from Jerry's post?? :D

Im not sure who's jerry but there is lots of resouces online.