Vous êtes sur la page 1sur 7

http://www.instructables.

com/id/Homemade-arduino-printer/
Home Sign Up! Browse Community Submit
All Art Craft Food Games Green Home Kids Life Music Offbeat Outdoors Pets Photo Ride Science Tech
Homemade arduino printer
by talesgurjao on February 13, 2011
Table of Contents
Homemade arduino printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Intro: Homemade arduino printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Step 1: Build the structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Step 2: Finish the structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Step 3: Connect everything together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Step 4: It's time for a little code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Step 5: Calibration and considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
http://www.instructables.com/id/Homemade-arduino-printer/
Intro: Homemade arduino printer
If you want to make your own high resolution printer (maybe not so high res), you are at the right place. This Instructable will show you how to do with two dead cd/dvd
drive and a pen (pilot, whiteboard marker, whatever you have) at the best lego-printer style.
Here is how our printer will work: we type any message in terminal then the message will be printed (as dot matrix) and after the message is printed the program will wait
for another message.
For this magnificent printer you will need:
1) 1 x Arduino (I've used the Duemilanove)
2) 2 x H-Bridge (SN754410)
3) 3 x small dc motors from any cd/dvd drive
4) 3 x switches from the same cd/dvd drive
5) A pen or marker
6) Wire
7) Rubber string
8) Sheave
9) Stick with round rubber like the rollers in a real printer, the wheels from a toy car should work.
10) Acrylic, wood or whatever you have to build the structure.
11) 5v and 9v power supply
If you have an old printer you can use its structure and save some time to build one.
Once you have all that is time to build the structure.
Image Notes
1. A self-made power supply from a computer power supply
2. Arduino + HBridges
3. 3 switches from cd/dvd drive
4. dc motor with gears from the cd/dvd drive's tray
5. dc motor with gears from the cd/dvd drive's tray
6. dc motor from cd/dvd drive's head
7. Rollers
Step 1:Build the structure
Now you have to build the structure with any materials you want (even with lego),I choose acrylic because it's cheap and easy to work.
All you have to do is to mount a "U" Structure and add two tubes where our printer's head will move, also add the supports for rollers and the sheave.
As said before, if you have and old printer you can use it and skip this step.
Image Notes
1. Sheave
2. Right support for the roller
3. Left support for the roller
4. Upper tube
5. Lower tube
http://www.instructables.com/id/Homemade-arduino-printer/
Step 2:Finish the structure
Now its time to finish the structure, this is the most painful step because you have to measure, cut, drill, solder, etc...
You will need 2 x motors with gears from drive's tray and 1 x motor from drive's head.
You can also use the whole tray, or like I did, cut a circuit board at the same shape of the tray to save some weight. Also add some supports to the head, here I
soldered 3 screw nuts to the back of the head.
Also note that the head have 3 switches taken from the cd/dvd drive. These switches tell us if the head reach the left/right of the structure and if the head motor is down
(this means that the pen/marker is touching the paper). One leg of the switch goes to ground and the other goes to one analog pin, no need for external resistors because
we will use the internal pull-up resistors.
Now attach the motors, the head, the roller and the pen/marker to the head.To finish this step attach the rubber string to the motor, to the head and to the sheave.
Note that all parts will not fit perfectly, so you have to use your skills to make this work, but, probably, some hot glue is the answer for most of our problems.
Image Notes
1. The rubber string
2. The head mounted
Image Notes
1. Motor 1 with gears
2. Motor 2 with gears. This was placed in a new support.
Image Notes
1. original tray made of steel
2. The new tray made from a copper board
Image Notes
1. Screw nuts soldered in the back of the tray
http://www.instructables.com/id/Homemade-arduino-printer/
Image Notes
1. Left switch - to know when the head reach the left side
2. Bottom switch - to know when the tip is touching the paper
3. Right switch - to know when the head reach the right side
Image Notes
1. Motor to move the head horizontally
2. Motor to move the roller
3. Roller
Image Notes
1. A whiteboard marker attached to the head
2. Bottom switch pressed (the marker is touching the paper).
3. The motor of the head
Step 3:Connect everything together
Let's connect everything to the Arduino.First of all, connect the switches as shown in the previous step.

Then connect the motors to the H-Bridge and the H-Bridge to Arduino.The schematic bellow is a little messy but, thats the way it is, you can also take a look at this
simple tutorial (http://itp.nyu.edu/physcomp/Labs/DCMotorControl ).
http://www.instructables.com/id/Homemade-arduino-printer/
Image Notes
1. Switches and ground goes here
2. H-Bridges
3. Motor control pins goes here
Step 4:It's time for a little code.
First thing to do is to define where the switches and the H-Bridge control pins are connected:
const int moveA = 3; //pin 1 of the motor to move the head horizontally
const int moveB = 2; //pin 2 of the motor to move the head horizontally
const int headA = 4; //pin 1 of the motor to move the head vertically
const int headB = 5; //pin 2 of the motor to move the head vertically
const int rollerA = 7; //pin 1 of the motor to move the roller
const int rollerB = 6; //pin 2 of the motor to move the roller
const int enableMove = 8; // to enable the motor that moves the head horizontally
const int enableRoller = 9; // to enable the motor that moves the roller
const int enableHead = 10; // to enable the motor that moves the head vertically
const int leftButton = 14; //the left switch
const int rightButton = 15; //the right switch
const int bottomButton = 16; //the bottom switch
Now in setup() we must set the motor control pins as output and the switches pins as input (a) , then we have to set the enable pins as HIGH (b) and enable the pull-up
resistors from switches pins (c) .
(a) set the output and input pins
pinMode(moveA, OUTPUT);
pinMode(moveB, OUTPUT);
pinMode(headA, OUTPUT);
pinMode(headB, OUTPUT);
pinMode(rollerA, OUTPUT);
pinMode(rollerB, OUTPUT);
pinMode(enableMove, OUTPUT);
pinMode(enableRoller, OUTPUT);
pinMode(enableHead, OUTPUT);
pinMode(leftButton, INPUT);
pinMode(rightButton, INPUT);
pinMode(bottomButton, INPUT);
(b) set the enable pins
digitalWrite(enableMove, HIGH);
digitalWrite(enableRoller, HIGH);
analogWrite(enableHead, HEAD_VERTICAL_SPEED);
Note that our vertical head's motor is enabled through analogWrite, that's because this motor was super-fast and didn't had gears, so, using the analogWrite with a
value near to 400 the motor is behaving properly. You can use the mos suitable value (between 0 and 1023) for your motor.
(c) enable the pull-up resistors
digitalWrite(leftButton, HIGH);//enable pullup resistor to this pin
digitalWrite(rightButton, HIGH);//enable pullup resistor to this pin
digitalWrite(bottomButton, HIGH);

Now we must have a ASCII glyph table, fortunately we can get it here:http://www.arduino.cc/playground/Code/PCD8544
If you want to draw and print you own glyph you can do that here:http://www.carlos-rodrigues.com/projects/pcd8544/ then just paste the generated glyph into the code
and print that.
The algorythm to control the printer is quite simple and you can download the full source code at the end of this instructable.
http://www.instructables.com/id/Homemade-arduino-printer/
Step 5:Calibration and considerations
Now is the final step, at this point you have to consider some values in order to make your printer work properly. You have to test each value accordingly to each motor
you're using.
Note that higher resolutions can be achieved with a thinner tip. Generally a thin tip requires the values to be smaller and thick tip requires bigger values.Also according
to your motor/gears lower and higher resolutions are possible.
Another thing to notice is the direction of the motor. If the motor is spinning in wrong direction you can either change its terminals in the circuit or change the pins in the
code.
Calibrate your printer based on this values:
const int TIME_TO_EJECT_PAPER = 3000;
-the time that takes to eject all the paper
const int TIME_TO_MOVE_PAPER = 40 ;
-the time that takes to move the paper between each column
const int TIME_TO_MOVE_HEAD_HORIZONTALLY = 40 ;
-the time that takes to move the head between each dot
const int WAIT_TIME_TO_MOVE_HEAD_HORIZONTALLY = 50;
-the time to wait until move the head again to draw another dot
const int TIME_TO_MOVE_HEAD_VERTICALLY = 30;
-the time that takes to move the head up/down; this affects the speed of writing
const int WAIT_TIME_TO_MOVE_HEAD_VERTICALLY = 400;
-the time to hold the pen/marker down when writing a dot
const int HEAD_VERTICAL_SPEED = 400;
-the speed of the head up/down motor, this may be necessary because this motor generally doesn't have gears.
You can download the full source code below, as well, see two pics before and after calibrate the system with a very thick tip whiteboard marker.
Image Notes
1. After calibration letters are ok
Image Notes
1. Before calibration letters seems a little misaligned
http://www.instructables.com/id/Homemade-arduino-printer/
File Downloads
printer.pde (8 KB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'printer.pde']
Related Instructables
Dual Motor
Driver with
Arduino using a
SN754410NE
Quad Half H-
Bridge by
ArduinoFun
Bubblebot:
Gigantic Bubble
Generator by
zvizvi
xmas-box:
Arduino/ioBridge
internet
controlled
Christmas lights
and music show
by noelportugal
Fish Speed Trap
by Photosbykev
Simple 2-way
motor control
for the arduino
by computergeek
Arduino R/C
Lawnmower
(painted) by
johndavid400
Comments
4 comments Add Comment
madscientist007 says: Feb 27, 2011. 1:18 AM REPLY
hey gr8 project.i was thinking about building one but i thought it cant be build using dc motors rather than steppers so pls send me the pdf..
email: adilmalik_n@hotmail.com
talesgurjao says: Feb 27, 2011. 9:43 AM REPLY
You can use step motors, but I didn't tried because the intention was to keep a low cost using only pieces from an old cd/dvd drive, which includes the dc
motors.
rimar2000 says: Feb 14, 2011. 3:55 AM REPLY
WOW! You are awesome!
ElvenChild says: Feb 14, 2011. 1:44 PM REPLY
Holy fudging cow this is so darn awesome

Vous aimerez peut-être aussi