How to make Mini CNC plotter machine at home using Arduino

How to make Mini CNC plotter machine at home using Arduino / DIY mini arduino CNC machine

 

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.

 

Step 2: Bill of Material ( Hardware + Software )

DVD drive with stepper motors
DVD drive with stepper motors
Arduino Nano
Arduino Nano
Micro Servo motor
Micro Servo motor
L293D Motor shield
L293D Motor shield
BOM
Material required to build Arduino CNC machine

 

Following are the Hardware & Software list you want

Hardware

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

Software

  1. Arduino IDE (Version 1.6.3) (https://www.arduino.cc/en/Main/Software)
  2. Processing IDE (Version 3.0.2) (https://processing.org/download/?processing)
  3. Inkscape (version 0.48.5) (https://inkscape.org/en/download/)

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

 


It is good to know role of each component and software in CNC machine
1) ARDUINOArduino 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,https://cdn-learn.adafruit.com/downloads/pdf/adafruit-motor-shield.pdf  read this for detail technical knowledge.3) Servo motorBasically this motor is used here just to UP/DOWN pen servo is connected with motor shield4) Arduino IDEThis is used to upload code to arduino5) Processing IDEThis is used to stram G-CODE to arduino6) InkscapeThis is used to make G-CODE file of any image

 

Step 4: 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

Connection with L293D Motor shield
Connection with L293D Motor shield
stepper motor connection with motor shield
stepper motor connection with motor shield

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 

 

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

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 n

Sample G-code

1 sample

2 sample

3 sample

4 sample

How to add G-Code extension in Inkscape for MINI DIY CNC Machine

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

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

Step 8: Processing IDE

processing GTRL
processing GTRL

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

https://www.youtube.com/channel/UCsOFElmDD3e8l-RGC…

146 thoughts on “How to make Mini CNC plotter machine at home using Arduino

  1. every stepper motor have four wires..of two windings so please say us how to know which winding wire in which port of motor shield

  2. Very good information is given by you. Using this information any beginner can do this project.
    Thanks a lot

  3. Hi thanks gor the great explanation! I did tge exact steps and now i have 2 questions! My printing size is 30mm W X 40 mm H how to adjust the printing size in GTRL , also how to set zero point on the table ?! Where the pen should be when the machine started ?!

    Thanks and I appreciate your help

    1. No need to do anything in GTRL you just set the page size while making Gcode in inkscape in Document properties option

  4. My stepper motor is not running on uploading gcode file……….
    What should i do please help me……

    1. Have you wiring properly means wired stepper motors with shield correctly,
      Is there any software errors ?

  5. Great tutorial Sandeep, but I am having trouble finding inkscape .48.5. Any suggestions or alternatives?

  6. I got this warning message after I save the file, then it tell me the saving is fail.
    Traceback (most recent call last):
    File “unicorn.py”, line 108, in
    e.affect()
    File “C:\Program Files\Inkscape\share\extensions\inkex.py”, line 283, in affect
    self.effect()
    File “unicorn.py”, line 102, in effect
    parser.parse()
    File “C:\Program Files\Inkscape\share\extensions\unicorn\svg_parser.py”, line 230, in parse
    self.svgWidth = self.getLength(‘width’, 354) * 0.28222
    TypeError: unsupported operand type(s) for *: ‘NoneType’ and ‘float’

  7. Hey. Great work. Thanks for this tutorial.
    I built a cnc plotter with the adafruit motor shield v1. But there is one thing I don’t understand …
    Where or how in the cnc.ino file can I set the speed for the steppers. My machine runs very fast – I would like ro decrease the speed. But changing the setSpeed params didn’t change anything …
    Can you help me please?
    Thanks a lot and greetings from Germany.

  8. Hey Sandeep.
    I don’t know if my last post was sent … so once again: Thanks for your tutorial – great work.

    I built a cnc myself. Everything works fine – but I ‘d like to decrease the speed of the steppers and it doesn’t work by decreasing the „setSpeed“-params.
    I can put in any number – but nothing changes …

    The „StepperTest“ from the adafruit-library insted works fine – also decreasing the speed.

    In your cnc.ino-config you are using the „onestep“-command because you need to run two steppers simultaniously. I think this is the reason the setSpeed-command doesn’t „work“.

    Can you please help me? Thank you …

  9. i did all steps.But servo works one of motor is works but other one just vibrating i tried change the cables place but still vibrating.Motor is fine i tried other motor same result.

  10. Hey, Thank you so much for your tutorials… my question is if I don’t use DVD and I use another protocole with 2 stepper motors adn one servo motor with a stable platform and just the pen wich move in X Y and Z , tell me if is the same or almost the same ? and if that DVD is with stepper motor or what exactely? thanks before ur answer …

  11. i copy pasted the svr files still gcode files does not show up sandeep please help me with this

  12. I’m really impressed with your writing skills as well as with the layout on your weblog. Is this a paid theme or did you modify it yourself? Either way keep up the excellent quality writing, it’s rare to see a great blog like this one these days.

  13. I loved as much as you will receive carried out right here. The sketch is tasteful, your authored material stylish. nonetheless, you command get got an edginess over that you wish be delivering the following. unwell unquestionably come further formerly again since exactly the same nearly a lot often inside case you shield this increase.

  14. Very nice post. I just stumbled upon your weblog and wanted to say that I have truly enjoyed browsing your blog posts. In any case I’ll be subscribing to your feed and I hope you write again very soon!

  15. My relatives all the time say that I am killing my time here at net, however I know I am getting know-how every day by reading thes nice articles.

  16. Hi! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyhow, I’m definitely delighted I found it and I’ll be book-marking and checking back often!

  17. Hi! I’ve been following your weblog for a while now and finally got the courage to go ahead and give you a shout out from Dallas Tx! Just wanted to say keep up the excellent work!

  18. Whoa! This blog looks exactly like my old one! It’s on a entirely different subject but it has pretty much the same page layout and design. Superb choice of colors!

  19. Hi there, I do think your website might be having internet browser compatibility problems. When I look at your web site in Safari, it looks fine however when opening in IE, it’s got some overlapping issues. I just wanted to give you a quick heads up! Aside from that, wonderful blog!

  20. While varifying the gctrl code an error message generates showing “import does not name a type” marking the error on “import.processing.serial.*”. What to do with that?

  21. Hi there! This post could not be written any better! Looking through this article reminds me of my previous roommate! He continually kept preaching about this. I most certainly will forward this post to him. Fairly certain he’ll have a very good read. Many thanks for sharing!

  22. This is really attention-grabbing, You are a very skilled blogger. I have joined your feed and look forward to looking for extra of your fantastic post. Additionally, I’ve shared your web site in my social networks

      1. Loading file…
        User selected C:\Users\Iconsys\Desktop\drawing-1.gcode
        (Scribbled version of C:\Users\Iconsys\AppData\Local\Temp\ink_ext_XXXXXX.svgRGN7ZY @ 3500.00

        after above step never to go forward gctrl and never start

  23. hi sandeep how r u , i hope u will help me for my project . in cnc ploter i have made changes use nema 17 small stepper for 150mm*150mm area .
    so what changes i have to make in cnc code file that adafruit motor sheild work with my machine. so kindly please help me.

    thanx

  24. After exploring a handful of the articles on your blog, I honestly appreciate your technique of writing a blog. I saved as a favorite it to my bookmark webpage list and will be checking back soon. Please visit my web site as well and let me know your opinion.

  25. Thank you for your great article.
    I made of your device.
    Everything is fine except delay time for Servo which causes inconsistency.
    When i disable servo in codes everything is Ok & exact, just lines from 1st polyline to next
    and when i activate servo, delay time makes, not-exactly printing.
    Would you please helping me.

  26. Hi there! This is my first visit to your blog!
    We are a team of volunteers and starting a new initiative in a community in the same niche.
    Your blog provided us valuable information to work on. You have
    done a marvellous job!

  27. i made that cnc machine but having a problem motors are not working while arudino is blinking ,processing show all the reqired coridnates and all , the motor shiled is working fine as it is also glowing but motors are not working
    i have used same 5v 1amp for driver …

  28. im not able to change the port name. it has a value of null and im not getting a window for changing it.

  29. Hi Sir
    I have bought all material but problem is I don’t have DVD drives which you have I have drives in which all parts are same but instead of stepper there is simple motor so can I use it for cnc

    If yes please tell me in which place should I fit it’s wire in motor driver

  30. Hi..I followed all your steps to do the CNC machine..the problem is tht IC is getting heated up..wt to do?..please help me

  31. After downloading the gctrl code unzip the folder load the gctrl code to processing and press play button but not coming a new window. Pls send processing video

  32. I’ve installed all the necessary libraries required for the project. I’ve also installed the extension file of INKSCAPE. When I’m trying to save the processed image file with gcode extension, I’m getting the undermentioned error. Please help me out.

    Traceback (most recent call last):
    File “unicorn.py”, line 108, in
    e.affect()
    File “C:\Program Files (x86)\Inkscape\share\extensions\inkex.py”, line 283, in affect
    self.effect()
    File “unicorn.py”, line 102, in effect
    parser.parse()
    File “C:\Program Files (x86)\Inkscape\share\extensions\unicorn\svg_parser.py”, line 230, in parse
    self.svgWidth = self.getLength(‘width’, 354) * 0.28222
    TypeError: unsupported operand type(s) for *: ‘NoneType’ and ‘float’

  33. I can’t transfer gcode to arduino via processing. There are errors “array out of bound” in red color. Also i can’t select port after running gctrl. Help

    1. On u click run on the processing.u will see a gtrl popup window.u need to press the letter”P” in order to select the port.and then press g to stream g code file.
      In case u r having problems with the port’s then go to
      control panel
      Hardware and settings
      U will see Arduino under “ports”
      Click on the it
      Go to advanced settings change the port number
      Also click on update driver software.
      This should serve the purpose

    2. Once u click run on the processing.u will see a gtrl popup window.u need to press the letter”P” in order to select the port.and then press g to stream g code file.
      In case u r having problems with the port’s then go to
      control panel
      Hardware and settings
      U will see Arduino under “ports”
      Click on the it
      Go to advanced settings change the port number
      Also click on update driver software.
      This should serve the purpose

  34. I had completed my project but after streaming gcode to cnc it shows
    “M18 drives of ”
    And drawing is bad

  35. Hi sir..this us naren…Sir I made the CNC as it is in ur tutorial .But my CNC is unable to draw clear drawings .Sir cud u plz help.
    Also as soon as I connect the servo motor to the motor shield it starts ticking like the hand of a clock and the CNC stops working.
    Tq for all the videos

  36. Hi sir..this is naren…Sir I made the CNC as it is in ur tutorial .But my CNC is unable to draw clear drawings .Sir cud u plz help.
    Also as soon as I connect the servo motor to the motor shield it starts ticking like the hand of a clock and the CNC stops working.
    Tq for all the videos

  37. You really make it seem so easy with your presentation but I find this
    topic to be really something which I think I would never understand.
    It seems too complicated and very broad for me. I am looking forward
    for your next post, I’ll try to get the hang of it!

  38. I am new to web designing and it made me more confused when I stumble into this content-management-system thing. I’m planning to update a site that is not designed using JOOMLA and was wondering if I can use Joomla to update it..

  39. I’ve been thinking of moving from Joomla to WordPress because it’s much easier to use and much more convenient. But the problem is I have many posts, and I don’t know what to do… since I’m not a programmer or anything.. . How can I migrate from Joomla to WordPress?.

  40. “An interesting dialogue is price comment. I feel that it’s best to write extra on this subject, it might not be a taboo topic but usually persons are not sufficient to talk on such topics. To the next. Cheers”

  41. I am facing a problem uploading gcode file with
    some error related to java
    plss do contact me through mail

  42. Nice post. I learn something more challenging on different blogs everyday. It will always be stimulating to read content from other writers and practice a little something from their store. I?d prefer to use some with the content on my blog whether you don¡¯t mind. Natually I¡®ll give you a link on your web blog. Thanks for sharing.

  43. Ahaa, its pleasant conversation concerning
    this paragraph at this place at this web site, I have read all that,
    so at this time me also commenting here.

  44. Excellent beat ! I would like to apprentice while you amend your website, how could i subscribe for a blog web site? The account aided me a acceptable deal. I had been tiny bit acquainted of this your broadcast provided bright clear concept

  45. Magnificent goods from you, man. I’ve understand your stuff previous to and you are just extremely excellent. I actually like what you’ve acquired here, really like what you are stating and the way in which you say it. You make it enjoyable and you still take care of to keep it smart. I can’t wait to read far more from you. This is really a tremendous website.

  46. I was suggested this blog by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my difficulty. You are amazing! Thanks!

  47. After study a few of the blog posts on your website now, and I truly like your way of blogging. I bookmarked it to my bookmark website list and will be checking back soon. Pls check out my web site as well and let me know what you think.

  48. It is perfect time to make some plans for the future and it’s time to be happy. I’ve read this post and if I could I want to suggest you few interesting things or advice. Perhaps you could write next articles referring to this article. I wish to read more things about it!

  49. hi, very good job with that tutorial but i have 1 problem when i run the processing program with the gctrl and then press play it says me that size() can bu used here. and i dont know what to do, i tryied to make it as a comment but the window open so small and i cant see anything if you can mail me i´ll be joyfull thanks

  50. How do you do it??? I totally agree and i will be telling my buddies about this blog and sending it to my brother via instagram. Im such a watch fan……. Or anything push bike related!! lol

  51. Thank you, I have just been looking for information approximately this
    topic for ages and yours is the greatest I’ve found out so
    far. But, what in regards to the conclusion? Are you positive about the source?

  52. hi!,I love your writing so so much! share we keep up a correspondence extra about your post
    on AOL? I need a specialist in this house to unravel my problem.
    May be that’s you! Looking forward to peer you.

  53. i am kind of getting an error while saving the file in inkscape. Can you help me with that?
    The error is “Inkscape has received additional data from the script executed. The script did not return an error, but this may indicate the results will not be as expected. File C:\Users\Punyasloka Mahapatra\drawing.gcode could not be saved.”
    Please help me!!!

  54. hi.
    i connected the cd drive to arduino and tested it for its proper working.
    after i dump the code into arduino, i can feel the vibrations from micro stepper motor but isnt able to move the slide.
    does this mean i need to apply external supply of 9v and test for its movement??
    thanks in advance 🙂

  55. Hi sandeep,
    First of all, thanks for doing this full tutorial, but I’m still having troubles with the pen, so, I didn’t know how to tie the pen on the motor shaft.
    I would be grateful if you can be more specific and if it’s possible, show me a image or answer about how to tie the pen. I tried with glue, but it’s unestable and my plotter can’t draw.

Leave a Reply

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