Printer From a CD Reader

by brunoip in Circuits > Robots

76245 Views, 469 Favorites, 0 Comments

Printer From a CD Reader

SAM_2669.JPG
SAM_2662.JPG
SAM_2483.JPG
This is an easy printer made from parts of a cd reader.
It prints using a regular marker of any color.
Maybe it doesn't have a great resolution but this is a project that I really wanted to do.


Materials

SAM_2221.JPG
SAM_2228.JPG
SAM_2234.JPG
The most important is the cd reader, also a dvd reader will work.
Try to find one with a bipolar motor for the laser, mine used a regular dc motor and I changed it later for a stepper motor.
Also you will need another stepper motor with a rubber wheel and a wooden base.
Electronic stuff is detailed in other step.

First Motor

SAM_2245.JPG
SAM_2249.JPG
SAM_2251.JPG
SAM_2273.JPG
SAM_2274.JPG
Remove this motor with the metal support and the horizontal guides.
The pick up laser and the other motor are not used.


Second Motor

SAM_2306.JPG
SAM_2316.JPG
SAM_2318.JPG
SAM_2320.JPG
SAM_2324.JPG
SAM_2328.JPG
SAM_2336.JPG
SAM_2348.JPG
This motor have to be removed with all the reduction gears.
Cut the plastic with a dremell and then use a sand paper to remove the excess.

Finish the Cartridge

SAM_2360.JPG
SAM_2367.JPG
SAM_2368.JPG
SAM_2375.JPG
This is not actually a cartridge. But this is where the marker will be attached.
Use a piece of plastic, attach the dc motor to one of the sides and then glue all this over the guides of pick up laser.

Marker Holder

SAM_2365.JPG
SAM_2379.JPG
SAM_2385.JPG
This little piece will allow you to change the marker.
Is a plastic tube with a hole on one side. Over that hole I glued a plastic nut with a screw.
This piece must be glued to the last reduction gear.

New Motor

SAM_2470.JPG
SAM_2468.JPG
SAM_2472.JPG
SAM_2471.JPG
This is because my cd reader used a dc motor, and it is not very efficient, so I changed it for a bipolar stepper motor.

Electronic Board

SAM_2443.JPG
SAM_2444.JPG
esquma.bmp
The circuit was made using a perfboard. The three switches in the image are to used in the final project

Finish the Hardware

SAM_2664.JPG
SAM_2665.JPG
SAM_2662.JPG
SAM_2670.JPG

Basic Code

psi.BMP
Define CONF_WORD = 0x3f70
AllDigital 'Todos los pines del PORTA como E/S
TRISA = 0x00
TRISB = 0x00 'Configuro el PORTB completo como salida.

Symbol motorpen1 = PORTA.0
Symbol motorpen2 = PORTA.1
Symbol motora1 = PORTB.0
Symbol motora2 = PORTB.1
Symbol motorb1 = PORTB.2
Symbol motorb2 = PORTB.3
Symbol bobina1 = PORTB.4
Symbol bobina2 = PORTB.5
Symbol bobina3 = PORTB.6
Symbol bobina4 = PORTB.7

PORTB = 0x00
PORTA = 0x00
Dim sleeptime As Byte
Dim sleeppap As Byte
Dim cambio As Bit
Dim fila As Byte
Dim fila2 As Byte
Dim fila3 As Byte
Dim fila4 As Byte
Dim fila5 As Byte
Dim bipo As Byte

bipo = 1
sleeppap = 2

fila = 255
fila2 = 255
fila3 = 255
fila4 = 255
fila5 = 255

cambio = True

inicio:
botones:

Gosub avanzarmotor1
Gosub avanzarmotor1
Gosub ecribirletra
Gosub ecribirletra
fila = 0
fila2 = 0
fila3 = 0
fila4 = 0
fila5 = 0
Gosub ecribirletra
Gosub ecribirletra

'aca empieza el codigo

'aca termina el codigo

fila = 0
fila2 = 0
fila3 = 0
fila4 = 0

Goto botones

End

ecribirletra:

If fila5.7 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila5.6 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila5.5 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila5.4 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila5.3 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila5.2 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila5.1 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila5.0 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila4.7 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila4.6 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila4.5 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila4.4 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila4.3 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila4.2 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila4.1 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila4.0 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila3.7 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila3.6 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila3.5 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila3.4 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila3.3 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila3.2 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila3.1 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila3.0 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila2.7 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila2.6 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila2.5 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila2.4 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila2.3 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila2.2 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila2.1 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila2.0 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila.7 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila.6 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila.5 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila.4 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila.3 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila.2 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila.1 = True Then
Gosub bajarlapicera
Endif
Gosub moverhorizontal
If fila.0 = True Then
Gosub bajarlapicera
Endif
Gosub volvertodo
Gosub avanzarmotor1
Return

bajarlapicera:
motorpen1 = 1
motorpen2 = 0
WaitMs 102
motorpen1 = 0
motorpen2 = 1
WaitMs 102
motorpen1 = 0
motorpen2 = 0
WaitMs 102
Return

moverhorizontal:
bipo = bipo + 1
If bipo = 5 Then bipo = 1
PORTB = 0
motora1 = 1
motorb1 = 1
WaitMs sleeppap
PORTB = 0
motora1 = 1
motorb2 = 1
WaitMs sleeppap
PORTB = 0
motora2 = 1
motorb2 = 1
WaitMs sleeppap
PORTB = 0
motora2 = 1
motorb1 = 1
WaitMs sleeppap
PORTB = 0
Return

moverhorizontalatras:
bipo = bipo + 1
If bipo = 5 Then bipo = 1
PORTB = 0
motora2 = 1
motorb1 = 1
WaitMs 6
PORTB = 0
motora2 = 1
motorb2 = 1
WaitMs 6
PORTB = 0
motora1 = 1
motorb2 = 1
WaitMs 6
PORTB = 0
motora1 = 1
motorb1 = 1
WaitMs 6
PORTB = 0
Return

volvertodo:
Dim y As Byte
For y = 0 To 41
motora2 = 1
motorb1 = 1
WaitMs sleeppap
PORTB = 0
motora2 = 1
motorb2 = 1
WaitMs sleeppap
PORTB = 0
motora1 = 1
motorb2 = 1
WaitMs sleeppap
PORTB = 0
motora1 = 1
motorb1 = 1
WaitMs sleeppap
PORTB = 0
Next y
PORTB = 0
Return

avanzarmotor1:
If cambio = True Then
cambio = False
Else
cambio = True
Endif

If cambio = True Then
PORTB = 0
bobina1 = 1
WaitMs sleeptime
PORTB = 0
bobina1 = 1
bobina2 = 1
WaitMs sleeptime
PORTB = 0
bobina2 = 1
WaitMs sleeptime
PORTB = 0
bobina2 = 1
bobina3 = 1
WaitMs sleeptime
PORTB = 0
Else
PORTB = 0
bobina3 = 1
WaitMs sleeptime
PORTB = 0
bobina3 = 1
bobina4 = 1
WaitMs sleeptime
PORTB = 0
bobina4 = 1
WaitMs sleeptime
PORTB = 0
bobina4 = 1
bobina1 = 1
WaitMs sleeptime
PORTB = 0
Endif
Return

retrocedermotor1:
If cambio = True Then
cambio = False
Else
cambio = True
Endif
If cambio = True Then
PORTB = 0
bobina4 = 1
WaitMs sleeptime
PORTB = 0
bobina3 = 1
bobina4 = 1
WaitMs sleeptime
PORTB = 0
bobina3 = 1
WaitMs sleeptime
PORTB = 0
bobina2 = 1
bobina3 = 1
WaitMs sleeptime
PORTB = 0
Else
PORTB = 0
bobina2 = 1
WaitMs sleeptime
PORTB = 0
bobina2 = 1
bobina1 = 1
WaitMs sleeptime
PORTB = 0
bobina1 = 1
WaitMs sleeptime
PORTB = 0
bobina4 = 1
bobina1 = 1
WaitMs sleeptime
PORTB = 0
Endif
Return

Code Generator

programapp.PNG
programapp2.PNG
For an easy drawing I made this program in Java language.
You just need to open it and make your draw, when you finish it just press "p" and you will see a window with the source code that you need. Copy this code and paste it between the labels "'aca empieza el codigo" and "'aca termina el codigo" of your basic code.

Examples

SAM_2473.JPG
SAM_2474.JPG
SAM_2475.JPG
SAM_2476.JPG
SAM_2477.JPG
SAM_2478.JPG
SAM_2479.JPG
SAM_2480.JPG
SAM_2481.JPG
SAM_2482.JPG
DSC01076.JPG
SAM_2447.JPG