loading

Hey!

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

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!

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).

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.

*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.

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.

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

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.

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

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

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.

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.

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.

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

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
//http://dragaosemchama.com.br/
//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() {
  IMG.loadPixels(); 
  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'.
        delay(50);
      }
      else {
        myPort.write(1);//if a pixel is black, send a '1'.  
        delay(50);
      }
    }
    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.
  }
  noLoop();
}

Step 15: 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
//http://dragaosemchama.com.br/
//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.
      data=Serial.read();
      if(data==1){
        dot();//if a one was received, makes a dot.
        forward(1);//avances one time (four steps)
      }

      if(data==0){
        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
  while(i<number){
    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);     
    delay(time);
    digitalWrite(StepperA1, LOW);    
    digitalWrite(StepperA2, HIGH);     
    digitalWrite(StepperB1, LOW);    
    digitalWrite(StepperB2, HIGH);     
    delay(time);
    digitalWrite(StepperA1, LOW);    
    digitalWrite(StepperA2, HIGH);     
    digitalWrite(StepperB1, HIGH);    
    digitalWrite(StepperB2, LOW);     
    delay(time);
    i++;
  }
  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;
  while(i<number){
    digitalWrite(StepperA1, LOW);    
    digitalWrite(StepperA2, HIGH);     
    digitalWrite(StepperB1, HIGH);    
    digitalWrite(StepperB2, LOW);     
    delay(time);

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

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

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

    i++;
  }
  digitalWrite(StepperA1, LOW);    
  digitalWrite(StepperA2, LOW);     
  digitalWrite(StepperB1, LOW);    
  digitalWrite(StepperB2, LOW);     

}
void dot(void){//actives the pen motor for some time
  digitalWrite(penPin,HIGH);
  delay(pentime);
  digitalWrite(penPin,LOW);
}

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
  digitalWrite(paperPin,HIGH);
  delayMicroseconds(pulltime);
  digitalWrite(paperPin,LOW);
}

Step 16: 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!

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.

Bye!

<p>made my own!</p><p>user pc's CD/DVD drive+12v relay(for pen mechanism)+arduino</p>
<p>somnath sir can you help me whenever i try to upload the image it says that the image is missing or unaccesible</p>
u mean sending the image to arduino ... if yes the it should be uploaded by processing code....for any problem just inbox me at <br>FB @ ss429842
<p>Awesome!</p>
<p><a href="https://www.instructables.com/member/Robson%20Couto" rel="nofollow">Robson Couto</a> how to make a continous line instead of the DOTs.</p>
<p>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. </p>
<p>Can i use here a CORRUPTED cd/dvd writer ???<br>~thanks in advance</p>
<p>Sure! Only the mechanical parts are needed.</p>
<p>It's mine. Thanks <a href="https://www.instructables.com/member/Robson+Couto/" rel="nofollow">Robson Couto</a>. :)</p>
<p>Are you made it with arduino ??<br>~thanks in advance.</p>
<p>You did it!</p><p>And I see you made a lot of changes. Great work!</p>
<p>i wont more help ,this is realy good</p>
<p>i wont more help ,this is realy good</p>
<p>i wont more help ,this is realy good</p>
<p>I love this machine!</p><p>Gracias!!!!</p>
<p>Muchas gracias!!!!</p>
<p>epic job but i need to aks </p><p>is it dangerous to &quot;burn&quot; the arduino? i mean i kinda understand wat it means but is it dangerous?</p><p>and how to get the pictures it self so the software processing can process their pixels???</p>
<p>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.</p><p>About the images, I used paint to create bitmap monochromes(save as &gt; bitmap...). But remenber you have to resize the picture too.</p>
<p>Legal o tutorial hein, Robson!</p><p>Gostei, cara! Nota 10! </p><p>Era exatamente o que eu tava procurando...</p>
<p>Pow, obrigad&atilde;o.</p><p>Espero que tenha conseguido!</p>
It's amazing (y)
<p>Thank you!</p>
<p>My one done. It's work. Thanks a lot. I use h-bridge for pen motor. =))</p>
<p>Great! I'll make one :))</p>
Hi...help me plz...<br>DVD R/W drive used in this project is Desktop computer drive Or another Player...?????
<p>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</p><p>ArrayIndexOutOfBoundsException:0</p><p>The line that its coming from is:</p><p>String portName = Serial.list()[0];</p><p>Any ideas why it isn't working?</p>
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
<p>Your instructable is really nice</p><p>I have being watching it for months, the pen mechanism proved to be hard to fabricate, but yesterday I found an interesting solution</p><p>We can use the tray pulling mechanism of a cd rom,</p><p>I am starting building it as soon as possible, will keep you folks updated with project</p><p>73</p>
Thanks.<br>I waiting to see this new mod.<br>I it is easer to make, this printer could be done by more people.<br>Bye!
<p>Hey, see the comment of <a href="https://www.instructables.com/member/muratsen92/" rel="nofollow">muratsen92 </a>below, i think he/she is using the same mechanism as you want.</p>
<p>Hi</p><p>I like your instructable and I'm making it.</p><p>but I have some problem with the paper motor.</p><p>It'ssometimes not rotating, but when I rotate it by my hand; it get back working!</p><p>It's just like I'm charging it.</p><p>I tried lots of things but it still doesn't work!</p>
<p>Sorry for the late reply, did it work?</p><p>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.</p><p>If it doesn't work i'll be here.</p>
<p>Hey! Love the project and getting ready to order some parts. How exactly did you work out the whole power supply thing? Thanks!</p>
<p>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.</p><p>Thanks for reading! </p>
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
<p>Sorry for the late reply, you have to be sure the name in the processing sketch is the same name in the image file.</p><p>I hope this helps.</p>
<p>OMG!!!</p>
<p>Thanks!!!</p>
<p>Hi guys! </p><p>We had to build something as a project in our Management Engineering course and we decided to build this printer! :D<br>Here are our results:</p><p><iframe allowfullscreen="" frameborder="0" height="281" src="//www.youtube.com/embed/wDkiWrs029A" width="500"></iframe></p>
<p>Awesome!</p><p>I'm proud, congratulations guys.</p><p>I'm glad of seeing people remaking my remake.</p>
<p>nice project..i also want to make one for myself but the processing </p><p>sketch is not working for me..the picture doesn't open...please help me..</p>
<p>The sketch is working, the image only appears at the ending of printing.;)</p>
<p>the same thing happens, and I only work the engine of Paper</p>
<p>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.</p><p>But at least the other two motors should be working. Check the connections another time.</p><p>Robson.</p>
<p>an apology, which only works for me is the pen</p>
<p>I have solved this</p><p>Now I have a problem I dont know how to load image to processing.</p><p>Could you make a video of how to load it?</p><p>I'd appreciate it very much</p>
<p>Sorry, i can't make a video.</p><p>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 ;)</p>
<p>I have a question that device falls mechanism, a computer or a DVD?</p>
<p>You're talking about the pen mechanism? It is from CD reades and DVD players parts.</p>

About This Instructable

109,069views

923favorites

License:

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 lamp Dot Matrix Printer from a CD/DVD Reader with Arduino 
Add instructable to: