Introduction: How to Make Arduino Based Mini CNC Machine a Complete Tutorial

Picture of How to Make Arduino Based Mini CNC Machine a Complete Tutorial

Hello friends previously i was uploaded a CNC machine instructables you peoples very much appreciate it some of you have many issue and confusion its obvious, reasons are little amount of knowledge is there.

So i came up here by collecting all necessary instruction to minimize your queries and questions regarding how to make and run successfully a CNC Machine.

Many makers contact and comments some common problems like

# My stepper is not working but its working in test Run

# Machine is plotting very small image

# Arduino or processing showing errors while launching codes

# Unable to make G-code files

# How to install libraries

So here i am posting a Complete guide of how to Make a CNC machine along in very simple and easy manner

If you have any question fell free to contact

Step 1: First of All See This Videos

As per Human Psychology Videos or visual content is the best and power full way to learn

So before proceed further first of all take a look to this videos so you will clear in your mind about what you going to learn in this instructables,

Information in following all videos is must to have to build a perfectly fine CNC Machine so watch then carefully.

1) Watch this to see how to assemble CNC machine, Wire & run

2) Watch this how to Connects Stepper motors with Motor shield + a test run

3) How to make G-CODE file of any image

4) How add libraries in Arduino

After watching this i hope you got understood about basic concept and working of CNC machine

Lets processed for Bill of Material

Step 2: Bill of Material ( Hardware + Software )

Picture of Bill of Material ( Hardware + Software )

Following are the Hardware & Software list you want


Arduino UNO/MEGA---------------------------------------------Qty---1

L293D Motor shield-----------------------------------------------Qty---1

Mini Servo Motor--------------------------------------------------Qty---1

OLd scrap DVD Drives-----------------------------------------Qty---2

50MM long bolts with nut and washer------------------------Qty---8

A pen----------------------------------------------------------------Qty---1

Some hardwares & tools----------------------------------------Qty---1lot


  1. Arduino IDE (Version 1.6.3) (
  2. Processing IDE (Version 3.0.2) (
  3. Inkscape (version 0.48.5) (

Go to link to download the particular software select software pack according to you system

**NOTE:- Inkscape version must be 0.48.5 only other wise gcode extension will not work.

Step 3: Role of Hardware & Software in This Machine

Picture of Role of Hardware & Software in This Machine

It is good to know role of each component and software in CNC machine


Arduino is basically work as a brain of CNC Machine a CNC code uploded to arduino so that when Gcode stream to arduino Arduino commands motor shield to run stepper motors.

2) L293D Motor shield

This is dedicated shield to control verities of motor with arduino here this shield control two stepper motor(x-axis & y-axis) and one servo motor, read this for detail technical knowledge.

3) Servo motor

Basically this motor is used here just to UP/DOWN pen servo is connected with motor shield

4) Arduino IDE

This is used to upload code to arduino

5) Processing IDE

This is used to stram G-CODE to arduino

6) Inkscape

This is used to make G-CODE file of any image

Step 4: Assembling the Machine

Picture of Assembling the Machine

How to assemble machine ?

I hope you have seen videos and pic uploaded here so you have idea about how to assemble machine so I am not going in depth of it

Just want to highlight some key point

Make sure your machine became vibration free like tightly mount axis on each other

Here I used DVD drive shutter opening mechanism to do pen up/down with the help of servo motor, if you don’t want to do much complication simple tie the pen with servo motor shaft and your purpose get solved

Step 5: Wiring Drawing

Picture of Wiring Drawing

Do component
wiring accordingly shown in images,

Do cross check power polarity once before powering the components

Step 6: Programming Arduino

Now your machine is ready its time to give life to you machine

So we need to program arduino

Here we are using L293D Motor shield, so it need to add some library (AFMOTOR LIBRARY) to arduino IDE Software

so first download & upload this library to Arduino IDE to know how to add library watch video number 4

Then upload this CNC Code to arduino

After successfully compiling and uploading your arduino programming part is over now move towards G-CODE

Step 7: Preparing G-CODE

G-code is the format of file which your machine can understand and work acordingly

Suppose you have to draw some text with machine so you need its Gcode so what you do

Inkscape software provides you a facility to convert image or text into G-code

how to convert file in G-code watch video number 3

But when you download Inkscape software from net there is not a G-CODE save as option so you need to add a library Extension in inkscape for this download the following Makerboat g-code unicorn extension

How to add this extension to Inkscape

1) Unzip the file

2) Open the folder by double click

3) Copy all the sub folders & files

4) Right click to the inkscape icon from desktop

5) Go to Properties

6) Go to open file location

7) Open "SHARE" folder

5) Open "EXTENSION" folder

6) Past here all that file

7) its done

Step 8: Processing IDE

Picture of Processing IDE

Our arduino is ready our machine is ready and our g-code is also ready to print

So we need something which can transmit g-code to Arduino, so here we have Processing GCTRL program

Download GTRL Code from below link

After downloading the GCTRL Code unzip the folder load the gctrl code to processing and press play button

a new window open from this window you can select your communication port,

By pressing "G" a browser is open select your g-code file and upload it

as soon as you upload the file Machine start drawing

Here is some ready made g-code file is attached

Step 9:

Picture of

Thanks for your attention friends

I hope i cover every point of how to make CNC machine

hope you have appreciate this if you are trying to make this machine have a good luck friend

If you stuck anywhere in between feel free to contact i will surely help out my level best

If you have some new idea to improve any thing in this please most welcome you can share with us.

Thanks & bye

subscribe our Youtube channel


VishnuR6 made it! (author)2017-11-07

May i know the maximum image size that can be printed

i want to fit this image

hgkarthik (author)2017-10-30

how to connect the ardunio to motor shield driver what are the pins should connect ?

Varadgh (author)2017-08-25

I have made it completly but can u help me pls as it is not drawing neatly as desired ,output is distorted

Pls help ,

Sharasx (author)2017-03-29

everything works. why only one motor to heat up the chip? Reset and then not heat up to the next process. L293D motor control card shield motor drive expansion board for motor shield Arduino

Amardes (author)2017-03-07

Very Nice..

Giesick (author)2017-02-23

Hello Mr. Innovative :-)

What about your website? It is empty ...

I'd like to get the instructions for building a cnc-plotter.

Are you planing to go online again?

Thanks for an answer

Mr innovative (author)Giesick2017-02-24

Its restore now you can access it

jamiejig (author)2017-02-05

fixed it in inscape I had to scale up to 80mm and draw in the top right hand corner keeping in the 40mm plus zone if this makes sense

jamiejig made it! (author)2017-02-02

i now have every thing working and can download and draw some of the pre download files perfectly.but when I draw and convert my own files in inkscape it only draws 25% of the image thanks for this grate tutorial it seams to be off centre I have adjusted lots of the settings in inkscape and

boundaries ect with no joy also some of the pre download files produce the same off centre results

nebloid (author)2017-01-29

There appears to be some error in the code as the home function and arrow key movement functions dont work. however, the P and G functions work fine.

mehdim40 (author)2017-01-15

Thank you very nice site
My device error kills, but the linear form
The'm grateful shade guide

azrifahmy (author)2017-01-10

Hello again, thank you again AnghelutaA and Sieu Nhan T for helping me solve the code and software. The machine runs now but unfortunately the image that i want to draw/print looks like not 100% same size as in the inkscape (gcode) how do i set the machine to fix my image.

azrifahmy made it! (author)2017-01-04

Hello, thank you for this instructables project.I need your help, when open gctrl code to processing there is an error,can you help me fix it.Tq

AnghelutaA (author)azrifahmy2017-01-08

Hi,I have the same problem...But try to get an older version of processing(2.2.1)

1.Go down and you until you see

Stable Releases on 2.2.1 version and select you'r operating system....

(sorry for bad english)

azrifahmy (author)AnghelutaA2017-01-10

Thank you so much for helping me

Sieu NhanT (author)azrifahmy2017-01-08

String result = (String) JOptionPane.showInputDialog(frame,"Select the serial port that corresponds to your Arduino board.","Select serial port",JOptionPane.PLAIN_MESSAGE,null,Serial.list(),0);
********just copy and paste this code.*********
(have a nice day :))))))

azrifahmy (author)Sieu NhanT2017-01-10

Thank you so much for helping me

nebloid made it! (author)2017-01-08

Very nice instructable. Had great success with the build. One thing to mention is that you need to use Inkscape version 0.48 for the G code patch to work. It is not compatible with later versions of the software. Otherwise, all good.

tushar3353 (author)2016-12-09

this is nice...can i use it as a pcb printer

Mr innovative (author)tushar33532016-12-10

not sure beacuse i don't know about pcb printing method

this machine can draw image on paper by pen/marker if this all need for PCB printing then yes

Raj wadia (author)Mr innovative2016-12-28

instead of pen put permenant marker and instead of paper put copper clad board. the upload the artwork. that's it

cdubs61 (author)2016-12-18

Hi! So I have successfully uploaded the CNC Code and have processed the GTRL interface using Processor; however, when I attempt the jog the axes using the arrows keys of my PC, nothing moves. I hear a high-pitched hum (hums when I move up and right keys, but stops when I press the down and left keys) and I can feel the stepper motors trying to work, but the leadscrews won't budge! Also, when I try to move the x and y sleds by hand while this is happening, the leadscrews resist my hand. It's like the motors are preventing movement rather than creating it.... What do I do??? (stepper motors did work when I tested them)

sabdul quddus (author)2016-12-15

Nice and clean instructable + videos. This will lead me to create my own CNC.

ROBO HUB (author)2016-12-09

u r creative..

Mr innovative (author)ROBO HUB2016-12-10

thanks bro

UMESHN1 (author)Mr innovative2016-12-14

hey can you help make this project i am begeneer

WahidR5 (author)2016-12-11

sir mera sab process sahi chal raha he lekin gcode dene ke bad print to ho raha he lekin sahi nahi kuch alag hi ho raha he

About This Instructable




Bio: Electrical engineer by profession
More by Mr innovative:How to Make Mini Home Made CNC Machine Arduino+28BJY-48 Stepper Motor28BYJ-48 Stepper Motor + Arduino + L293D Motor Shield + Processing Setup Test RunHow to Make Color Sorting Machine Arduino Based
Add instructable to: