How to make Mini Home made CNC Machine Arduino+28BYJ-48 Stepper motor

How to make Mini Home made CNC Machine Arduino+28BYJ-48 Stepper motor

This is mini CNC have approx 100mm X 100mm plotting are,

I have used 28BYJ-48 Stepper motor to build this machine this stepper motors drive by L293D     Motor shield and arduino

This machine is very easy to build at your own all necessary instructions are provided in post, you can try your own ideas to get something new.


I have used regularly available hardware to build this machine no need to buy any high end components just be creative.



Watch the complete video it covers all the necessary instruction to build this mini CNC machine


Material required (Hardware & Software)


28BYJ-48 Stepper motor :-

Arduino UNO :-

L2938 Motor shield :-

GT2 Timing belt 2meter :-

GT2 Pulley 2nos. :-

Idler Pulley 2nos :-

Bike spoke for Guide Rails approx. 3mm dia.

DVD drive slider for platform of X-axis & Y-axis

Some Acrylic Hollow tubes

Some Acrylic Sheet pieces

Slotted channel approx. 1mtr

Nut bolts as required




Arduino IDE (Version 1.6.3) (

Processing IDE (Version 3.0.2) (

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.


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 IDET

his 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


Machine Assemble



Make hole in Wooden sheet to mount all necessary components.

I have used here 5mm thick wooden sheet & drill some holes to mount X-axis & Y-axis

I have mount Four Acrylic tube to fit X-axis Guide rail on it.


Bike spoke wires approx 3mm Thick metal wires are used as guide rail for axis.

To make platform i have used sliding platform of DVD drive.

adjust and secure sliding arrangement in such way that they can slide very smoothly if required apply some lubrication on guide rails


Stepper motor and idler pulley are mounted on board.

Stepper motor , sliding platform & idller pulley are connected with GT2 timming belt in this way

installation of X-acxis is completed.



I have installed slotted channel vertically to mount Y-axis arrangment.

Slottedd channels are very good for this purpose you can adjust Y-axis height wrt to X-axis as required.



Y-axis driving mechanism is installed in a same way as we installed X-axis


Slide must be friction-less and must be smooth in motion

Prepare a X-axis drawing board from cardboard pieces and glue it on X-axis platform.


Installing pen up down mechanism as a Z-axis made from some parts of DVD mechanism

Attache a mini Servo on Z-axis to make pen up and Down

Attaching pen on Z-axis,


Place a plan paper on drawing board befor plote anything you need to do wiring of motors &

upload code to the machne let see how to upload those code in next step.

Wiring Drawing


Connect X-axis at M1 & M2 Port of L293D Motor shield

Connect Y-axis at M3 & M4 Port of L293D Motor shield


Very important remove that power jumper from the L293D motor shield board

Apply 9V DC 1 amps power supply to the L293D Motor shield board

Place motor shield on Aruino UNO board.

Connect arduino with PC via USB cable

Read next Step to know how to load code to arduino

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


Download Adafruit motor shield Library


Then upload this CNC Code to arduino


Click to download arduino code


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




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 n


Sample G-code

sample 1

sample 2


sample 3


sample 4



Watch this video to know how to make G-code file



Watch this to know how to add G-code extension in inkscape



Click to download Makerbot unicorn G-code 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



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


Click to download GTRL


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

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…


Low cost PCB on PCBWay - only $5 for 10 PCBs and FREE first order for new members

PCB Assembly service starts from $88 with Free shipping all around world + Free stencil 

PCBWay 2nd PCB Design Contest



Hobbiest Electrical DIY project passionate

12 Responses

  1. I have problem with my cnc can you solve this what meaning of this please help
    -cnc run after a few sec and its tell this…

    M18 (driver off)
    command not recognized : M18

    • open your g-code file in notepad search in that file for “M18”
      Delete “M18” if it comes any where else other than in last 2 or three lines.
      and save the file
      this will solve your problem

  2. Is it possible ,if I increase the x and y axis to 300 mm?
    And also increase length of rod
    Please reply.

  3. I have problem with my cnc
    my cnc can not run after g.code i uploaded on gctrl

    the notification that appears is :
    Loading file…
    User selected C:\Users\acer\Desktop\segitiga.gcode
    (Scribbled version of C:\Users\acer\AppData\Local\Temp\ink_ext_XXXXXX.svgBZDJKZ @ 200.00)

  4. Hello Mr Innovative, i want to make you a question, i do not have the shield in my drawing machine.

    I am using 2 darlington arrangement for the motors, My question is i can still use your grbl code?, if it is so, what i need to modify for make it work?

    Thanks for your help, great videos.
    regards WhitDragon.

  5. Hi, Sir. I made my first CNC Ink plotter based on this tutorial. i have succeed to draw using my machine. now I want to asking you, is it normal that the 28byj-48 are hot when touch them. is it normal sir? same as you. or i made something wrong. Please reply, so it could help me.

  6. Mr.Innovative,I am very sad. I’ve watched your videos carefully. But in a way I don’t know why the CNC doesn’t work. I’m sure you’re over your head. I still want to try my luck. Please help me. If I make a video, do you watch everything I do right?

  7. Hello sir, I couldn’t find info about bike spoke wires length. Could you help me with that and approx distance between step motor and Idler Pulley? That would be very helpful, thank you.

  1. Pingback: Milana Travis

Leave a Reply

Your email address will not be published. Required fields are marked *

Enter Captcha Here : *

Reload Image

Post comment