Translucent Desktop CNC Plotter (With Recycled Disk Drives)

by NolanM in Circuits > Arduino

3199 Views, 29 Favorites, 0 Comments

Translucent Desktop CNC Plotter (With Recycled Disk Drives)

Untitled.jpg
147993411-7005d1bb-53bf-4277-9e09-5022b40ccc0b.png

I wanted to design a cool looking mini CNC machine out of recycled disk drives from old desktop computers my college was about to dispose of. I decided to go with a Laser-Cut translucent enclosure so the electronics were visible, with finger joints for easy assembly. The end product is a mini machine that that be modified to be used with a laser diode, pen plotter or spindle and can cut/draw projects up to 40mm x 40mm, perfect for a post-it note.

Supplies

image.jpeg
large.jpeg
ps1-25w-12.jpeg
71ZbzRO8X9L.jpeg
Unknown.jpeg
drw-24b1st-optical-drive-58597ea13df78ce2c34abd71.png
istockphoto-1311136742-612x612.jpeg
Stanley-Hot-Glue-Gun-GR35K.jpeg

The cost for most parts included, and the use of most tools in this project were covered by my college. I’m sure some adjustments could be made for those on a tighter budget.

Parts:

  1. 12V Power Supply.
  2. 2X CD disk drive stripped down to motors and metal bracket
  3. Arduino Uno R3
  4. CNC shield v3.0..
  5. 3X A4988 Stepper motor drivers
  6. Micro-Servo (Mine came with my arduino starter kit)

Machine/Software needed:

  • A laser cutter OR access to a laser cutter, CNC router or something that can cut plexiglass. (Look for maker-spaces in your area.)
  • A computer with the software to Edit a DXF file. I use Omax Layout software but there’s tons of other options such as Qcad, AutoCad etc.

Additional supplies:

  • Soldering iron and solder
  • Hot glue gun
  • 1/4" plexiglass or acrylic sheet
  • An assortment of small screws (taken from the old computers)
  • Small wood or plastic pieces/plates to mount pen and servo (get creative!)
  • Picture frame hook
  • Spring and sliding mechanism from a floppy disk drive.
  • A pen with replaceable ink

Making the Enclosure

IMG_1501.HEIC.jpg
IMG_0463.HEIC.jpg

Since many of the parts were in the mail and I was eager to get started I designed the enclosure before everything else.

DESIGNING THE ENCLOSURE:

**IMPORTANT**

You will likely need to make modifications to this drawing in 2 areas.

  • You will need to resize the spacing between the mounting holes based on the spacing on your individual disk drives.
  • You will need to resize the width of the finger joints in the file. My so called “1/4 inch plexiglass” was actually 0.2235” so I had to adjust the finger joints accordingly. *Make sure you only resize on the X-axis in the CAD drawing*. I made them 3/1000” smaller (so cut outs were were 0.232”) and they fit great.

MAKING THE ENCLOSURE:

  • I laser-cut my pieces out of a single 12x24” sheet of 1/4" plexiglass as that was the maximum size that could fit in my college's laser machine. These could also be made with a cnc router, waterjet cutter or similar machines.
  • Once the pieces are cut they can be assembled using the finger joints.
  • Attach the disk drive enclosure to the assigned holes and spacers/bolts.

Building the Z-Axis

IMG_3271.jpg
IMG_3269.jpg

This was one of the most frustrating parts of this project as the z-axis is controlled by a servo that moves the pen up or down according to the drawing, and the point of the pen must be exactly perfectly centred. I needed to figure out how to get the servo to move the pen up or down, which was awkward considering the servo rotates instead of moving in a straight line. After attempting many different variations, I decided to use the spring mechanism from an old floppy disk drive and a picture frame hook for the servo to latch onto.

The spring mechanism from the floppy disk pulls the pen towards the canvas, and the servo pushes the pen back up (against the spring, loading it back up), as it needs. The result is z axis that moves off and back onto the canvas as it needs to during the plot.

As I continue to make modifications to this project, I will likely design and 3D print a better looking/cleaned up enclosure for the pen, servo and spring, and have it held together with bolts rather than hot glue, but it will work the same way. This design has proven to work well in my testing, however there is a slight delay, I fixed this by using a tiny elastic band to fix the hook to the servo, and adjusted the movement to be only 10 degrees which greatly increased the speed of the pen, and fixed the delay issue I was having. This copied also be done in the UGS settings, by changing the setting spindle delay.

CD Drive Stepper Motor Wiring and Connections

circuit.jpg
worm_drive_connectors.jpeg
IMG_2684.HEIC.jpg
Plotter Diagram.png

These small stepper motors have an interesting wiring pattern. With the little number (E232171) visible and oriented towards you, the wiring is ABDC. Carefully solder 4 wires to the pins on the each stepper motor, ensuring that they do not touch each other. Match the "A" wire of the motor with the "A1" pin, "B" wire with the "A2" pin, "D" wire with the "B2" pin, and "C" wire with the "B1" pin on the CNC shield.

The servo is connected to the 5V, GND, and Z+ pins on the CNC shield (see diagram)

Limit switches can also be added if you choose to do so, but the grbl parameters will need to be adjusted accordingly.

See the attached "Doc1.pdf" for a block diagram.

Downloads

Flash the Arduino With MIGRBL

Add-ZIP-Library-Arduino-IDE-800x552.png
grbl_flash_3.png
Screenshot (48).png

Now, we need to flash the Arduino Uno and CNC shield with GRBL software. This is the most important step in this project as without GRBL, the machine will not move. As this machine uses a servo for the Z-axis, we will need to download a modified version of GRBL called MIGRBL to work with it.

To flash the Arduino with GRBL, first you will need to download the GRBL software, there are many different websites to download from, but chose to download my software from GitHub. To get the GRBL software onto your Uno board, follow the steps below:

  1. Download the library from: https://github.com/diy3dvn/grbl-plotter by clicking on "code" then click "download ZIP folder".
  2. Find the GRBL Plotter Master folder, and click "Firmware"
  3. Unzip the MIGRBL file to a safe location.
  4. In the toolbar in the Arduino IDE, click the "Sketch" drop down menu and choose "Add ZIP Library". Find the extracted MIGRBL folder click "Open". Now MIGRBL has been added to the library.
  5. Open up the Arduino IDE and connect the Arduino Uno board via USB to your computer.
  6. Click on the following menu : File -> Examples – > MIGRBL> grblupload
  7. Select the COM port corresponding to the Arduino. **Make sure the Baud Rate is set to 115200**
  8. Verify, Save and Upload the sketch to your Arduino board.

Now the Arduino is flashed with the MIGRBL software and ready for you to make adjustments to the GRBL settings.


Adjusting GRBL Settings to Work With the CD Drives

grbl-Settings-steps-per-mm-math-example.png
SM15DD_4_datasheet.jpeg
GRBL-parameters.png

To pull up the GRBL settings, go to the serial monitor in the Arduino IDE. with the Arduino flashed and connected, type into the command bar "$$ ", this will pull up the list of preset GRBL settings. We will need to change a few of them in order for the software to work with our unconventionally small parts.

This step can also be done in a program such as "Code controller" or "Lightburn".

The stepper motors that came with my disk drives were both SM15DD stepper motors and their corresponding lead screws had a travel of 40mm in each direction.

See the attached "pocket guide" pdf file for more detailed instructions on GRBL settings.

Adjust the GRBL parameters to match as follows:

$$
$0=3 
$1=3 
$2=0 
$3=1
$4=0
$5=0
$6=0
$10=3
$11=0.010
$12=0.002
$13=0
$20=0
$21=0
$22=0
$23=0
$24=25.000
$25=500.000
$26=250
$27=1.000
$30=1000
$31=0
$32=0
$100=22.000
$101=22.000
$102=40.000
$110=500.000
$111=500.000
$112=500.000
$120=10.000
$121=10.000
$122=10.000
$130=40.000
$131=40.000
$132=10.000
ok

Download Inkscape and MIGRBL Extension

F5VG3NLL27US6V9.jpeg

GRBL software runs on Gcode files, so to get a drawing to the machine we need to turn it into a G-Code file that the machine can read. In order to do this you will need to download a few programs:

*The files below can also all be found in the already downloaded "GRBL-PLOTTER-MASTER" folder under the "tools" folder, however I didn't realize this until I had already downloaded these files from a separate location. *

  1. Inkscape (**version 0.48.5**) from: Inkscape software 0.48.5 version *THIS PROGRAM NEEDS TO BE VERSION 0.48.5 IN ORDER TO WORK PROPERLY WITH THE EXTENSION. IF YOU HAVE ALREADY DOWNLOADED A NEWER VERSION OF INKSCAPE, YOU WILL NEED TO UNINSTALL THAT VERSION AND INSTALL VERSION 0.48.5*
  2. MIGRBL Inkscape Extension from: https://secureservercdn.net/192.169.223.13/akx.d75.myftpupload.com/wp-content/uploads/2019/08/MI-Inkscape-Extension.zip
  3. Any gCode sender


Once Inkscape has been downloaded, we will need to add the MIGRBL extension.

To do this we need to:

  1. Download the MIGRBL Inkscape extension unzip the downloaded file.
  2. Open the MIGRBL Inkscape extension folder copy all 4 files.
  3. Go to to C:\Program Files (x86)\Inkscape\share\extensions and paste here all the four files.
  4. Open the Inkscape software and go to the "extensions" tab and you will see "MI GRBL Z-Axis servo controller" which means the extension was installed successfully.

Turn a Drawing Into G-code

Capture-1.jpeg
MIGRBLInkscape.jpeg

To turn a drawing into G-Code that the plotter can read we need to open Inkscape version 0.48.5. With Inkscape open, follow the steps below:

  1. Go to "file" > "document properties"
  2. *Set the units to mm and set the width and height of your plotting area (40mm X 40mm)*
  3. Draw the design or drag and drop the image of your choice
  4. Select the image and go to the path > trace bitmap
  5. Click "ok" and close the tab
  6. Now hold click on the image and drag the mouse
  7. A black and white image will separate from the original image 
  8. Now delete the original image
  9. Drag the black and white image to the center of the canvas
  10. Again go to path > object to path 
  11. Now go to Extensions tab and select MI GRBL Z-Axis servo controller
  12. *Change the values if needed* 
  13. Click on "apply" to generate the G-code 
  14. The default location where you find the generated G code is C:\Users\Public

*MAKE SURE THE UNITS HAVE BEEN SET TO MM OR YOU WILL RUN INTO ERRORS WHEN PROCESSING THE GCODE*


*To change the MIGRBL extension values:

  • Servo up: Servo up G-code
  • Servo down: Servo down G-code (if the servo moves in the wrong direction, swap the M05 and M03 values )
  • X axis speed: speed of X axis
  • Y axis speed: speed of Y axis
  • Angle for servo: set the value to how much you need to move the servo angle (between 0 to 180).If my value doesn't work you will need to experiment with different values until the servo lifts the pen just enough so its not touching the machine bed.
  • Delay: Keep it unchanged
  • Directory: The location where G-code file generates to.
  • Filename: Default file name.
  • Live preview: check to see live coordinates in inkscape

Send the Generated G-Code File to the Machine

GRBLController.jpeg
2lqaEHB.png

To download the GCode sender, go to: GRBL-PLOTTER-MASTER>tools>GRBL Controller and click on GrblController361Setup.exe. This will start the the setup for the Gcode Controller.

Alternatively, you can use any other program that can read Gcode and control GRBL. I was able to get away with using LightBurn as I already had it installed and was familiar with the program. Any GRBL Gcode sender will work, although some better than others.

In the settings of your selected program, ensure the parameters are all set to match with the parameters of your machine. Then you can try to move the Y-axis and X-axis using the control pad. If everything is moving correctly, you can load in your Gcode file, and start plotting the image onto a piece of paper or a post-it note.


For help with solving difficulties/errors/issues you may have with GRBL controller, here is forum with common issues and their fixes: https://github.com/zapmaker/GrblHoming/issues


To see videos of the running prototype, visit the google drive folder below:

https://drive.google.com/drive/folders/1MCKUleCjghODezpKKBrIRgPuFw9UGGr2?usp=sharing

Summary and Problems I Had

cncshield2.jpeg
Traceback (most recent call last) Inkscape error solved

To summarize the steps in this project:

  • Build the enclosure and wire the Arduino to the disk drive motors, power supply and servo.
  • Flash the Arduino with MIGRBL and adjust the parameters.
  • Download Inkscape and the extension to create Gcode files.
  • Download a grbl controller, import your files and plot your design.


The problems I had:

  • Stepper motors running very loud and hot:

On the a4988 stepper drivers, there is a little screw at the bottom. This little screw is actually a voltage regulator. I turned the screw while moving the motors back and forth using the grbl controller until the motor ran quieter but still had enough torque to move the axis against the friction caused by the pen. Micro-stepping can also be implemented by putting the little jumper cables over the m0,m1,m2 slots (see the diagram above).

  • Not able to use the migrbl extension in Inkscape:

There may be more than one reason why your Inkscape extension isn't working.

  • Before getting into the code, first check that the version of Inkscape you have downloaded is 0.48.5, if its not, uninstall your version of Inkscape and reinstall this version. (newer versions of Inkscape aren't compatible with the MIGRBL extension).
  • Make sure that you have downloaded Java, as this is what the extension runs off of.
  • Make sure that your units have been set to millimetres. If they are set to px, the extension will not recognize the drawing.


  • Z-Axis servo not functioning:

If none of these solutions work, you may have to adjust the Spindle_Control.c file.

  • In the "commands" line in your grbl controller, Type in "M03 S90"; this should lift the pen up. If it doesn't, try M05 S90. If the M5 command lifts your pen, you will need to reverse the direction by going to line 48 in the file and swapping the 16 and 31 values.
  • Grbl is still running a full range virtual Z axis with accelerations and speeds. Be aware how this will affect your pen. For example: If the Z is at 5 and you tell it to go to -5, the pen will stay up as the virtual z moves from 5 to 0. The pen will then go down. The virtual Z will continue to go down to -5 before it executes the next move. You can control these "delays" by adjusting the speed and acceleration of the Z axis and what your CAM uses a Z locations for up and down.
  • If you want to have the pen go to the up position at turn on, define a negative Z work offset. Send the command "G10 L2 P0 Z-2". This will trick Grbl into thinking the pen needs to be up."
  • Try connecting the the orange servo wire to the coolant enable pin and using the coolant enable commands to control the servo instead of the m5 and m3 commands. This requires that you go and change all the m5 and m3 commands in the spindle_control.c file and change them into coolant_control.c file ( when G0, Coolant enable, Pen up)




Links and Files

govde2montaj_errorReport.pdf v4.png