Professional Documents
Culture Documents
by MegaDAS
Hey guys! I Hope you already enjoyed my previous instructable "How to make your own Arduino training platform"
and you are ready for a new one, as usual I made this tutorial to guide you step by step while making this kind of
super amazing low cost electronic projects which is the "CNC plotter machine" known also as "CNC drawing" or
just "Arduino CNC machine". ^_^
I found lots of tutorial accross the web that explains how to make a CNC Plotter, but with the lack of information it
was a bit difficult to make such machine, thats the reason why I've decided to start this instructable where I will
show you in details how to easily make your own drawing machine.
This project is so handy to make specially after getting the customized PCB that we’ve ordered from JLCPCB
to improve the appearance of our machine and also there is enough documents and codes in this guide to allow
you create your machine easily. We've made this project in just 5 days only, just three days to get all the needed
parts and finish the hardware making and the assemble, then 2 days to prepare the code and start some
adjustments. Before starting let’s see first
https://www.youtube.com/watch?v=ojkWbfhy7gg
Since I've made this instructable for beginners, I Another word to mentioned "axis", yes, each CNC
should explain in details first what is the drawing machine has a defined number of axis that will be
machine and how it works! controlled by the computer program.
As it is defined in wikipedia, CNC stands for In our case the CNC plotter that we made is a double
Computer numerical control, a machine which is a axis machine "details in picture 1" that has a small
computer-controlled structure that receives stepper motors in its axis "stepper in picture 2" these
instructions through a serial port sent from a steppers will move an active tray and make it move in
computer and moves its actuators depending on the a double axis plan to create the drawing design using
received instructions. Most of these machines are a drawing pen. The pen will be holded and released
stepper motor based machines which includes using a third engine in our structure which will be a
stepper motors in theme axis. servo motor.
A stepper motor or step motor or stepping motor is a shows picture 3, we will need two of them.
brushless DC electric motor that divides a full rotation
into a number of equal steps. The motor's position Once you get your motors from the DVD reader, you
can then be commanded to move and hold at one of should make them ready to use by identifing the
these steps without any position sensor for motor coils ends. Each stepper motor has two coils
feedback(an open-loop controller), as long as the and using a multimeter you can identify the coil ends
motor is carefully sized to the application in respect to by measuring the resistance between the motor pins
torque and speed. connector "as show picture 5" and for each coil it
First verse, from where to get the stepper motors for should be about 10Ohm measured. After identifing
our project, well easy, just grab an old DVD reader the motor coils just solder some wires to control the
like the one in picture 1 above, I’ve got two for 2 motor through them "see picture 6"
dollars, than all what you need to do is disassemble it
to extract the stepper motor and its support, as it
The heart of our machine is an arduino Nano Dev in order to connect all the needed parts together with
board that will control the movement of each actuator our Arduino board I've made the circuit diagram that
depending on the instruction received from the shows picture 1 where you should follow the same
computer, in order to control these stepper motors we connection for both stepper motors and the servo
need a stepper motor driver to control the speed and motor.
direction of each actuator.
The picture 2 explain in details through a schematic
In our case we will use an L293D H bridge motor the circuit diagram and how it should be the links
driver "see picture 3" which will receive the motor between the Arduino and the other components, for
command sent from arduino through its inputs and sure you can adjust these links depending on your
control the stepper motors using its outputs. needs.
Download
https://www.instructables.com/ORIG/FGV/MO4O/JQMO6ZOF/FGVMO4OJQMO6ZOF.pdf
…
In order to bring a better appearance for our machine used a 5mm MDF wood material to get these parts
I decided to designe these three parts "see picture 1" produced. Yet another designe which is the drawing
using Solidworks software, these parts will help us pen holder, I've got it through a 3D printing process.
to assemble the DVD readers together, I’ve got the And you can download all the related files from the
DXF files of these parts and with the help of my links down below.
friends in FabLab Tunisia I’ve got the designed parts
produces using a CNC laser cutting machine, we
Download
https://www.instructables.com/ORIG/FKX/M4HT/JQMOBDS6/FKXM4HTJQMOBDS6.rar
…
Download
https://www.instructables.com/ORIG/F6S/H45W/JQMOBDYE/F6SH45WJQMOBDYE.rar
…
Now let’s review the necessary components that we need for this project, I'm using an Arduino Nano as mentioned
above, it will be the heart of our machine. The project also include two stepper motors with them drivers ICs and a
servo motor. You will find bellow some recommended amazon links for the appropriate items
9
12
10 11
8
3
2 1 4 6 7
We move now to the soldering assembly of all the electronic components. As usual you will find on the top silk
layer a label of each component indicating its placement on the board and this way you will be 100% sure that you
will not make any soldering mistakes.
/************************************************************************************************************************************************************************
* - Author : BELKHIR Mohamed *
* - Profession : (Electrical Ingineer) MEGA DAS owner *
* - Main purpose : Industrial Application *
* - Copyright (c) holder : All rights reserved *
* - License : BSD 2-Clause License *
* - Date : 20/04/2017 *
* ***********************************************************************************************************************************************************************/
// * Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED
/*
*/
#include // Include the stepper Motor librarie
const int stepPerRotation = 20; // Number of steps by turn. Standard value for CD/DVD
void setup()
{
myStepperX.setSpeed(100); // Stepper motor speed
myStepperX.step(100);
delay(1000);
myStepperX.step(-100);
delay(1000);
}
void loop() {}
We continue the assembly of our structure by then we screw the servo motor to its placement "see
screwing the second stepper motor to the Y axis plat picture 4", the pen holder is ready so we stick it to the
"see picture 1". Once preparing the Y axis you will carriage of the Y axis using some hot glue or any
have both axis ready to create the double axis plan other means to make it able to slide on the Y axis
that we spoke about it in the first step "see picture 2". following the stepper motor steps "see picture 5",
all what you need to do is placing the two axis in a then we stick our active plat to the carriage of the X
90° "see picture 3". axis "see picture 6", and we finish with the screwing
of the engines wires to them connectors on the board.
Making of the pen holder After some arrangement, we have our mechanical
We prepare the pen holder by placing a small axe design ready for the action 'see picture 7'.
into a spring to hold the 3D printed pen holder and
Moving to the software part, we will combine three it on MakerBat unicon format 'see picture 5,6', if this
softwares in order to turn the machine alive, I've format is not available on your Inkscape version, you
made a short description in the first picture, we will can place an add-on to have it, once you click on
make our design using Inkscape software that (save) a new window will appear for Gcode file
produces a gcode file needed for our machine and for parameters adjustments, all what you need to do is
sure in order to understand the gcode instructions the following the same adjustment as ours and everything
machine should have its own code that we will be will be fine just follow 'picture 7,8,9' then you set
uploaded using Arduino IDE software, the last part is these parameters this way, and you have your gCode
how to link the machine’s code to the gcode file, this file.
is performed by processing software.
Note : you can't save the Gcode file under the
The first step is uploading the arduino board scketch required format if you are using an Inkscape
that you can download from the link down below and version higher than version 0.48.5
do not forget to update the stepper motors pin
Linking the machine to the Gcode file 'Processing 3'
according to your shcematic.
Moving to processing software, it is a bit like the
Arduino IDE 'see picture 10' so you should open the
Note : if you are using the same schematic as ours
'CNC program' file That you can download from the
so the code will be working fine and no need to
link down below and just run it 'see picture 11', a
change anything in it.
second window will appear, you need to press the
latter p in you keyboard to select the COM port of the
Preparing the Gcode 'Inkscape' machine 'see picture 12', and press the latter g to
Then we move to Inkscape and we adjust some select the desired gcode file, once you select it the
parameters 'see picture 1' like the paper frames and machine will directly start drawing.
units 'see picture 2' , we prepare our design and save
And here we are the time is here for some test, once rel="nofollow">how to make your own arduino
uploaded the Gcode file the machine start drawing training platform". And subscribe to our YouTube
and I really liked the LED flickering that shows the channel for more awesome videos.
sequences sent to each stepper motor.
One last thing, make sure that you are doing
The designs are very well done, and you can see electronics everyday
guys the project is amazing and easy to make as
well, It was BEE MB from MEGA DAS see you next time