Introduction: Fix Belt CNC Plotter

About: PLC, Arduino - Do it yourself project

Today, I'd like to share how to build a fixed belt CNC plotterthat has a very different construction from the others, in that both axes XY are made from fixed timing belts and their stepper motors are hidden inside PVC fittings. In addition, it is equipped with a homemade offline controller so it can operate independently by executing GCode commands from an external microSD card.

Please check my introduction video before getting started.

Supplies

A. Main parts:

⦾ 1pcs x Arduino UNO R3 or Combo Arduino + CNCShield + A4988.

⦾ 1pcs x Arduino CNC Shield V3 GRBL.

⦾ 3pcs x A4988 Stepper Driver Module. (Or 3pcs x DRV8825)

⦾ 1pcs x Arduino Nano.

⦾ 1pcs x LCD1602.

⦾ 1pcs x Rotary Encoder.

⦾ 1pcs x MicroSD Reader Module.

⦾ 5pcs x R10K, 1pcs x R100, 1pcs x R1K and 1pcs x Potentiometer 10K.

⦾ 2pcs x Stepper Motor NEMA 17.

⦾ 2m x GT2 6mm Timing Belt.

⦾ 2pcs x GT2 Timing Pulley 16 Teeth.

⦾ 4pcs x GT2 5mm Bore Aluminum Toothless Idler Pulley for 6mm Width Timing Belt.

⦾ 4pcs x GT2 Idler Timing Pulley 5mm Bore 20 Teeth.

⦾ 8pcs x SC8UU linear bearings.

⦾ 4pcs x Round Shaft Diameter 8mm, Length 500mm.

⦾ 1pcs x Fan 5015 for stepper motor cooling.

⦾ 1pcs x Fan 4010 for offline controller cooling.

⦾ 4pcs x Heatbed Spacer Compression Spring for 3D Printer.

⦾ 3pcs x Limit Switches.

⦾ 1pcs x Power Supply PSU 12 VDC.

⦾ 2pcs x V-Slot Aluminium Profile 2020, length 300/400mm.

⦾ 1pcs x Acrylic sheet, thickness at least 5mm.

⦾ 1 meter x Cable Spiral Wrap, small size.

B. PVC pipes and fittings:

⦾ 8pcs x PVC Three & Four Way Tee Ø21mm.

⦾ 4pcs x PVC End Cap Ø21mm.

⦾ 1 meter x PVC Pipe Ø21mm.

⦾ 8pcs x PVC End Cap Ø27mm.

⦾ 4pcs x PVC End Cap Ø114mm.

⦾ 1pcs x PVC Reducer Ø114mm to Ø90mm.

⦾ 300mm x PVC Pipe Ø114mm.

⦾ 1 pcs x Wooden sheet, size: 600x150x20mm.

C. Tools:

⦾ Drilling machine, with step drill bits.

⦾ Hand saw.

⦾ PVC pipe cutter.

⦾ Soldering Station with Hot Air Gun Heater.

Step 1: Build a Base

I connected 2 pcs x PVC four way tees, put 2 end caps at 2 open holes and drilled on these end caps 2 holes diameter 8mm for linear shafts.

Wooden plate was drilled 4 holes Ø22mm following the holes on the bove assembly and length of linear shaft 500mm.

I installed 2pcs x assembly four way tee to the wooden plate holes.

Two linear shaft 8mm was installed and did alignment.

Step 2: XY Stepper Motors Mounting

Each X/Y motor mounting has been made from the following parts: 1pcs x Ø114mm PVC endcap, 1pcs x stepper motor NEMA 17, 1pcs x 16 teeth pulley, 2pcs x toothless idler pulley, 2pcs x idler timing pulley and 4pcs x SC8UU linear bearings. I made 2 sets with the structure as below:

The stepper motor was installed inside the endcap.

The picture below shows how to thread a timing belt through the pulleys.

Step 3: X Axis

X motor mounting was installed onto the linear shafts through 4 bearings.

I also drilled a hole in this endcap and installed a cable gland for cabling. A piece of connecting pipe was prepared for connecting to the Y motor part.

Step 4: Y Axis

The X and Y axes were arranged perpendicular to each other.

The stepper motor cables will be threaded like this. In the following steps, I also added some wires for XYZ endstops and 2 cores power cable for a cooling fan. They all went through this cable gland.

I stacked the Y axis part on the X axis, installed Y linear shafts.

Step 5: Timing Belts

I used 4pcs hose clamps to tighten the X and Y timing belts. To prevent the timing belts from being torn, I padded it with a small PVC ring inside.

They worked really well by this way.

These hose clamps could be moved back and forth along a pipe for alignment and I could create belt tension by fixing hose clamp at one end and gradually tighten the other end.

Step 6: XY Endstops and Cooling Fan

I soldered two N.O contact pin of the limit switch and prepared 2 sets for X and Y.

And I mounted them on X and Y mounting parts.

Because when X and Y parts were joined together, it became an airtight box and 2 stepper motors placed inside need to be cooled, so I installed an exhaust fan to suck the hot air out.

Step 7: Connection

I used one bathroom flexible hose for threading all wires to the controller.

I added one acrylic sheet and some pipe supports to hold the Y axis in place.

The XY limit switches were connected to the CNC shield at pins: X- (Xmin), Y- (Ymin).

Step 8: Z Axis

The Z axis was built from a computer CD/DVD ROM. I also installed one micro limit switch on its frame.

Then I mounted this Z frame to the Y support, soldering and cabling Z endstop to the controller. The Z limit switch was connected to the CNC shield at pin Z+ (Zmax).

Step 9: Offline Controller

My plotter's offline controller includes:

⦾ Arduino Nano.

⦾ LCD1602.

⦾ Rotary Encoder or Rotary Encoder Module.

⦾ SD Card Reader Module.

⦾ LM2596 DC-DC Converter.

⦾ Potentiometer 10Kohm for LCD contrast control.

⦾ Push button, micro switch and buzzer.

⦾ 5pcs x 10Kohm, 1pcs x 1Kohm and 1pcs x 100ohm resistors

⦾ 2 pin and 3 pin screw headers.

⦾ One PVC reducer 114 to 90mm and acrylic sheet A4 size for offline controller box and cover.

⦾ 1pcs x fan 4010 for offline controller cooling.

The schematic is shown below:

I made my own a offline controller on the double sided prototype PCB size 70x90mm. The circuit bottom is shown below:

A LCD screen, rotary encoder, push button and speaker were soldered on the offline controller top.

Arduino Uno plus CNC shield and offline controller both were housed inside PVC reducer 114mm to 90mm.

I moved the SD card module to the side of PVC fitting so I could easily remove and insert the memory card.

The CNC shield was installed facing down so I installed a cooling fan for the A4988 modules at the bottom of the PVC housing. I used 4pcs x copper pillars 10mm height as controller box foots.

To balance the plotter, especially to prevent the plotter from falling forward or backward when Y axis moves away from the center line, I installed 2 aluminum profiles 2020 on the wodden plate's outer edges. It ended up looking pretty nice!!!

Step 10: Drawing Platform

My family had a wall mounted daily calendar. My little girl has a habit of tearing off each calendar sheet every day before going to school and store them for reading proverbs and idioms printed on them. It's almost Tet holiday in my country, I had to clean my house and couldn't bear to throw her collection in the trash. I turned the calendar sheets face down to use the back side for my plotter and drew many fun animal pictures for her.

I used 4 sets of 3D printer heated bed leveling kits for calendar foots. I could easily align and level the drawing surface by turning the hand-twist nuts.

Step 11: GRBL Setting

a. Setup GRBL firmware:

⦾ Download GRBL firmware.

⦾ Go to "C:\Users\Admin\Documents\Arduino\libraries\grbl\config.h" and modify:

 //#define HOMING_INIT_LOCK // Comment to disable

#define HOMING_CYCLE_0 (1<<Z_AXIS)                // REQUIRED: First move Z to clear workspace.
 #define HOMING_CYCLE_1 ((1<<X_AXIS)|(1<<Y_AXIS))  // OPTIONAL: Then move X,Y at the same time.

 #define HOMING_FORCE_SET_ORIGIN // Uncomment to enable.

//#define VARIABLE_SPINDLE // Default enabled. Comment to disable.

b. Upload GRBL firmware to Arduino Uno:

⦾ Open Arduino IDE, from File menu click Examples ‣ GRBL ‣ grblUpload.

⦾ Select the correct Port and Board (Arduino Uno) ‣ Compile and Upload the code to Arduino Uno.

c. GRBL parameter:

⦾ Step idle delay:

Keep all axes always enabled by setting $1=255 (Step idle delay, milliseconds)

⦾ Status report:

This setting determines what Grbl real-time data it reports back to the user when a '?' status report is sent. I set: $10=1 (Status report options, mask). This parameter is important for offline controller and we can check via Serial Monitor of Arduino IDE. The status report should be like this:

<Idle|MPos:43.400,10.600,10.000|FS:0,0>

⦾ Limit Switches and Homing Cycle:

Refer to these official links Wiring Limit Switches and Set up the Homing Cycle for more detail.

  • $21=1 (Hard limits enable, boolean)
  • $22=1 (Homing cycle enable, boolean)
  • $23=3 (Homing direction invert, mask):

In my case, the plotter will move in order and direction as follows, when doing "Homing":

  • Firstly, the plotter's pen move up to clear workspace until it hits the Z MAX limit switch.
  • For the X& Y axis, my plotter move in negative direction until it hits the X & Y MIN limit switches.
  • After "Homing", the plotter understands this position as the origin coordinate (0.000, 0.000, 0.000). Because I already enabled this function via parameter "HOMING_FORCE_SET_ORIGIN" in the "config.h" file.

Notes: My limit switch wires were placed very close to the stepper motor and power wires, it can cause interference and give an incorrect stop signal. I had to do following steps for for noise filtering:

  • Increasing homing switch debounce delay (milliseconds) to maximum value: $26=255.
  • Connectting 4.7K pullup resistors to 5V and 100nF capacitors to GND, following to the GRBL Wiki instructions.

⦾ Travel resolutions

  • $100=40.000 (X-axis travel resolution, step/mm)
  • $101=40.000 (Y-axis travel resolution, step/mm)
  • $102=53.333 (Z-axis travel resolution, step/mm)

⦾ Feedrates:

  • $110=500.000 (X-axis maximum rate, mm/min)
  • $111=500.000 (Y-axis maximum rate, mm/min)
  • $112=500.000 (Z-axis maximum rate, mm/min)

⦾ Travel lengths:

  • $130=400.000 (X-axis maximum travel, millimeters)
  • $131=300.000 (Y-axis maximum travel, millimeters)
  • $132=25.000 (Z-axis maximum travel, millimeters)

Step 12: Offline Controller Programing

My hardware and firmware of offline controller are referenced from LEKN-TECH, called G-Sender. He shared it on his GitHub page at LEKN-TECH G-Sender. You can buy the LEKN GRBL Offline Controller at his store with reasonable price.

My homemade CNC offline controller worked fine, as I've been running it continuously for several days without any problems.

Besides, I also referred to the official documents on the GRBL Wiki page, especially this article: Interfacing with Grbl, to understand more about streaming protocol, commands, messages/ warnings/ errors handling, status reports...

Step 13: Gcode Softwares

I used following softwares to create the G-code files from texts or images:

  • Inkscape and Gcodetools extension.
  • LaserGRBL.
  • Engraver Master.

I like laser engraving softwares that creates Gcode files in ON-OFF operation mode using M3-M5 commands and then used Notepad++ to find and replace as follơ:

  • M3 - Laser ON - is changed to command "G0 Z-25.0000" (Pen DOWN).
  • M5 - Laser OFF - is changed to command "G0 Z-20.0000" (Pen UP).

After generating GCode, we can check, edit and simulate it at this website: https://ncviewer.com/

To send G-code files to GRBL controller and monitor my plotter's operation, I was able to use both modes:

Step 14: Testing

As you can see from the images attached above, I tried drawing texts, funny animals, and portraits of pretty girls, all of which looked pretty nice.

Notes:

⦾ Voltage drop:

Although I have separated the power supply for my D.I.Y offline controller through the LM2596 module, to ensure the Arduino Uno and CNC shield work reliably, I have added an additional 5VDC power supply from a phone charger to the Arduino as shown below.

Step 15: Conclusion

I think if my plotter were designed and assembled with 3D printed parts, it would look more compact, be more impressive, and certainly function more precisely.

Thank you for reading my work and hope you like my post this time!

HAPPY NEW YEAR 2024!!!

Anything Goes Contest

Runner Up in the
Anything Goes Contest