Introduction: Dot Matrix Printer From a CD/DVD Reader With Arduino

Picture of Dot Matrix Printer From a CD/DVD Reader With Arduino


Some time ago while going through the pages here in Instructables, something catch my attention, a printer made of a CD reader, and i was amazed.

I thought: "This is incredible, I have to make one!"

I know that these kind of projects don't always receive a "I made it", because of its degree of difficulty, so I tried to make mine easier.

This project was started more than a year ago, because of the lack of time i could only work in it while on college recess, but this is great because I finish it during the remix contest, that's fit perfectly in this case. If you think that I deserve your votes in the contests don't be shy and hit the button, I really like your support.;)

Update: Thanks to everybody that voted for me in the contests, you're awesome! I will make new instructables with these amazing prizes.

I also wanted to make this a motivation, I don't even dream of putting my hands in a laser cutter or 3D printer for making my projects, so I made this printer only using my dremel to cut the plastic pieces and gluing them together with super glue.

What can I say? It worked.

Step 1: The Motivation and My Ideas

Picture of The Motivation and My Ideas

Lets give a look in the Brunoip's version and compare with mine:

-It uses a Stepper motor to pull the paper, it makes the circuit and programming more complex, but the precision it's very reliable, I used instead a DC motor, making the circuit and programming easier, but losing a bit of the precision offered by the stepper.

-The pen makes a circular(that's the word?!) movement, like a pointer in a clock, I opted for a vertical movement, and instead of using a H bridge chip to moving the motor in both directions, I used only a transistor to lower the pen, making a mechanism with a spring to lift it.

-Brunoip used a pic microcontroller as a brain for its printer, I opted for Arduino because it is easy to code, to program , to buy and is very popular here.

Brunoip, thank you for posting this creative instructable, without it I would never think of making mine ;)

Step 2: Enough Talk, Lets Get the Recicled Parts!

Picture of Enough Talk, Lets Get the Recicled Parts!

You will need a CD or a DVD Reader/Writer, you can ask for one in the computer repairs workshop next to your house. You need the 'sled' from the DVD/CD reader with the stepper motor and laser module, it will be used to movement the pen mechanism.
The gears for opening the tray I used to make the pen mechanism. Here in my house I have boxes with parts that I toke from these drives for the years, so I not used pieces from only one drive. You can find many precious things in old electronics, think twice before putting them in the trash.

I used a piece of acrylic to make the base, but you can use wood or something like that, it only needs to be flat, that piece was from a friend that kindly gave me(acrylic is costly where I live). You can find a nice acrylic sheet in some LCD monitors, be careful opening them, you may hurt you fingers in some sharp parts.

The wheel used to pull the paper is from a old inkjet printer, You will see that I really like to reuse junk in my projects ;).

Step 3: Parts List (Arduino and Electronics).

Picture of Parts List (Arduino and Electronics).

Ok, let's see what we will need to control the printer.

To receive the data from computer and control the motors:

1 x Arduino Board (Uno, Nano, Mega.... whatever).

To controlling the DC motors:

2 x Diodes 1N4001 or similar.

2 x TIP120 Transistors (Can be the TIP122 too).

2 x 2.2k ohm Resistors (Red,Red,Red) ;

To control the stepper motor:

1 x L293D Dual bridge IC.

You will need too:

A breadboard, I used two halfs (yeah, i know, is what i had in hands).

Jumper cables.

A 7V power source( you can't power the motors through USB). You can see my converter in the images, I'm using a adjustable module to get 7V from my 12V source.

Step 4: Starting the Hard Work.

Picture of Starting the Hard Work.

*You can put your protection glasses now, i'm serious your eyes are too precious, be careful.*

You will need the laser sled from a CD or DVD reader, if you don't know how to disassemble one don't worry, I have a instructable teaching how to disassemble these drives, you can get some tips there.
Disassembling a CD/DVD reader and reusing its parts.

Hey! don't disassemble the entire driver, check the first picture in this step, this piece we will use to carrying the pen.

First, loose the screws that fix the brushless motor (the one that makes the CD spin), after that, with care, retire the laser module from the structure.

Step 5: A Long and Careful Journey, Disassembling the Laser.

Picture of A Long and Careful Journey, Disassembling the Laser.

We will need to retire many parts from the laser module, leaving only its structure. It will be use to attach the pen mechanism.

My advice is that you get a these made of plastic, like mine, because you will need to make a whole in it, there are the modules with a metal structure, like the one I disassembled in my other instructable, I think they are hard to drill but not impossible, remember to use protection glasses.

You will have to take all the electronics and glass, be careful here, you can cut yourself or hurt your eyes, see the pictures to know how to proceed, after having only the plastic structure make a hole like in the pictures, where the pen will pass.

Step 6: The Acrilic Pieces.

Picture of The Acrilic Pieces.

I made the white acrylic pieces with my dremel and a bench vise, but if you have a 3D printer or a laser cutter it can be easier, I think.

I'm putting here the measures of my pieces just to give you a idea,I think that you will have to make some changes, the holes have to be made according with your gears, motors and other parts.

A 2mm acrylic sheet was used, it was easy to cut and drill with the dremel, to glue the pieces together superglue was used.

I tried to make the models on sketchup, they aren't perfect, but you can see and understand them better.

Step 7: The Paper Pulling Gear

Picture of The Paper Pulling Gear

Just gather some gears, they don't need to be exactly from a CD/DVD reader, there are gears in old VHS players, DVD/CD players, electric toys, printers....

The wheel used to pull the paper is from a old inkjet printer, but if you don't have one you can use another thing, let me think............I know! A wheel from a broken RC car or a toy, or another thing, just be creative! It just has to offer friction enough to don't let the paper escape.

Sorry, as I said, this project was started some time ago, because this you can see that the piece already was done, I don't even had a camera when started this project, so I disassembled it to show the most I could.

Step 8: The Pen Mechanism.

Picture of The Pen Mechanism.

This piece makes me proud, it's such a piece of engineering made only with my handy dremel and a bench vise.

The gears I took from DVD players and CD readers and the motor from a CD reader. With the dremel I cut the white pieces of acrylic, using super glue to fix them.

When we apply a voltage in the motor, it makes the pen go down, making a dot in the paper, a spring is used to make pen lift and come back to it's position, this way is possible to control the motor with only a transistor instead of a H bridge.

Step 9: All Your Base Are Belong to Us

Picture of All Your Base Are Belong to Us

The base can be made of acrylic, like mine, but you can use wood too.

Before putting the sled on the base, desolder the cable and put a female header to make easy connect it with jumper cables, if you don't have the female header you can solder wire.

In the image you can see that i out some pieces of plastic to make the paper stay in the right place while printing, I made them with rulers.

I used screws to fix the sled structure on the base, this makes easy regulating its height .

Step 10: Finishing the Mechanics

Picture of Finishing the Mechanics

Ok, let's finish mounting the mechanics.

Put the mechanism for pulling the paper on the base, see how much it is close of it, the wheel must make enough pressure on the paper to don't let it escape, but it can't be too strong, to allowing the paper to slide through the base.

Now you have the mechanics, let's go to electronics and after that to software!

Step 11: The Circuit Schematic.

Picture of The Circuit Schematic.

You can see in the images the circuit, be careful with the polarity of the components.

A TIP 120 transistor is used to drive each DC motor, the L293D is used to controlling the Stepper motor from the CD drive.To power the motors I used a 7V source, using more than that can damage your motors, be careful ;).

Any Arduino board can be used, Mega, UNO, Nano...

You can download the schematics(Fritzing and Eagle) below, it can help if you want to see them better.

Step 12: Mounting the Controller Board.

Picture of Mounting the Controller Board.

Follow the schematics on the previous step to connecting the components, be careful with their polarity.

A warning:

The L239D can overheat, damaging your breadboard, this was my first time playing with it so I didn't knew. My breadboard melted a little, but maybe because I left it on for a long time. You can make the circuit on a perfboard(a copper board available in electronics stores with a lot of holes) to be sure not damaging your precious breadboard.

Step 13: About the PC Side.

Picture of About the PC Side.

I'm using processing for processing( hehe) the images and sending them to Arduino. Processing is a great and easy language and tool, I only discovered how good it is a month or two ago.

With processing was very easy read the pixels from the image, and use the serial port too, if you still don't know it and is a maker I really recommend trying it.

Processing is derived from java and also is available to Windows, Linux and Mac.

So what you're waiting to download it?!

Download Processing.

Step 14: Understanding the Processing Sketch

Picture of Understanding the Processing Sketch

The Processing sketch is small, this is possible because of the good work made by the folks at Processing, making easy to play with images and read its pixels.

What the sketch does is to check every pixels in an image and then sends bytes though the serial port to say if the Arduino board must make a dot or not, or start a new line.

//Written by Robson Couto
//August 2014.
import processing.serial.*;
Serial myPort;  // Create object from Serial class
PImage IMG; //create a PImage named IMG

void setup() {
  size(60, 118);//Put here the size of your image
  String portName = Serial.list()[0];
  myPort = new Serial(this, portName, 9600);//opens the Serial Port
  IMG = loadImage("link2.jpg");//Open your image, put here the name of your image, including the extension.
  image(IMG, 0, 0);
void draw() {
  for (int y = 0; y < height; y++) {//check the lines
    for (int x = 0; x < width; x++) { //check each pixel in the line
      int loc = x + y*width; //the pixels are loaded as in a aray, so its position is only a number.
      if (IMG.pixels[loc]>color(128)) {
        myPort.write(0);//if a pixel is not black, send a '0'.
      else {
        myPort.write(1);//if a pixel is black, send a '1'.  
    delay(10000);//Wait for some time, time enough to the printer finish this line.
    myPort.write('L');//send a "L" to indicate a new line.

Step 15: Programming the Arduino.

Picture of Programming the Arduino.

It's necessary burn the Arduino only once, because we'll use the serial port through USB to send the images to the Arduino printing them.

The Arduino receives the bytes from the computer and checks if it has to make a dot or not.

At each dot the pen advances, until it receive a order to start a new line, when the paper moves a little.

Isn't necessary to download any additional library, just the code itself.

//Written by Robson Couto
//August 2014.

#define time 4 // time in miliseconds between each motor's step
#define pentime 200 //time of the pulse in the pen motor
#define pulltime 6200 //time(in microseconds to allow a alrge range) of the pulse on the motor to pull the paper.

#define penPin 4   //pen motor pin
#define paperPin 5 //paper motor pin

#define StepperA1 9  //stepper motor pins
#define StepperA2 10 //
#define StepperB1 11 //
#define StepperB2 12 //

byte data;//byte to receive and check data from computer
void setup() {            
  Serial.begin(9600);//Start the Serial port.  

  pinMode(StepperA1, OUTPUT);//Stepper motor pins as output
  pinMode(StepperA2, OUTPUT);
  pinMode(StepperB1, OUTPUT);
  pinMode(StepperB2, OUTPUT);

  pinMode(penPin,OUTPUT);//Pen motor pin as a output
  pinMode(paperPin,OUTPUT);//Paper motor pin as a output
  back(80);//makes the car return, to be sure it will start at the begin of the line

void loop() {
  if(Serial.available()){//if there is data on the Serial buffer
    while(Serial.available()>0){//continues reading the values on the buffer.;
        dot();//if a one was received, makes a dot.
        forward(1);//avances one time (four steps)

        forward(1);// if a zero was received just avances.
      if(data=='L'){//if a "L" was received, pull the paper to begin a new line.
        pullPaper();//call the pulling paper function.
        back(80);//return the car.
void forward(int number){//forward function, you can choose the number of steps when calling the function
  int i=0;//to control the number of steps
    digitalWrite(StepperA1, HIGH); //this sequence is part of the basic algoritm to control a bipolar stepper motor.  
    digitalWrite(StepperA2, LOW);    
    digitalWrite(StepperB1, HIGH);     
    digitalWrite(StepperB2, LOW);     
    delay(time);//wait the time defined.                
    digitalWrite(StepperA1, HIGH);    
    digitalWrite(StepperA2, LOW);     
    digitalWrite(StepperB1, LOW);    
    digitalWrite(StepperB2, HIGH);     
    digitalWrite(StepperA1, LOW);    
    digitalWrite(StepperA2, HIGH);     
    digitalWrite(StepperB1, LOW);    
    digitalWrite(StepperB2, HIGH);     
    digitalWrite(StepperA1, LOW);    
    digitalWrite(StepperA2, HIGH);     
    digitalWrite(StepperB1, HIGH);    
    digitalWrite(StepperB2, LOW);     
  digitalWrite(StepperA1, LOW);    
  digitalWrite(StepperA2, LOW);     
  digitalWrite(StepperB1, LOW);    
  digitalWrite(StepperB2, LOW);     


void back(int number){//As the forward function, but makes the reverse sequence.
  int i=0;
    digitalWrite(StepperA1, LOW);    
    digitalWrite(StepperA2, HIGH);     
    digitalWrite(StepperB1, HIGH);    
    digitalWrite(StepperB2, LOW);     

    digitalWrite(StepperA1, LOW);    
    digitalWrite(StepperA2, HIGH);     
    digitalWrite(StepperB1, LOW);    
    digitalWrite(StepperB2, HIGH);     

    digitalWrite(StepperA1, HIGH);    
    digitalWrite(StepperA2, LOW);     
    digitalWrite(StepperB1, LOW);    
    digitalWrite(StepperB2, HIGH);     

    digitalWrite(StepperA1, HIGH);    
    digitalWrite(StepperA2, LOW);     
    digitalWrite(StepperB1, HIGH);    
    digitalWrite(StepperB2, LOW);     

  digitalWrite(StepperA1, LOW);    
  digitalWrite(StepperA2, LOW);     
  digitalWrite(StepperB1, LOW);    
  digitalWrite(StepperB2, LOW);     

void dot(void){//actives the pen motor for some time

void pen(void){                        //this functions can be used if you want to make lines instead of dots,
  digitalWrite(penPin,HIGH);           // I think that the dots are cool.
}                                      //
void nopen(void){                      //
  digitalWrite(penPin,LOW);            //
}                                      //

void pullPaper(void){ //function to pull the paper

Step 16: Done!

Picture of Done!

It was a nice and rewarding journey, I learned many things making
this printer, it is a powerful didactic device, let's see what i played with:

The mechanical part is full of physics, the reduction gear is used to offer enough torque to pull the paper and do it slower than the the motor rotation.The spring makes the pen return to its original position, potential energy being nice here.

The electronic part has the Arduino and the components needed to make the motors spin, I learned how to use these stepper motors from old CD drivers using the L293D chip, they are really nice if you want precision.

About programming we have:

  • First contact with Processing, a really nice language.
  • Image processing and matrices(easy thanks to Processing), used to know if a pixel in a image is black or not.
  • Serial communication used to transport the bits from the PC to the Arduino.

And recycling! I love to take apart old electronics and learn about them. You can imagine what kind of cool things that are inside these scraps.

Step 17: Show Your Art! Sharing It With Your Friends!

Picture of Show Your Art! Sharing It With Your Friends!

It actually is yours printer's art, but if you don't say it, i won't say too.

My friends and girlfriend seems to like these printings, they even ask for an character, pokémon, or something they like.

What about you? Make some these and give to someone you like, your friends, girlfriend or boyfriend, crush, little brother, grandpa.... I'm sure they will love.

Well, thanks for reading! And don't forget to vote for me in the contests if you liked my instructable, your support is really nice, these amazing prizes can help me to make new instructables that you may like.



Sidh Dhiman (author)2017-12-11

sir i have copied your program but my stepper motor is not working properly ,pls suggest me what to do?

geymerwan (author)2017-06-22

Sir Robson can I use a SN754410 IC instead of a L293D IC?

ss429842 made it! (author)2015-08-01

made my own!

user pc's CD/DVD drive+12v relay(for pen mechanism)+arduino

theoney (author)ss4298422016-05-05

somnath sir can you help me whenever i try to upload the image it says that the image is missing or unaccesible

ss429842 (author)theoney2016-05-07

u mean sending the image to arduino ... if yes the it should be uploaded by processing code....for any problem just inbox me at
FB @ ss429842

Robson Couto (author)ss4298422016-01-24


ss429842 (author)2016-03-14

Robson Couto how to make a continous line instead of the DOTs.

Robson Couto (author)ss4298422016-04-23

Sorry for the late reply. Have a little look at the code, there is some code for lifting the pen. But be aware that you gonna have parallel lines. If you want drawings more complicated than these you gonna have to build a CNC.

binaryhub (author)2016-04-23

Can i use here a CORRUPTED cd/dvd writer ???
~thanks in advance

Robson Couto (author)binaryhub2016-04-23

Sure! Only the mechanical parts are needed.

pandes30 (author)2015-09-07

It's mine. Thanks Robson Couto. :)

binaryhub (author)pandes302016-04-23

Are you made it with arduino ??
~thanks in advance.

Robson Couto (author)pandes302016-01-24

You did it!

And I see you made a lot of changes. Great work!

AshanN1 (author)2016-03-11

i wont more help ,this is realy good

AshanN1 (author)2016-03-11

i wont more help ,this is realy good

AshanN1 (author)2016-03-11

i wont more help ,this is realy good

jarroyo5 (author)2016-01-26

I love this machine!


Robson Couto (author)jarroyo52016-02-28

Muchas gracias!!!!

osamalios (author)2016-01-22

epic job but i need to aks

is it dangerous to "burn" the arduino? i mean i kinda understand wat it means but is it dangerous?

and how to get the pictures it self so the software processing can process their pixels???

Robson Couto (author)osamalios2016-01-24

Your arduino won't burn if you feed less than 12V to it, but the motors can stand this much. So I used 7.5 if I am not wrong.

About the images, I used paint to create bitmap monochromes(save as > bitmap...). But remenber you have to resize the picture too.

YuukiDesu (author)2015-10-15

Legal o tutorial hein, Robson!

Gostei, cara! Nota 10!

Era exatamente o que eu tava procurando...

Robson Couto (author)YuukiDesu2016-01-24

Pow, obrigadão.

Espero que tenha conseguido!

Safiul islam safi (author)2015-06-25

It's amazing (y)

Thank you!

pandes30 (author)2015-09-04

My one done. It's work. Thanks a lot. I use h-bridge for pen motor. =))

pandes30 (author)2015-08-14

Great! I'll make one :))

ss429842 (author)2015-08-01

Si ThuH (author)2015-06-27 me plz...
DVD R/W drive used in this project is Desktop computer drive Or another Player...?????

makeosaurus (author)2015-06-26

I'm thinking of making this and copied your proccesing code to see how it worked. however when i try and run it, there is the error


The line that its coming from is:

String portName = Serial.list()[0];

Any ideas why it isn't working?

ChaitanyaS (author)2015-05-21

Hey can u help me with the coding like to control the pen motor and paper motor i want to do it with a h bridge i have two of them so i want to control stepper with one and other two motors with the other h brige

electro77 (author)2015-05-03

Your instructable is really nice

I have being watching it for months, the pen mechanism proved to be hard to fabricate, but yesterday I found an interesting solution

We can use the tray pulling mechanism of a cd rom,

I am starting building it as soon as possible, will keep you folks updated with project


Robson Couto (author)electro772015-05-03

I waiting to see this new mod.
I it is easer to make, this printer could be done by more people.

Hey, see the comment of muratsen92 below, i think he/she is using the same mechanism as you want.

mmoos (author)2015-04-27


I like your instructable and I'm making it.

but I have some problem with the paper motor.

It'ssometimes not rotating, but when I rotate it by my hand; it get back working!

It's just like I'm charging it.

I tried lots of things but it still doesn't work!

Robson Couto (author)mmoos2015-05-03

Sorry for the late reply, did it work?

I f not, trying to be sure all your conection are well made, maybe there is eletrical connection only when you're testing. Also see if you connected everyting like my schematic.

If it doesn't work i'll be here.

andsen942 (author)2015-04-19

Hey! Love the project and getting ready to order some parts. How exactly did you work out the whole power supply thing? Thanks!

Robson Couto (author)andsen9422015-04-23

Hi, I used a Wall adapter(I think they are called this in english), it is 220V input-12V output, and then I used a the adjestable converter on the image to get the ~7V that I used on the motors.

Thanks for reading!

muratsen92 made it! (author)2015-03-17

It works :)) thank you.. but a question.. how can I change the picture? When I change the image name on the processing it says the file is missing or inaccessible.. please help

Robson Couto (author)muratsen922015-04-23

Sorry for the late reply, you have to be sure the name in the processing sketch is the same name in the image file.

I hope this helps.

mni ming yun (author)2015-02-10



stefan.brocanelli made it! (author)2015-01-20

Hi guys!

We had to build something as a project in our Management Engineering course and we decided to build this printer! :D
Here are our results:


I'm proud, congratulations guys.

I'm glad of seeing people remaking my remake.

uroy1 (author)2014-12-28

nice project..i also want to make one for myself but the processing

sketch is not working for me..the picture doesn't open...please help me..

Robson Couto (author)uroy12014-12-28

The sketch is working, the image only appears at the ending of printing.;)

CG MartiinC (author)Robson Couto2015-01-08

the same thing happens, and I only work the engine of Paper

Robson Couto (author)CG MartiinC2015-01-08

You said that would use a dc motor instead of a stepper, so this change is by you, i can't say what is wrong.

But at least the other two motors should be working. Check the connections another time.


CG MartiinC (author)CG MartiinC2015-01-08

an apology, which only works for me is the pen

CG MartiinC (author)2015-01-08

I have solved this

Now I have a problem I dont know how to load image to processing.

Could you make a video of how to load it?

I'd appreciate it very much

Robson Couto (author)CG MartiinC2015-01-08

Sorry, i can't make a video.

The code is well commented, the instructable is detailed as well, some of others commenters got it working, put a little more effort on it and you will get it working also ;)

About This Instructable




Bio: A eletrical engeneering student, video games lover and hardware aficionado. Starting my journey through the world of electronics. Microcontrollers?! I love them!
More by Robson Couto:Raspberry Pi - GPIOs, graphical interface, pyhton, math, and electronics.Scanner light and Arduino as an RGB lampDot Matrix Printer from a CD/DVD Reader with Arduino
Add instructable to: