CNC Machine using Arduino

Published on . Written by

CNC Machine using Arduino

CNC (Computer Numerical Control) machines are used in manufacturing industries to develop a product with more accuracy. CNC machine uses a subtractive method to fabricate or develop a product. In this Arduino project, we are going to develop a miniature CNC machine which can be controlled using Arduino.

Read more..

SLNOTE

Skyfi Labs Projects
How does it work?

In CNC machine the input is given as G-codes (Geometric codes) and M-codes (Machine codes) which is nothing the X, Y and Z coordinates of the model. Based on the given input the machine will do the fabrication by doing, drilling, milling and cutting with the help of different tools. It uses stepper motors and servo motors to operate freely in all the three axes. CNC machine uses a subtractive type manufacturing method to develop a product, unlike 3D printer where it uses additive manufacturing.

In our case, we are going to use Arduino as the microcontroller and the G-codes and M-codes are sent using UniversalGcode sender, which is a user interface to give the commands to the machine. 

Hardware requirements:

  • Arduino Uno
  • GRBL shield
  • Stepper motor driver module
  • Stepper motor - 3
  • DC motor
  • Drill bit
  • CNC machine frame
  • Threaded rods and smooth rods

SLLATEST
Software requirements:

  • UniversalGcode Sender
  • Arduino IDE
Project Implementation

  1. The frame of the CNC machine is made using MDF wood to reduce the project cost. Holes are made in the appropriate places to fix the stepper motors. 
  2. Our machine has three axis X, Y and Z. X and Y are placed perpendicular (90 degrees) to each other. Z-axis controls the lifting and lowering of the DC motor.
  3. The smooth rod helps to slide the assemble whereas threaded rod is used to transfer the motion from the stepper motor to the assembly.
Stepper motor - It is a DC motor which consists of multiple coils that work in an organized manner to move once at a time to get more accurate positioning.

  1. Connect the GRBL shield to the Arduino Uno board. GRBL shield which is used to control the stepper motors using Arduino platform. 
  2. Now connect the stepper motor modules to the Grbl Shield and connect the stepper motors to the GRBL shield.
  3. Once all the connections are done upload the firmware to the Arduino board using XLoader.
  4. Now with the help of Universal Gcode sender, you can able to give the inputs in the form of G-codes and M codes. 
To have a more understanding of G-codes and M codes you use CNC simulator pro to simulate and test your codes. After testing the codes you can implement in the real model. 

Below is the simple code to cut a workpiece into a rectangle (60x30):

G90 G01 Z-2 F200

G01 X60 F200

G01 Y30 F200

G01 X0 F200

G01 Y0 F200

G01 Z-4 F200

G01 X60 F200

G01 Y30 F200

G01 X0 F200

G01 Y0 F200

G01 Z-6 F200

G01 X60 F200

G01 Y30 F200

G01 X0 F200

G01 Y0 F200

G01 Z0 F200

M30

By doing this Arduino project you will learn the basics of CNC machine and codes used to control the machine.


SLDYK
Kit required to develop CNC Machine using Arduino:
Technologies you will learn by working on CNC Machine using Arduino:


Any Questions?


Subscribe for more project ideas