Build a simple 3D printed CNC plotter machine
Hi friends, do you remember this Mini CNC Plotter machine that uses hobby stepper motors and a few 3D mechanical components, now meet its big brother. This new machine includes two linear rails and two Nema 17 stepper motors for the X and Y axes. It also uses a mini servo motor for the Z axis to lift the pen. There is also a wheel with mini bearings to support the linear rail on the Y-axis. In the circuit part, I used an Atmega-based printed circuit board that I designed, which enables control of 3 axes, 3 limit switches, and a servo motor. Of course, all the mechanical parts are assembled with the help of designed 3D parts. Let's start the project by assembling the 3D parts and all the hardware step by step.
Step 1: 3D Parts and Hardware
First, let's examine the design of this CNC machine. The two main components are MGN15H linear rails with their corresponding sliding blocks. The motion for the X and Y axes is provided via two GT2 Belts and some GT2 pulleys. As for the Z axis, we have a simple reciprocating motion where the moving part slides up and down via two 6mm linear bars and appropriate springs. A small hobby servo provides this movement. A limit switch is used for each axis for homing and safe movement. The 3D models are attached, the models that need to be printed in two pieces are marked as ‘2x’.
Here is a list of components required for assembly. The list of electronic components can be found in the circuit diagram section of the article.
- MGN15H Linear Rail
- Linear Rod 6mm (Length approx. 150mm)
- Spring 8mm
- Stepper Motor (NEMA 17 or equivalent)
- GT2 Belt (Approx. 2 metres in length and 6mm in width)
- GT2 Tooth Pulley (20 teeth 5mm)
- Tension spring for belt
- GT2 Idler Pulley (20 Teeth 5mm)
- Bolts and Nuts set (Mixed length 2M/3M/4M/4M/5M)
- Bearing 605-ZZ (5x14x5mm)
Step 2: Assembling the X-axis
We can start the first step of machine assembly. Secure the 2 base plates for the X-axis and the 2 linear rail brackets together using a few M3 bolts. Once the two sides are ready, insert the X-axis linear rail into the brackets on both sides and fix them with the help of M5 bolts. MGN15H rails are available in various variations in some markets. As the name suggests, the width of all types is standard 15mm, but some linear types may be different in height, hole widths, and distances between the holes. In this case, the linear rail specifications I use:
- Rail width (W): 15mm
- Rail thickness (H): 15mm (different type 10mm)
- Hole Pitch (P): 60mm (different type 40mm)
- Hole Width (d): 5mm (different type 3.5mm)
In summary, some linear rails may differ, so you may have to drill the 3D bracket part with a drill according to the ‘Hole Pitch (P)’ or you may have to update the 3D model. Other differences in dimensions should not be a problem.
Step 3: Assembling the Y-axis
Now for the Y-axis linear rail assembly. The Y-axis must run above the X-axis linear block and a 3D part called a mounting plate is used to join both axes. First, we can mount the two NEMA 17 stepper motors. One is mounted on the top side of the plate and the other on the bottom side with M3 bolts. Then, two M5 bolts and nuts are fixed to the plate to install the GT2 pulleys in place. The two idler pulleys here are used to provide engagement for the X-axis GT2 belt and stepper motor pulley. It is recommended that the stepper motor gear pulley and the idler pulleys be almost flush. I used several nuts to align the idler pulleys.
Next, I placed the Y-axis linear rail on the plate and fixed it with two M5 bolts. The linear rail hole spacing in the X-axis applies to the Y-axis linear rail, if the hole widths and spacing are not compatible, you can create compatible holes with the help of a drill. After mounting the Y-axis linear rail, the two axes are connected to each other by fixing the mounting plate to the X-axis linear block using four M4 bolts.
Now that the machine has almost taken its main shape, we will add a pulley to the other side of the Y-axis linear rail, that is, to its idle end. This pulley will allow the belt for the Y axis to be installed in a cycle. You can choose this pulley as a toothed or idler pulley, I used a toothed pulley. For the assembly of the cycle pulley, I mounted the 3D part called ‘Y-axis Pulley’ to the linear rail with an M3 bolt. I also designed a support part due to the length of the Y-axis linear rail and the weight of the pen lifter part. In this way, I solved the wobble problem for this axis. I also designed a wheel with a bearing for smooth movement of the support part. I fixed the wheel with bearing to the support part with M5 bolt, and fixed the support part to the pulley part with M3 bolt. Now the Y axis linear block can reach any position in the workspace.
Step 4: Assembling Pen Lifter and Belts
Now, before the pen lifter, let's assemble the X-axis belt. The X-axis belt is passed between the stepper motor pulley and idler pulleys to provide tension, connectors are connected to each end of the belt and these connectors are fixed to the base side plates with an M3 bolt. If you need more tension, you can choose a tension spring.
Now we can proceed to assemble the pen lifter part. This mechanism consists of two models; one model to be fixed to the Y axis linear block and the other model to move the pen up and down. Firstly, I set the servo motor to 180 degrees angle, and mounted it to the fixed model using the screws that come with the servo motor. Then I placed the pen holder moving model with two springs and two 6 mm rods to the fixed model. When the servo motor is at 180 degrees angle, the pen will stay in the down position, and when the servo motor is at 150 degrees angle, the pen will stay in the up position. The springs will provide tension to push the pen mechanism down.
After assembling the pen lifter model to the Y axis linear block using M4 bolts, we can proceed to connect the Y axis belt. Connect the connectors to both ends of the belt and then secure the belt to the pen lifter using M3 bolts by passing the belt through the stepper motor pulley and the other end of the linear rail. You can use the bolt sliding slots to adjust the belt tension during fixing. You can also increase the tension level by including a tension spring.
Actually this is all in the hardware part, finally I placed the X and Y limit switches in their locations using 2M bolts.
Step 5: Circuit and Connections
You can optionally use Arduino UNO board and CNC shield in the circuit section, but I designed a printed circuit board with all components together, I use PCBWay for circuit board printing service. You can choose PCBWay for low-budget and high-quality PCBs.
Only the CH340 USB communication chip on the board is SMD type, you may need to be a little careful when soldering. Contact between the legs may cause a short circuit. All other components are easy to solder. If you do not have soldering experience, you can get this board assembled from PCBWay, all you need to do is to select the ‘PCB+Assembly’ option on the PCB page.
Note: The circuit is in 1/16 micro-stepping mode. That is, in full-step mode. So, Motors 17HS4401 Nema 17 rotates 1.8° per step, i.e. 200 steps per full revolution (360° / 1.8° = 200 steps). 1/16 Microstepping: 200 full steps × 16 = 3200 micro-steps/revolution
The circuit board is Atmega328P based and provides control of 3 axes, 3 limit switches, and a servo motor. The project includes two stepper motor axes and it is sufficient to install two standard A4988 stepper motor drivers. Based on the datasheet of the stepper motors used, the required current value should be set with the current screw on the driver. When measuring, you must provide 5-volt power to the card via USB.
If the board is ready, let's make the connections. Connect the X-axis, Y-axis, and servo motor. Then connect two limit switches. Finally, connect a 12-volt and approximately 3-amp power supply. Now let's move on to the software part.
Step 6: Installation of GRBL
First, we need to add and use a library called ‘grbl-mi’, which is specialized for servo motors. You can access the library from this GitHub link - https://github.com/DIY-Machines/CNC-DrawingMachine
After the library installation is complete, find grbl-mi from the Examples and upload the grblUpload code to the board. After uploading this code to the board, switch on the serial monitor, select the baud rate of 115200, then enter the $$ command to list the grbl parameters. The parameters listed are specific to this machine. But don't worry, many parameters are standard and a brief description of each parameter is provided. The important point here is to make sure you enter the correct values for ‘stepper motor steps in millimeters’ and ‘device dimensions’.
A brief information about the step:
- 17HS4401 Nema 17 rotates 1.8° per step, i.e. 200 steps per full revolution (360° / 1.8° = 200 steps).
- 1/16 Microstepping: 200 full steps × 16 = 3200 micro-steps/revolution
- Each tooth of the GT2 belt used provides a distance of 2 mm (tooth pitch is 2 mm).
- Using a GT2 pulley with 20 teeth. This means that when the pulley makes one full revolution, the belt travels 20 teeth x 2 mm/tooth = 40 mm.
In this case, I have set it to 80 steps/mm, which means that for 1.0 mm of movement, the motor has to take 80 steps, which will give exactly 1 mm of movement.
GRBL Parameters:
$0=10 (step pulse, usec)
$1=25 (step idle delay, msec)
$2=0 (step port invert mask:00000000)
$3=0 (dir port invert mask:00000000)
$4=0 (step enable invert, bool)
$5=0 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=2 (status report mask:00000010)
$11=0.010 (junction deviation, mm)
$12=0.002 (arc tolerance, mm)
$13=0 (report inches, bool)
$20=0 (soft limits, bool)
$21=1 (hard limits, bool)
$22=1 (homing cycle, bool)
$23=0 (homing dir invert mask:00000000)
$24=25.000 (homing feed, mm/min)
$25=750.000 (homing seek, mm/min)
$26=250 (homing debounce, msec)
$27=5.000 (homing pull-off, mm)
$100=80.000 (x, step/mm)
$101=80.000 (y, step/mm)
$102=250.000 (z, step/mm)
$110=4000.000 (x max rate, mm/min)
$111=4000.000 (y max rate, mm/min)
$112=4000.000 (z max rate, mm/min)
$120=30.000 (x accel, mm/sec^2)
$121=30.000 (y accel, mm/sec^2)
$122=30.000 (z accel, mm/sec^2)
$130=300.000 (x max travel, mm)
$131=250.000 (y max travel, mm)
$132=200.000 (z max travel, mm)
Step 7: Universal G-Code Sender
After uploading the code to the board, download and install the Universal G-Code Sender (https://winder.github.io/ugs_website/) software for machine control. You can think of this software as an interface for machine control.
After opening the software, select the USB port to which the board is connected, after the connection with the board is established, you will see the machine parameters on the console screen again. Every change you make in the software will update these parameters. Also, when connected to the machine, the software switches to alarm mode and locks the machine for security purposes. You can switch to normal mode by clicking Unlock.
Then open the ‘Setup Wizard’ section of the software. In the Motor Wiring section, check whether your motors rotate in the correct directions by making small movements and use the reverse motion option if you want.
Step Calibration section, you can define the zero point of the machine by moving the machine axes. It would be better to manually bring the machine to zero point every time you run it and click ‘reset to zero’. Remember, when moving it manually you have to cut the motor power.
If you want, you can check the limit switches in this section and trigger them in the opposite direction. In the limit switch tests, the software will activate the alarm mode and stop the machine.
Then let's do ‘Homing’, the important point here is to make sure that the motors are moving in the right direction before starting the homing process and be prepared to cut the power to the motors just in case.
When the homing process is complete, cut the motor power and manually bring the machine to zero point. Now the machine is ready, every time you open the software, bring the machine to zero and click the ‘reset to zero’ button.
Step 8: Creating G-Code
To use the software we need a G-Code and for this, we will use Inkscape. Firstly download this version of Inkscape and complete the installation.
Then download a popular extension ‘4-xi Draw’ extension developed for Inkscape. then export the ZIP files and copy all the files in the folder. Paste the copied files into Inkscape's extensions folder.
Open Inkscape and go to Page settings where you set the aspect ratio to close to the machine dimensions in millimeters.
Then import any image you want and place it on the page. Select the image and then open Trace Bitmap. In this section, you only need to press the ‘OK’ button and then delete the first imported image.
From the Extensions section, go to 4-xi Draw and open the ‘Create Pen’ tool. In this section update the servomotor up and down position angles, define the file name, and click on the ‘Apply’ button. In a few seconds, the image will be created with G-Code and transferred to the specified directory.
Now go back to the Universal G-Code Sender software, manually move the machine to zero, select the port to which the machine is connected, select "reset to zero" and then import the G-Code. Press the Run button and the drawing will be started. That's all, we've come to the end of another project. Thank you for reading.
Build a simple 3D printed CNC plotter machine
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(4)
- Engineer Dec 01,2024
- Engineer Dec 01,2024
- MERT KILIC Nov 06,2024
- Prasanna K Nov 05,2024
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by MERT KILIC
- Creative Pogo LED Lighting Design Hi everyone! Welcome to my latest project: a modular, plug-in LED lighting system that is as fun as ...
- Build a simple 3D printed CNC plotter machine Hi friends, do you remember this Mini CNC Plotter machine that uses hobby stepper motors and a few 3...
- Circuit Activity Board - Educational Electronics Circuit Activity Board – A Hands-On Project to Learn Basic ElectronicsIn this project, we're going t...
- Build a Simple 3D Wall Lighting Hi friends, this project shows how to make and control 3D hexagonal LED lighting panels. The project...
- Robot Sumo Board Robot-sumo, or pepe-sumo, is a sport in which two robots attempt to push each other out of a circle ...
- ESP32 Mecanum Wheels Robot and Bluetooth Gamepad Controller In this project we will see how to make an ESP32 Mecanum Wheels Robot which is capable of moving in ...
- DIY Motorized WiFi Roller Blind - ESP8266 & Blynk In this project we will see how to control a roller blind via a smartphone application. The reason w...
- Pet Feeder Controlled Via WiFi - ESP8266 How It Works?As you can see, a 3D design was used for the pet feeder. ESP8266-based Wemos D1 Mini bo...
- ESP8266 Two Wheel Robot (NodeMCU and Stepper Motor) Generally, robot cars are built on a chassis with 2 DC motor wheels and a bovine wheel. While surfin...
- 3D Printed Rotating Table Board with Arduino Nano and 28BYJ-48 Stepper Motor This project shows how to make a 3D printed Rotating Table using Arduino and a hobby stepper motor. ...
- Hand Gesture Controller for Robotic Hand Gesture Controller for RoboticThe hand gesture controller makes it possible to control applicat...
- How To Make DIY Remote Control Hoverboat at Home In this video, I showed you how to make your own hoverboat from materials available at home and chea...
- How to Make DIY Arduino Gesture Control Robot at Home Parts Required for Receiver (Tank):1) Robot Tank Chassis - https://bit.ly/3j8y2Q52) Arduino Nano V3 ...
- DIY Circuit Activty Board with Paperclips | MAKER | STEM You can be creative and design your own circuit and add different sensors (other LEDs...). The idea ...
- ATtiny85 Wearable Activity Tracking Watch How to make the wearable activity tracking watch? This is a wearable gadget designed to vibrate when...
- Face With Animatronic Eyes, Motion Detection and Voice Are you ready to create something both eerie and captivating? This project combines 3D printing, ser...
- Build a simple 3D Arduino Mini CNC Plotter Hi friends, we will see how to make a simple and awesome mini CNC plotter machine in this project. I...
- Build a simple 3D Sphere Drawing Robot (SphereBot - EggBot - EggDuino) Hi friends in this video we will see how to make a simple and awesome sphere drawing robot. Actually...
-
-
-
kmMiniSchield MIDI I/O - IN/OUT/THROUGH MIDI extension for kmMidiMini
109 0 0 -
DIY Laser Power Meter with Arduino
156 0 2 -
-
-
Box & Bolt, 3D Printed Cardboard Crafting Tools
152 0 2 -
-
A DIY Soldering Station Perfect for Learning (Floppy Soldering Station 3.0)
543 0 2