Home > Projects > CNC Machines Projects > Arduino CNC Drawing Machine (or the Road to Success)

Arduino CNC Drawing Machine (or the Road to Success)

Summary of Arduino CNC Drawing Machine (or the Road to Success)


This article details a DIY project to build an automated drawing machine resembling a CNC unit by repurposing two unused computer CD/DVD drives. The project utilizes stepper motors and rails from the drives, controlled by an Arduino Uno with Adafruit motor shields. It involves disassembling the trays, soldering terminals, 3D printing gears for proper ratios, and using custom GRBL code with plotting software to execute drawings.

Parts used in theArduino CNC Drawing Machine:

  • Arduino Uno
  • Stepper motor (model 28BYJ-48)
  • Adafruit Motor Shield V2
  • Two Adafruit Motor Shields
  • Wires
  • Two computer CD trays
  • Optional 3D printed gears and rails
  • Wood or structural material
  • Computer

This project is based on mostly items which are easy to find. The idea is to take two unused computer disk units and combine them to create an automated drawing machine which resembles a CNC machine.

The pieces used out of the drives include the motors and railings from both of the drives and the plastic assembly of at least one of the drives (including tray)

Step 1: Requirements for Your Journey:

Pieces needed:

  1. Arduino uno
  2. 1 stepper motor (we used the model number 28BYJ-48)
  3. Adafruit motor shield v2
  4. Lots of wires
  5. Two computer cd trays
  6. optional: some 3d printed gears and rails
  7. Some wood or structural material A computer

Arduino Code Required:

  1. Custom GRBL code to work with Adafruit motor shield (Riley_adafruit_cnc_2)

Computer Software needed:

  1. Arduino IDE Plotter https://github.com/zapmaker/GrblHoming/releases
  2. Gcoded picture or drawing files (google your file of choice).

Tools needed:

  1. Soldering equipment
  2. Glue gun and glue sticks
  3. Ruler
  4. Pen

Step 2: Destruction

Take apart the dvd trays making sure to keep the structural integrity of at least one of the dvd trays while removing the metal component which usually has two railings. The process of taking these trays appart will vary from different cd trays. The two motor drives should look like the picture below once removed. Notice the part which spins the disk has been removed as it will not be needed.

Step 3: Soldering On

Once taken apart, the next step is to solder the terminals into the motor which may be seen in the picture. Again the way these terminals attach to the motor may differ according to the specific model. The way these connect to the Adafruit motor shield will be discussed later. Replicate the same setup for the second disk drive motor assembly.

These two will serve as our Y and Z axis in the drawing process.

Step 4: The Mighty Tray

The next step is to get the disk tray working which will be the X-axis. For this purpose the stepper motor was used and the assembly required cutting parts of the tray to fit the gear through. (see pictures) At this point we realized our gear ratio was off and further tinkering was needed. At the end we opted to print a 4 to 1 ratio gear to allow for the smoothness and travel distance required to successfully complete the drawing without running out of room.

Step 5: The Arduino Affair

Put together the Arduino assembly and the motor shield setup. For this step a bit of soldering is needed. There will be two Adafruit Motor Shields stacked. Due to the way they operate a bridge needs to be soldered for the second arduino to be identified as such. The process behind that is explained here:

https://learn.adafruit.com/adafruit-motor-shield-v…

Solder the bridge as shown below labeled 1 for the top Adafruit motor shield. The first board should be (0x60) and the top board should be (0x61). Also, notice the jumper labeled 2. This is set on both the bottom and top shields telling the boards to draw their power from the arduino instead of the blue terminals right above it. You may choose to connect your own power source to these blue terminals if you find the arduino lacking. (Note, that while running the three motors we have the arduino connected to the computer plus a 9v power supply running to the arduino as well)

Step 6: Trial by Fire

Test! Before putting it all together test your parts. We found it particularly difficult to find information about how to connect stepper motors to the Adafruit Motor Shield. So here is a helpful diagram. It is important to point out that pin 1 and 4 (blue and orange) and pin 2 and 5 (pink and yellow) are pairs. Sometimes plugging these in the wrong way may mean a reverse in how the motor operates. Also, Red is ground in this diagram as shown below. If the disk assembly motors only have 4 terminals, leave the ground without connection.

To manage the movement of the motors use the software which was outlined in the required tools, using the plotter software in the link provided.

A really easy way to test which terminals are pairs is to test with a ohm-meter.
Here is a great guide on how to find your stepper motor wire pairs:

https://knowledge.ni.com/KnowledgeArticleDetails?i…

Once you found your pairs, put the first one into M1, the second into M2

Source: Arduino CNC Drawing Machine (or the Road to Success)

Quick Solutions to Questions related toArduino CNC Drawing Machine:

  • How can I create an automated drawing machine?
    You can combine two unused computer disk units to create a machine that resembles a CNC machine.
  • What parts are needed from the drives?
    The pieces used include the motors, railings from both drives, and the plastic assembly of at least one drive including the tray.
  • Which motor model was used in this project?
    The project used the stepper motor model number 28BYJ-48.
  • How do you configure two Adafruit Motor Shields?
    A bridge must be soldered on the top shield so it is identified as such, setting the first board to 0x60 and the top board to 0x61.
  • Why were 3D printed gears necessary?
    They were printed to achieve a 4 to 1 gear ratio which allowed for smoothness and travel distance required to complete the drawing.
  • How do you test if stepper motor terminals are paired correctly?
    You can use an ohm-meter to find wire pairs, ensuring pin 1 and 4 are paired and pin 2 and 5 are paired.
  • Can I use my own power source instead of the Arduino?
    Yes, you may choose to connect your own power source to the blue terminals if you find the Arduino lacking power.
  • What software is required to run the machine?
    You need the Arduino IDE, Plotter software from the provided link, and Gcoded picture or drawing files.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top