Making a Mini Arduino Plotter

Introduction

In this project I will show you how to turn two old DVD-drives into a mini plotter. This project is simple and easy also presents a good cheap practice if one day you want to make your own CNC machine as this plotter works with the same principle just way more tiny.to lower the cost and using as much scrap parts as we can we will use the CD tray mechanism instead of a servo motor for the z axismini arduino plotter

What you will need?

2 DVD-drives

3 L293 H-bridges IC

1 Arduino UNO

1 Breadboard and some wires

Hot glue or anything that sticks

Scrap pieces of plastic

USB cable (to power the circuit from the PC)

Screw driver

Needed Software Links : https://drive.google.com/open?id=0B3LrxyvfzQHHSG9rVFdjZGN0cjA

 

Getting What We need From The Drives

We will begin by disassembling the DVD-drives to get the stepper motors and the moving carriages grab 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 Don’t BRAKE IT watch Part 1 for detailed instructions.

 

Preparing The Stepper Motors

After salvaging the parts we need it’s time to prepare the steppers.as you can see in the video below they are connected with a yellow ribbon cable we cannot use that so we will need to wire new ones to be able to connect them 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 braking the motor 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

As our Steppers are ready we will jump to wiring the circuit but first lets assemble the plotter. I mentioned earlier that we will be using the metal casings as our main body I used screws to attach them perpendicularly to each other then hot glued the two carriages one as X axis and one as Y axis.

Now the Z axis is glued with a piece of plastic to its back to the carriage of the Y axis and like that our plotter is 70% done.

Now Let’s Continue our Wiring 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 multi-meter set on the 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.

Connection to the Arduino:

X axis 2, 3, 4, 5

Y axis 6, 7, 8, 9

Z axis 10 11

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

Initial Testing

Before trying our plotter let’s do some testing first to identify problems if there is any hopefully not.

To test  the  Z axis use this code upload it to arduino and it will make the pen go up and then go 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);
delay(200);
digitalWrite(I2 , LOW);
digitalWrite(I1 , LOW);
Serial.println("Pen up!");
delay(500);
digitalWrite(I2 , LOW);
digitalWrite(I1 , HIGH);
delay(200);
digitalWrite(I2 , LOW);
digitalWrite(I1 , LOW);
Serial.println("Pen down.");
delay(500);
}

 

— 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:
myStepper.setSpeed(60);
// initialize the serial port:
Serial.begin(9600);
}
void loop() {
// step one revolution  in one direction:
Serial.println("clockwise");
myStepper.step(stepsPerRevolution);
delay(500);
// step one revolution in the other direction:
Serial.println("counterclockwise");
myStepper.step(-stepsPerRevolution);
delay(500);
}

 

 

Hopefully everything goes as expected and let’s move to making gcode and preparing the software to start plotting this video includes all the steps USE THE links to download the needed software and follow along. It IS Important to use Inkscape version 0.48.5 or the plugin that saves the files as gcode wont work.

Links:

-download and install processing: https://processing.org/download/

-download and install inkscape version(0.48.5 important or the g-code plugin won’t work):https://inkscape.org/fr/telecharger/windows/

-download gcode plugin for inkscape (the installation note is included):https://github.com/martymcguire/inkscape-unicorn

upload the sketch to arduino Tun_Maker_Mini_Arduino_Plotter.ino

now open gctrl.pde with processing change “COM38” with the usb port of your arduino and your good to go

Tunisian Maker: if you have a problem contact me on the forum or :

youtube : https://www.youtube.com/channel/UCsFmFKMpUdyIiE55W3KsTzw

facebook : https://www.facebook.com/tunisianmaker

 

Arduino Plotter the easiest way
Tagged on:         

Leave a Reply