CNC Plotter (Drawing and Writing Machine)
by Orange Digital Center in Craft > Printmaking
65 Views, 0 Favorites, 0 Comments
CNC Plotter (Drawing and Writing Machine)



This project was developed within the Orange Digital Center Morocco , a space dedicated to fostering innovation, creativity, and rapid prototyping. At the FabLab, individuals and teams have access to state-of-the-art tools, including 3D printers, laser cutters, and a variety of electronic and mechanical resources. The center provides a collaborative environment where innovators, entrepreneurs, and students can transform their ideas into tangible products. By focusing on sustainable and impactful solutions .
Are you ready to dive into the world of CNC machines and bring your creativity to life? This project will show you how to build an affordable yet powerful CNC plotter using Arduino and 28BYJ-48 stepper motors! Whether you're into drawing intricate patterns, designing precision layouts, or even getting into basic engraving, this project is a perfect gateway into the exciting world of CNC machines.
By using three compact 28BYJ-48 stepper motors to control the X, Y, and Z axes, you'll have a versatile plotter capable of moving precisely and smoothly across your canvas. With the power of Arduino as the brain, and the Universal G-code Sender (UGS) platform to process your designs, you’ll be able to send G-code instructions straight to your plotter. This means it can follow detailed commands to bring any design, sketch, or text to life!
Supplies
.png)
1- Arduino UNO:
- The brain of your CNC plotter, which will run the code and control the motors. You'll program this with G-code instructions.
2- 3x 28BYJ-48 Stepper Motors with ULN2003 Driver Boards:
- These motors will handle the movement of the X, Y, and Z axes. The ULN2003 driver boards allow you to control the stepper motors using the Arduino.
3- Jumper Wires:
- Essential for making connections between the Arduino, stepper motor drivers, and other components.
4- USB Cable:
- For connecting the Arduino to your computer, both for power and for uploading code.
5- Micro Switches (Limit Switches):
- These switches act as endstops to prevent the motors from moving beyond the boundaries of the plotter for x and y axis. They help the machine identify its "home" position.
6- 5mm Plywood and Screws:
- The base structure for your plotter. You’ll use these to create the frame and axis guides for the machine.
3D Parts and Assembly

This image showcases the 3D-printed components of your CNC plotter, forming the mechanical structure that controls the movement of the pen or toolhead. The black 3D-printed rails house the 28BYJ-48 stepper motors, which drive the X and Y axes with precision. The motors are connected to gear-driven mechanisms, ensuring smooth and accurate motion along each axis. The pen is mounted on a movable holder, allowing it to lift and lower for plotting, controlled by a third motor on the Z-axis. The frame, reinforced by wooden supports, provides stability to the overall setup, while a white plate is used as the surface for placing paper, ensuring the pen glides smoothly during the drawing process. The 3D models for these components were carefully designed to ensure precision and ease of assembly, making this CNC plotter both reliable and easy to replicate for other makers.
I have uploaded all 3d parts below :
Testing the Stepper Motor

Before moving forward with the full CNC plotter setup, it's important to test the stepper motor to ensure everything is functioning correctly. The diagram above shows the basic wiring needed to test one 28BYJ-48 stepper motor using an Arduino UNO and the ULN2003 driver board. Here's how you can set it up and test the motor:
Wiring:
- Connect the Stepper Motor to the Driver Board:
- The stepper motor has a 5-wire connector, which fits directly into the corresponding port on the ULN2003 driver board. Make sure it's securely attached.
- Connect the Driver Board to the Arduino:
- IN1 (on the driver board) → Arduino D8
- IN2 → Arduino D9
- IN3 → Arduino D10
- IN4 → Arduino D11
- Power the Circuit:
- The GND (ground) pin of the Arduino should be connected to the GND pin on the driver board.
- The VCC (5V) pin on the Arduino should be connected to the VCC pin on the driver board, providing power to the stepper motor.
- Power Supply:
- The stepper motor can also be powered directly through the driver board using a 5V power supply connected to the power terminals on the ULN2003. Make sure the ground of the power supply is also connected to the Arduino ground to avoid electrical issues.
The code to test the stepper motor is uploaded below—simply upload it to your Arduino to run the stepper motor :
Downloads
Wiring the Circuit for Your CNC Plotter



In this step, we will establish the connections between the Arduino and the stepper motor drivers to control the movement of your CNC plotter. Each stepper motor requires a driver, and the connections are made as follows:
- X-Axis (Stepper Driver 1):
- Pin 1: Connected to Arduino D2
- Pin 2: Connected to Arduino D3
- Pin 3: Connected to Arduino D4
- Pin 4: Connected to Arduino D5
- Z-Axis (Stepper Driver 2):
- Pin 1: Connected to Arduino D9
- Pin 2: Connected to Arduino D10
- Pin 3: Connected to Arduino D12
- Pin 4: Connected to Arduino D13
- Y-Axis (Stepper Driver 3):
- Pin 1: Connected to Arduino A5
- Pin 2: Connected to Arduino A4
- Pin 3: Connected to Arduino A3
- Pin 4: Connected to Arduino A0
Each driver controls a specific motor, allowing precise movements across the X, Y, and Z axes. Additionally, it’s crucial to connect the power supply properly: the ground (GND) of the power supply should be connected to the Arduino ground (GND) to ensure a common reference point for the entire circuit. The power supply should also connect to the stepper motor drivers, providing them with the necessary voltage to operate. By maintaining this setup, your motors will receive consistent power, enabling smooth and accurate plotting.
This wiring arrangement forms the backbone of your CNC plotter, ensuring that each component works in harmony to execute your G-code instructions effectively.
Preparing G-code File With Inkscape






- Import the SVG File and Adjust Page Size
- Open Inkscape.
- Import your SVG file by going to File > Import and selecting the design you want to plot.
- Adjust the page size to match your machine's plotting area by navigating to File > Document Properties and setting the dimensions accordingly.
- Set Orientation Points
- Go to Extensions > Gcodetools > Orientation Points.
- Apply this extension to place reference points on the design, which will guide the CNC machine in understanding the coordinates and orientation.
- Convert Path to G-code (.ngc)
- Navigate to Extensions > Gcodetools > Path to Gcode.
- In the dialog that appears, adjust the following parameters:
- Biarc interpolation tolerance: Set to 1.0 (or your desired value).
- Maximum splitting depth: Set to 4 (or your desired value).
- Cutting order: Select “Subpath by subpath” for processing each part of the drawing separately.
- Depth function: Set to 1 unless your plotter requires specific depth values.
- Ensure Sort paths to reduce rapid distance is checked.
- Click Apply to generate the G-code. Make sure the output format is set to .ngc.
- Export the G-code File (.ngc)
- Save the generated G-code by going to File > Save As and choosing the format as .ngc.
These steps should help you successfully create a .ngc file for your Mini CNC Plotter. Let me know if you need any more assistance!
I will provide the G-code file for this house design (40 x 40 mm) below
Note : For more detailed instructions and visual guidance, be sure to check out the video tutorial in Step 6.
Downloads
Setting Up Universal Gcode Sender for CNC Plotter Control


1- Install Universal Gcode Sender Platform:
- Download and install the Universal Gcode Sender (UGS) software from its official website.
2- Upload GRBL to Arduino:
- Open the Arduino IDE.
- Install the GRBL library if you haven’t already.
- include the library in your arduino IDE
- Go to File > Examples > GRBL > GrblUpload and upload the example sketch to your Arduino.
Open UGS Platform:
- Once GRBL is uploaded to the Arduino, launch Universal Gcode Sender platform.
- Connect to your Arduino through UGS using the correct port and baud rate (typically 115200).
- Then follow the steps shown in the video (step6) to configure UGS for your CNC plotter.
Note : For more detailed instructions and visual guidance, be sure to check out the video tutorial in Step 6.
Downloads
Running the CNC Plotter With a Complete Video Guide

I provide a comprehensive video tutorial that walks you through each stage of the G-code generation process for your Mini CNC Plotter. From importing the SVG file and adjusting the page size to setting orientation points and converting paths to G-code, this video covers it all in detail. Additionally, I will demonstrate how to implement the generated G-code file in Arduino, connect your Arduino board with Universal Gcode Sender, and run the CNC plotter. Whether you're a beginner or looking to refine your skills, this step-by-step guide will help you understand and visualize the entire procedure. Watch closely, and you'll be ready to bring your designs to life!