This week we are planning to make a gantry structure 2D CNC plotter or the x-y plotter. It has a two axis control and a special mechanism to raise and lower the pen. The plotter has graper on its x-axis where the pen goes through and is fixed via screw. It was designed to print on any paper of A4 size. Each axis is powered using a single stepper motor and belt. Pen control is also achieved using a stepper. Steppers are connected to a CNC shield for the stepper motor driver which can be placed right upon the arduino UNO. 12V external power supply is needed to power all the electronics and motors. Overall plotter is controlled via arduino UNO. Arduino is programmed using GBRL library so it can read the G-code. Open source g code sender is used to send the data from computer to plotter.
In FABLAB Khairpur, we are only two students. So we have divided our work for this week. First of all and most important part of the assignment is 3D designing of different parts. So we have divided the parts. Below parts are designed my me.
First of all we have designed the 3D parts for the 2d CNC Plotter by using the Solid Work and Print them by using the 3D Printer Ultimaker 2+.
Open the solidworks. Frist, I have designed the Corners 3d parts on which rods will be fixed. We need 4 peice of this part. Frist of all the draw the shape then Extrude it. Draw the throgh hole on center for the corner fixing. Through hole both side for y axis fixing.
Now draw two circle of 8mm on the side of the part. Extrude though cut the the circle for x axis fixing. Then draw the reactangle of 8mm width. Extrude cut it to 8mm. After that Fillet the Inner side so that rod can be fixed easily.
Now design the pully support for the y-axis. So draw the rectangle and extrude it. Use the fillet to fillet the both corners.
Draw the rectangle on the top and extrude cut through all. Select the side and draw circle of 3mm on the side and extrude cut through all for the fixing the pully. Draw another circle on other side of 8mm and extrude cut it.
Same Process apply for all design so now design the stepper motor stand for the Y axis support. Draw and extrude cut the two holes for support. Cut the unnecessary area and then fillet the corners.
These all parts are design in Solid Work and save as .stl formate. Then all these opened in Cura software. From there gcode is generated. That gcode is given to the 3D printer. We are using Ultimaker 2+. Printing of parts of the 2D CNC plotter is shown in video.
This is result of 3D printing. All the files are printed in this way.
We combinely done the assemble of the plotter. For this first we took the all the parts then started with assemble from base.
this is the overall Iron material required for the 2D CNC plotter and with steper motors.
3D printed parts after printing and Assembling the with threaded rods. 3D printed parts are inserted into threaded rods by faisal then we start assembly of overall plotter.
Now we have start to assamble the base of the plotter so first we have assembled Iron rodes with 3D stand parts and then fixed with U shaped Stand.
While the Assambly of the Base.
We have fixed base stand and rodes with Nuts.
Fixed the stand with nuts. Now the Base of Plotter is alomost ready.
Now we have fixed the Pully for the Y axis.
Now time to fixed the Stepper motor for the Y-axis movements.
This is the Paper stand where paper is fixed for the sketch.
We have complete the Gantry Structure of the 2D plotter.
Now we have fixed the Stepper Motor for the X-axis dircetion. This is the upper Arm after the fixing the Iron Rods.
Now we have fixed upper Arm with the Plotter Stand.
After the Fixing the Upper Arm now we have also fixed the Stepper motor for the Z-axis(end factor motor).
Assembly for end factor(Pen holder). This will be fixed to the z-axis motor.
Another part which i have done is electronics. Now time to add electronics to make it automate and actuate. For microcontroller i am using Arduino UNO board and for motor driver we are using cnc sheild for arduino uno.
The Arduino Uno is an open-source microcontroller board based on the Microchip ATmega328P microcontroller and developed by Arduino.cc. The board is equipped with sets of digital and analog input/output pins that may be interfaced to various expansion boards and other circuits.
Arduino CNC shields provide an Arduino microcontroller with the power necessary to drive stepper motors and run all the other functions that contribute to a CNC machine's operation. Depending on the shield, this could include end stops, spindle speed control, and probing.
First of all fix the cnc sheild on top of the arduino. Attached it to the CNC plotter and connect the motor wires to the CNC sheild. Connect the arduino with PC via USB cable.
After setting all the hardware connections and assemble, now it is time to setup the software for CNC Plotter. Below attached the Arduino CNC machine overview.
GRBL is an open source software or firmware which enables motion control for CNC machines. We can easily install the GRBL firmware to an Arduino and so we instantly get a low cost, high performance CNC controller. The GRBL uses G-code as input, and outputs motion control via the Arduino . From the diagram we can see where the GRBL take place in the “big picture” of the working principle of a CNC machine. It’s a firmware that we need to install or upload to the Arduino so it can control the stepper motors of the CNC machine. In other words, the function of the GRBL firmware is to translate the G-code into motor movement.
G-code, which has many variants, is the common name for the most widely used computer numerical control programming language. It is used mainly in computer-aided manufacturing to control automated machine tools. G-code is a language in which people tell computerized machine tools how to make something.
First, in order to be able to install or upload the GRBL to the Arduino we need the Arduino IDE. Then we can download the GRBL firmware from github.com . Download as .Zip. Extract the gbrl-master.zip. Open the Arduino IDE, navigate to Sketch > Include Library > Add .ZIP Library. Navigate to the extracted folder “grbl-master”, in there select the “grbl” folder and click the open file. Now we have to GRBL as an Arduino Library.
navigate to File > Examples > grbl > grblUpload. A new sketch will open and we need to upload it to the Arduino board. Don't worry code has only one line. Connect the arduino. Select the port and click upload. Done uploading. Now your arduino can understand the G-Code.
Open the serial monitor and set the baudrate 115200 and enter the "$$" in serial moniter. List of command will appear. This shows that firmare is install correctly.
Now plotter is ploting the shape of elephent.
This is the first version of the plotter. It is working fine but can be improved in many areas. First thing which we want to see in future if any other person wants to work on it, is to add multiple pens in the header. It will be great thing to watch if the sketch made of multi-color pens. Automatically one pen goes up and the other comes down and starts sketching. Another thing is smoothness in movement. It is working smoothly but sometimes there is some jerk in it. Stepper motor can be replaced with BLDC motor for faster working. Writing area is A4 size. This can be increased as well.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Email: farhan.shah@iba-suk.edu.pk