You are on page 1of 7

Tutorial: Use an Old Inkjet Printer to Learn Servo

Motor Control With EMC2 Part 2


madpenguin.ca /blog/2011/06/14/tutorial-use-an-old-inkjet-printer-to-learn-servo-motor-controlwith-emc2-part-2-2/
madpenguin

Printer Carcass Ready For Use

Continued from Part 1


So youd like to play with servo motor control would you? Well hopefully youve come to the right place
and well actually be able to learn you a thing or two. In this next segment were going to learn about
some of the internals of an old inkjet printer and how to recycle it to serve our purposes.
The focus of this series is around setting up a small servo control lab or test bench so you can play with
a DC servo motor on a relatively safe and inexpensive mechanism before you move on to more risky
setups. That isnt to say that the mechanisms you work with here wont be useful in other ways. On the
contrary! Depending on what it is you want to do, these consumer-grade electromechanical marvels
may be just the ticket for some light weight applications.
So far Ive torn apart several inkjet printers and theyve all shared the same type of print-head
mechanism based on a small brushed DC motor and linear encoder, so just about any should do the
trick. For your reference, the following are the models that I can definitely say have the bits we need,
although some of the mechanical and electronic details may vary from model to model.

Epson Stylus C86


HP Deskjet F335 All-in-One
Lexmark X2470
Dell 810
HP psc 1350 All-in-One
Here Ill be detailing what I did with the Epson Stylus C86, but the principals should apply to just about
every other model out there.

Our Goals Where are we going today?


Basically our goals are three-fold:
1) Salvage a servo mechanism including brushed DC
motor, power transmission (in the form of a toothed belt
and its support hardware), the print head or load,
linear guides for the print head travel and encoder
device.
2) Remove as much of the extras in the printer as
possible while still leaving the above items intact. You
may or may not be removing things like the logic board,
power supply pinch rollers, print cartridges, other ribbon
cables and sensors.
3) Trace some signals so we can determine how to get
what we need out of the remaining electronics.

Motor, Gears and Rotary Encoder Wheel

Ill be focusing on the linear servo-mechanism that


moves the print head from side-to-side. Virtually all inkjet printers use this type of mechanism to move
the print head from side to side, however you may find some printers have a servo-driven paper feed
mechanism with a rotary encoder as well. This is even more straight-forward to integrate as you dont
have to worry about damaging the mechanism since theres no end-stop to jam against. Most of the
things I discuss here will apply to rotary mechanisms also, so you might want to start with a rotary
servo as its more forgiving than the linear print-head mechanism.

Voiding the Warranty Whats under the hood?


So the first step is to get into the beast. With the Epson C86 this was surprisingly quick and easy with a
minimum of tools as all the panels are snapped in place with retaining tabs. Use a flat-blade
screwdriver where needed to pop the tabs and remove panels. Other printers run the spectrum from
standard #2 Phillips screws to the slightly more esoteric T-10 Torx and Im sure theres someone whos
putting these together with security screws of one or two flavours.
Do what you need to to carefully disassemble the printer. Another thing I liked about the C86 is that
when you take the cosmetic panels off and have exposed the mechanism, all the working pieces are
still in place. With some of the others parts of the case are integral to the mechanism or its support, so
you may have to do varying degrees of disassembly, hacking and reassembly to reach the goals above.
There are all kinds of goodies in these things, so be sure to hold on to some of the bits for later
experimentation and hacks. Heres a sampling of some of the bits Ive held on to from three printers.
Youll see lots of springs, rollers (hard and soft), optical flag sensors, belt tensioners, stepper and DC
motors, connectors, buttons, LEDs, etc.
Stripping the mechanism Down to the essentials
In the case of the Epson C86, I stripped the printer of its exterior panels leaving just about everything

else in place. I removed the head-cleaning station as it would get in the way of the print head as I
wanted to control it, disconnected the DC and stepper
motors from the logic board and manually moved the
paper-feed mechanism so a head stop was retracted
allowing the print head to move freely. I left the power
supply in place so it could power up the encoder, but
thats just supreme laziness on my part as I didnt feel
like coming up with another 3.3VDC supply to power the
encoder reader.
Below are some pictures of the head-cleaner being
removed.

Bits and Pieces

If youre planning to try to reuse the logic board and/or


power supply for control or power functions then you
need to determine if they will still do what you want
without the printer behaving as expected.
For example: Most printers when theyre powered up will
do some kind of pre-determined actions to calibrate and
clean the print head. This involves moving the print head
from side to side at different speeds and distances along
its track. If the logic board commands the motor to move
and doesnt see it move its possible that it may just shut
itself down with an error code and disable power to
some of the sub-assemblies inside. In the case of the
C86 I turn on the printers power supply and after about
10 seconds during which its trying to move the
disconnected motor it then flashes two red LEDs in
protest. Fortunately thats the extent of it and Im able to
do everything I want with the mechanism with two red
LEDs happily blinking away.

Small Servo Motor

Signal tracing What does what? How


do I use it?
Ok so now that the butchery is done, lets have a look at
the pieces were going to be interfacing to. Namely, the
DC motor and the encoder reader.

Stepper Motor Driven Toothed Belt and Pulleys

The DC motor should be pretty obvious as its located


near one end of
the print heads
travel. It will have
the belt that
drives the print
head wrapped
around the
motors pulley.
Buttons and LEDs
Being a DC
motor it also has
two wires coming off of it most likely from the rear. These may be colour coded but not necessarily. If
theyre not, then youll have to mark the wires in some way that allows you to tell one from the other.
For now you dont have to worry about which is positive and negative as that will be a function of the

direction we want the motor to turn, and that will change constantly. The main thing is to be able to tell
the two wires apart. Trace the wires to the logic board where they should be attached with a connector.
You should be able to remove this connector from the logic board without too much difficulty. You may
need to cut the connector from the end of the wires to allow you to connect the motor to the H-bridge
motor driver when the time comes.
One thing I did while everything was still connected was hook up a multi-meter to the terminals on the
back of the motor and measure the peak voltage that was sent to the motor while the printer was doing
its power-up cycle. Depending on your multi-meter this may be tricky without a min/max function, but I
believe the Epson measured close to 35VDC during the high-speed moves. This isnt critical, but good
to give you an idea of what the designers intended. You probably can get away with 24, 18 or even
12VDC just fine with proportionally slower speeds.
Thats about all you need to know about the motor at this point, so on with the encoder reader. This can
be slightly tricky, but armed with a little knowledge you should be able to work it out without too much
trouble.
1) How do I supply power to the encoder reader?
2) At what voltage?
3) How do I get signals out of the encoder reader?
In order to do this its best to remove the encoder reader
from the print head so you can get full access to it. On
the Epson C86, the encoder reader is on the back of the
print head and so the head must be removed from its
guide rails. Be careful not to damage the clear plastic
encoders strip that runs through the reader. I remove the
encoder from the printer first just to be safe.
Once thats done, carefully examine the small circuit
board and locate the reader itself. Its usually black and
U shaped. The circuit board will probably have a few
support components on it which may help us figure out
Encoder Circuit Board
how to use it. You can see in my pictures, the reader is
connected back to the printer logic board by a white flat
cable. Im going to use this as-is to pass the signals back, I simply want to determine which conductors
on that cable are the ones Im interested in.
An encoder sensor is really very simple. It has an LED on one side (probably infrared) and two phototransistors on the other side. The LED shines its light through the encoder strip which has fine lines
etched on it. The photo-transistors are arranged the line width apart so that as the encoder
strip/wheel and sensor move relative to each other. The sensor outputs not only give an indication of
the movement but also the direction of movement.
The schematic below shows the basic components inside the encoder reader, and how it connects to
the outside world.

Youll want to get at the underside of the circuit board to access the leads of the sensor directly. The first
thing I look for is to identify the LED side of the device. This should be easy as the LED side of the
sensor will have two pins while the photo-transistor side will have 3 or 4 pins.
Following the traces from the LED you should be able to work your way back to the connector either
visually or using a DVM to test continuity. Youll probably find that theres a resistor in the circuit as
well, so note that in your schematic diagram (youre taking notes as you go right?) You should now be

able to identify two pins on the connector going back to the logic board. Now you can turn the printer
on, and measure the voltage at the connector noting the polarity to determine which pin is Vcc (~3.3V
5V) and which is GND. On the C86, I measured 3.2V. I could have built a custom power supply to drive
that, but the printers own power supply was doing a fine job so I just tucked the information away for
later reference. Chances are I could have driven that from a 5V supply directly without a problem, but it
might be necessary to change the current limiting resistor to match so you keep the current the same.
Now we can move on to finding the signals from the sensor output. Remember that I mentioned the
sensor will have 3 or 4 pins on its output side. Two of those pins will give us the signals we want. The
remaining one or two pins will be connected to GND and/or Vcc. Now that you know where those pins
are at the
connector, you
can trace those to
find the pin(s)
they attach to on
the output side.
The two pins you
have remaining
are the signal
pins youre
interested in.
Again, trace
these back to the
connector and
make note of
them as Phase
A and Phase
B. It doesnt
matter which is
which, but its
Encoder Schematic
important to
differentiate
between them.

Once weve identified


the power supply and
signal connections we
have to decide how to
connect to them. You
could solder directly to
the encoder board
and use a variety of
cable/wire types.
Encoder Circuit Board Component Side
Keep in mind
however that if the
encoder reader is in motion as it will be if you use the reader on the print head that youll have to factor
that in to your choice of wires/cabling and how its going to run. Ribbon cable may work very well if you
can isolate the flex from where its soldered to the board, otherwise the wires will break very quickly.
Since the problem of transmitting power and signals to/from the encoder reader has already been
solved by the designers I elected to use the flat flexible conductors already in place by tracing the

signals back to the logic board and tapping into them at convenient points there. Do what makes sense
for your situation. You can use a standard multimeter to trace the signals.
If you plan to power the encoder board from a seperate power supply, then dont forget to isolate it from
the rest of the logic board by cutting the traces on the circuit board or by other means. If as in my case
youre reusing the printer power supply for that purpose, then all you have to do is tap the 0Vdc
(common) and two signal traces for use with EMC2. Youll notice in the pictures below, Ive tapped four
signals. The black
wire is for 3.3Vdc
supplied from the
printer itself. I just
added this as I was
using 4-conductor
phone wire for the
purpose and thought it
might be useful down
the road, but Ive left it
disconnected at the
Encoder Circuit Board Solder Side
far end of the cable.

Logic Board and Flex Cables

Once youve managed to trace and tap into the signals as indicated,
you can reassemble and connect the circuit boards, print head,
encoder reader and encoder strip, motor and drive belt so everything is
ready to run though not yet connected to the PC or h-bridge driver.

Flex Cable Connectors

To test that youve tapped the right circuit traces, apply power either by turning the printer on of if you
chose to use an external supply, apply power as planned.
Now connect a multimeter (on DC Volt setting) with the negative lead connected to you 0Vdc and
positive lead to one of the two phases. If you have one an oscilloscope, you can use that instead.
Note the voltage read by the meter, then move the print head by hand. Youll see the voltage fluctuate.
When you stop moving the print head, it will settle either high (~5Vdc or ~3.3Vdc) or low (~0Vdc). Then
move the head again, and again when you stop it will settle either high or low. What the actual values
are isnt as important as the fact that the values change as you move the head. If you dont see the
value changing, then just gently tap the head with you finger either left or right, and see if you can get

the value to change.


Once youve proven that you have a changing
signal on the one phase, then you can move to
the 2nd phase and test it similarly. As an
experiment, Ive done up a quick video of the
testing just to illustrate the encoder testing.

Just as an aside, youll see in this photograph


some blue wires. I initially added these to tap
the signals for the on-board motor driver so I
could have gotten away without an external hbridge motor driver, but I found that many
Connectors
printers have proprietary motor drivers or at
least ones with custom part numbers which
make it more challenging to repurpose them and that would have been
an unnecessary obstacle to our goals here. I did manage to find a
schematic incorporating the Allegro A6628 as seen here, but this
doesnt seem to be and IC thats available to consumers so what we
learn will be of limited value. I may sometime in the future see what I
can do with it, but for now the blue wires are just soldered at one end
and abandoned in place.
Logic Board Back

Next Time
Now that we have a mechanism all prepped
and weve learned what we need to about the
electronics, in the next installment well hook it
all up to EMC2 and start the process of
integrating the electromechanicals with the
control system.
Tapped Signals

Logic Board Motor Driver

You might also like