Group Project: CNC Drawing Machine

Introduction

As part of the group project for Fab Academy 2025, we designed and built a CNC machine capable of drawing on paper using a pen mounted on the Z-axis. This drawing CNC uses stepper motors and belts to move in the X and Y directions, and a servo to lift and lower the pen. The project required the integration of mechanical design, electronics, and programming to bring the machine to life.

VCarve layout

Proccess of making the CNC

Teammates

Marilu

Maria De Lourdes Diguero Ferreira

Individual contribution
Javier Osorio

Javier Osorio

Individual contribution
Saul Jarquim

Saúl Adair Jarquin Ramos

Individual contribution

First Design

To design the structure of the CNC, we found this image of a CNC model with measurements. The dimensions and overall shape of the structure served as a useful reference to guide the design of our own CNC.

CNC reference model

For the holes, we considered the dimensions of the bearings to place them correctly within the structure, allowing the 8mm Acme screw to pass and rotate smoothly without interference.Later on , we present the bearing plane

As part of the initial design process, we created individual structural parts and assembled them virtually. This helped us visualize the shape and proportions of the CNC.

CNC reference model
After presenting the group’s design idea, we received feedback that led us to redesign the structure.

ReDesign Process in SolidWorks

Before anything else, I used SolidWorks in centimeters, as it was easier for me to visualize the measurements this way than in millimeters.

I first created a sketch using the tools Smart Dimension, Center Rectangle, and Trim Entities (Scissors). This shape would become the side panels of the CNC. Then, I extruded the sketch to match the thickness of the material, which is 1.3 cm. I also used the Fillet tool to round the corners and make the design smoother and safer to handle.

Extrusion Process

It’s important to remember that each side will contain different components. On one side, there will be a NEMA 17 motor and aluminum guides; on the opposite side, there will be a bearing block (chumacera) with a circular bearing.

Bearing Block Side

To design this side, we based it on the technical drawing of the KFL-08 bearing block (8 mm).

KFL-08 Bearing Block Drawing

Using this diagram, we created another sketch. I spaced the screw hole and the guide holes 5 cm apart to allow smooth movement and leave enough space for the mechanism. At the bottom, We added the connecting slots where the other pieces will be inserted—also with a thickness of 1.3 cm, matching the material. I then used the Fillet tool to round the external corners, improving the aesthetics and safety of the part.

Finally, I made a cut through the part to finish shaping the side panel.

Bearing Block Cutout

NEMA 17 Motor Side

This side is similar to the bearing block side in shape and structure, but it includes the necessary holes and mounting space for the NEMA 17 stepper motor.

NEMA 17 Technical Drawing

Using the NEMA 17 technical drawing, I created a new sketch in SolidWorks. We placed the motor mount holes at the center, aligned with the guide holes. Just like the other side, I kept 5 cm of separation between the motor hole and the aluminum guide holes to ensure smooth mechanical movement and enough space for the components. At the bottom, I added the notches for connecting to the rest of the CNC structure, with a matching material thickness of 1.3 cm. I also applied the Fillet tool to the corners to match the smooth design of the opposite side.

And with that, the NEMA 17 motor side of the CNC is complete.

Final NEMA 17 Side

Base Joints

After designing the side panels,we created the other two base joints following the same steps, only adjusting the dimensions to fit their placement in the structure. In this case, instead of cutting holes for tabs, I modeled the tabs themselves to connect with the previous parts. Again, the thickness used was 1.3 cm.

This is the base design for both pieces, as they share the same structural logic and only differ in size and the components they include.

And this is the structure assembly:

CNC Assembly

Preparing Files in VCarve and CNC Cutting

Once we had all the parts designed in SolidWorks with the correct measurements, we exported them as DXF files to be used in VCarve.

You can download a trial version of VCarve from the official Vectric website:

https://www.vectric.com/products/vcarve

Setting Up in VCarve

The material we used , MDF, heres a picture of the material we used:

Final NEMA 17 side piece

In VCarve, I created a new job with the following settings:

I imported the DXF files and arranged the parts to fit within the job area. Then, I set the toolpaths:

Exporting and Machining

Once everything was ready, I calculated the toolpaths and exported the G-code using the post-processor for our CNC machine . I saved the toolpath file as a .sbp file.

I secured the 1.3 cm material board on the CNC bed using screws on the corners and zeroed the X, Y, and Z axes on the top-left corner of the material.

With everything set, I ran the job and carefully monitored the machine during the entire cutting process.

Post-Processing

Once the CNC finished cutting, I made sure all joints fit together correctly, and I tested the assembly of the CNC sides and base.

VCarve layout

However, the machine did not cut the holes as expected. Because of this, we had to make the holes manually.

Drilling holes with ruler and drill Drilling holes with ruler and drill

The final result, with the motor and the bearing blocks (chumaceras) installed, looked like this:

Drilling holes with ruler and drill Drilling holes with ruler and drill

Note

In the end, since there were no KFL-08 bearing blocks available, I had to design one in SolidWorks using the same dimensions and a circular bearing.

Original Design Files and Laser Cutting Files

Below you can find the original design and laser cutting files:

Axis Design in SolidWorks

To better understand and organize the movement of each axis in the CNC machine, I designed the key components of the X, Y, and Z axes using SolidWorks. This helped visualize how each axis interacts within the full assembly and confirm the range of motion for each part.

🔵 X Axis – Gantry (Left to Right)

The X axis consists of a rigid gantry that supports the Z axis assembly. It allows movement from left to right along the width of the machine. In the SolidWorks model, this is represented by a horizontal beam with guide rails and linear bearings for smooth movement.

SolidWorks X Axis Design - Front View SolidWorks X Axis Design - Back View

This part was carefully designed using real component dimensions to ensure a proper fit during assembly:

Design References: The dimensions for these cutouts were based on the official mechanical drawings of the LM8UU linear bearings and the T8 brass nut, ensuring compatibility and precision during the mechanical assembly.

Reference Drawings
LM8UU Technical Drawing T8 Nut Technical Drawing

🔴 Y Axis – Bed Movement (Forward and Backward)

In this CNC configuration, the bed itself moves forward and backward, making it the Y axis. This is a classic design in fixed-gantry machines. In SolidWorks, the bed was modeled with mounting holes and space for the linear guides and motor that drive its motion.

For the construction of the Y-axis, I designed and printed a total of 5 support pieces to hold and guide the movement of the bed:

SolidWorks Y Axis Design Y Axis Support Placement Diagram

All parts were modeled in SolidWorks based on the technical dimensions of the LM8UU bearing and T8 nut to ensure a precise fit. The components were printed in 3D using a Prusa printer with 15% infill density, providing a good balance between strength and weight.

For the bed itself, we used a 40 cm × 40 cm MDF board to provide a flat and stable platform. Since we needed the surface to remain smooth and undamaged, I chose strong adhesive glue to attach the printed support pieces instead of screwing them in. This method preserved the flatness of the MDF and still provided sufficient stability for the bed’s movement.

SolidWorks Y Axis Design

The modular setup allows precise alignment of the components, facilitating smooth and consistent motion along the Y-axis.

🟢 Z Axis – Pen Mount and Vertical Motion

For the Z axis, I designed a vertical carriage specifically adapted to hold a fine-tip Sharpie marker, ensuring precision in drawing tasks. I based the cylindrical cutout on the diameter of the marker, which is approximately 12.5 mm. To secure the marker in place, I added two M3 screw holes on the sides.

Z Axis Pen Holder - Front View Z Axis Pen Holder - Back View

The rear part includes a mounting space for a T8 leadscrew nut to control vertical motion precisely. We also added corner cutouts to hold 4 linear bearings (LM8UU), one on each side, for smooth and stable vertical movement.

To verify the fit and alignment of the holes, I assembled the Z axis carriage with the X axis slider. This test was crucial to ensure that the linear bearings and the T8 screw mount aligned correctly before printing the final version.

X and Z Axis Assembly Test X and Z Axis Assembly Test

All parts were 3D printed using a Prusa printer with 15% infill for a balance between strength and print speed. This setup ensures stable vertical control of the Sharpie, essential for the CNC’s drawing functionality.

📁 Design Files by Axis

🟥 X Axis
🟩 Y Axis
🟦 Z Axis

These SolidWorks models were essential for planning the assembly process and ensuring proper alignment of all components before manufacturing.

Installing Leadscrews and Aluminum Shafts

With the T8 leadscrews and aluminum shafts prepared, I proceeded to install them into the CNC's frame. The leadscrews were mounted on the X and Y axes to enable smooth and precise movement. I carefully aligned the shafts to avoid any misalignment that could affect the machine's performance.

I used the pre-drilled holes in the frame for the leadscrew mounts. For the aluminum shafts, I inserted them into the corresponding bearings to ensure minimal friction. It’s important to keep the shafts well-lubricated to prevent wear over time.

After securing the leadscrews and shafts, I checked for any play in the motion and made minor adjustments to ensure everything was tight and stable.

Here’s a picture showing the installation of the leadscrews and shafts.

Leadscrew and Shaft Installation

Final Assembly of the CNC

After completing the installation of the leadscrews, aluminum shafts, and other components, we assembled the CNC structure. The assembly includes the X and Y axes with all the necessary motors and supports. The frame is now ready to be tested and calibrated for precise movement and performance.

Below is the image showing the final assembly of the CNC machine with all components in place.

Final CNC Assembly Final CNC Assembly Final CNC Assembly Final CNC Assembly Final CNC Assembly

Mechanical

Mechanically, the machine consists of:

Special attention was given to alignment and minimizing friction to ensure accuracy.

Electronics

The CNC machine uses an ESP32 microcontroller, which controls two stepper motor drivers (A4988) for the X and Y axes and a micro servo motor for the Z-axis (pen). The power supply delivers enough current to drive all components, and the wiring was organized to avoid signal interference.

Designed in KiCad and milled using the Monofab.

The electronic design process began by defining the required components and connections for controlling the CNC. The schematic was created in KiCad, carefully placing the ESP32 microcontroller, the stepper motor drivers, the micro servo, and the necessary connectors. After verifying the electrical connections and pin assignments, the PCB layout was developed, routing the traces to minimize interference and ensure efficient operation.

Design in KiCad

The circuit was designed in KiCad, generating the traces, pads, and labels needed for fabrication.

Exporting Cut Files

Gerber files were exported from KiCad and prepared for use with the Monofab, selecting the correct milling and engraving layers. Separate files were generated for the traces, outline, and holes to ensure accurate processing.

Setting up the Monofab

Positioning the copper board on the Monofab and adjusting the milling tools. The zero point was calibrated by carefully lowering the tool to the board surface, ensuring precision before starting the milling job.

Start Milling

Starting the milling process for the traces. The machine followed the generated toolpaths, removing the copper layer to leave the desired connections.

Midway View

Midway view of the milling process on the Monofab. At this stage, the traces were partially visible, and the engraving depth was verified to avoid damaging the board.

Finishing Milling

Completion of the milling process for traces and pads on the PCB. After milling, the board was cleaned to remove dust and debris, ensuring clean contact surfaces for soldering.

Milled PCB

View of the fully milled PCB, ready for component soldering. All traces, pads, and labels were confirmed against the original design before proceeding.

Final Result

Final result of the PCB, with the circuit traces clearly defined on the board. The next step was to solder the electronic components and perform initial testing to verify correct operation.

The video demonstrates the completed electronics functioning with the CNC system, where the ESP32 microcontroller coordinates the stepper motors and servo movements as programmed.

Programming

The firmware was built on the Grbl ESP32 library, customized for our specific hardware setup. We used Arduino to control the movement of the machine through three red stepper drivers and the Xiao ESP32C3. The firmware takes G-code commands and translates them to stepper driver signals via the ESP32C3, which controls the motion of the X, Y, and Z axes.

The code defines the pins for controlling the stepper motors on each axis (X, Y, and Z). In the setup function, these pins are set to OUTPUT. In the loop function, the direction and stepping of each motor are controlled by sending high and low signals to the respective pins. A delay is used to control the speed of the stepper motors, with the number of steps per revolution set to 600. This results in precise movement and smooth drawing.

Here's the code used for controlling the stepper motors:

See the Pen Untitled by Paula Rivero (@Paula-Rivero) on CodePen.

Below is a video showing the CNC working with the motors and the movement of the X, Y, and Z axes in action. This demonstration highlights the functionality of the system as it performs coordinated movements.

CNC Test with Cat Drawing

To test if the CNC was working and could follow G-code, we used a cute image of a cat with a heart that we found online. This was the result:

Final Result

Then we made the necessary adjustments, and the cat was traced like this:

Final Result

Finally, here's a video of the CNC working:vv

Below is a video showing our CNC Drawing Machine in action:

Acknowledgements

We would like to express our sincere thanks to Engineer Max and Engineer Gerardo for their valuable collaboration and guidance during the CNC development. Their support and willingness to help us whenever we had questions were key to moving forward with confidence.

We also want to thank our FabLab teammate, José Ángel Zárate, for being there to help us solve several technical issues along the way. His contributions were essential to the success of this project.

We are truly grateful to be part of such a collaborative and supportive environment.