Mini Arduino Plotter

DIY Arduino Plotter
DIY Arduino Plotter

Making a Mini Arduino Plotter

In this project, we will turn two old DVD-drives into a mini plotter.

DIY Arduino Plotter
DIY Arduino Plotter


This project is simple and easy, it is a good cheaper practice if you want to make your own CNC machine, as the same principle applies for both. To lower the cost by recycling parts, we will use the CD tray mechanism instead of a servo motor for the z axis and the small steppers of the laser reader for the X & Y axis.

What you will need?

  • 3x L293 H-bridges IC
  • 1x Breadboard and some wires
  • 1x Arduino UNO
  • Hot glue
  • Screw driver
  • Scrap piece of plastic
  • USB cable (to power the circuit)

Needed Software google drive Links :

Getting What We need From The Drives

We will begin by disassembling the DVD-drives to get the stepper motors and the moving carriages. with a screwdriver open the metal case. The electronics inside we won’t be using them. I used the metal casing as the main body. the front part of the CD tray is our Z axis so be careful with it. You can watch Part 1 for detailed instructions.

Preparing The Stepper Motors

Now that we have the needed parts, we can recondition the steppers. we need to replace the yellow flexible ribbon with wires instead for an easier connection later. THIS Part is TRICKY do it Carefully and don’t remove the ribbon cable solder the new ones on top of it or you’ll end up losing the stepper so be careful not to damage it. Each one of the steppers needs 4 wires, Prepare and cut them to the same length put a tip of solder on top then solder them to the stepper motor.

The Electrical Circuit

we can assemble the plotter then wire our system. the metal enclosure can be used as the main body, with screws and hot glue i attached them perpendicularly to each other one as X axis and one as Y axis.

for the Z axis, we can glue a piece of plastic to the back of the Y axis carriage.

l293d h bridge
L293d H-Bridge
mini arduino plotter wiring diagram 2
Mini Arduino Plotter Wiring Diagram 2
arduino plotter wiring diagram 1
Arduino Plotter Wiring Diagram 1
dvd stepper motor
dvd drive stepper motor

Use these diagrams to wire the steppers with h-bridges and the Arduino but keep in mind THAT YOU NEED TO IDENTIFY THE STEPPER SEPARATE COILS FIRST OR THEY WONT MOVE like in the video with a connection test as each coil goes to a side of the IC  L293D. The z axis has a built in DC motor which connects on a side of the third and last IC.

Y axis 6, 7, 8, 9

Z axis 10 11

And of course you can change this in the .ino code if you want

diy arduino plotter
DIY Arduino Plotter

Initial Testing

Before trying our plotter let’s do some tests to identify potential problems.

The Z axis movement can be tested using this bit of code. upload it to arduino and it will make the pen go up and down:

#define I1 10 // Control pin 1 for motor
#define I2 11//  Control pin 2 for motor
void setup() {
Serial.begin( 9600 );
pinMode(I1, OUTPUT);
pinMode(I2, OUTPUT);
void loop() {
digitalWrite(I1 , LOW);
digitalWrite(I2 , HIGH);
digitalWrite(I2 , LOW);
digitalWrite(I1 , LOW);
Serial.println("Pen up!");
digitalWrite(I2 , LOW);
digitalWrite(I1 , HIGH);
digitalWrite(I2 , LOW);
digitalWrite(I1 , LOW);
Serial.println("Pen down.");

— For the X and Y axis it’s the same test code just change the numbers to 6 7 8 9

#include <Stepper.h>
const int stepsPerRevolution = 20;
Stepper myStepper(stepsPerRevolution, 2, 3, 4, 5);
void setup() {
// set the speed at 60 rpm:
// initialize the serial port:
void loop() {
// step one revolution  in one direction:
// step one revolution in the other direction:

Hopefully everything is working as expected.

To make gcode and prepare the needed software to start plotting please refer to the video below, it includes all the required steps.

USE THE links below to download the various software and follow along. It IS Important to use Inkscape version 0.48.5 or the plugin that generates the .gcode wont function.


  1. Download and install processing:
  2. download and install inkscape version(0.48.5 important or the g-code plugin won’t work):
  3. download gcode plugin for inkscape (the installation note is included):
  4. upload the sketch to arduino Tun_Maker_Mini_Arduino_Plotter.ino
  5. now open gctrl.pde with processing change “COM38” with the usb port of your arduino and your good to go


  1. need a help my dc motor moves only in one direction ?
    what is the reason for it ?
    i used a l293N motor drive sheild

    1. the motor shield isn’t compatible with my code you need to change by including your motor shield library and making the necessary changes hope i helped

Comments are closed.