Monday, October 20, 2008

useful bits

useful bits
useful bits,
originally uploaded by jak.
finally started tearing into the ink jet pile looking for useful parts and working on examples for the class. The first victim was a fancy HP all-in-one model. It consisted of a scanner and color printer and had sd and flash card sockets built in.It turned out to be extremely easy to tear apart. There was exactly one size of torx screw involved and only about 15 of them used. The rest is just intricate plastic snap together, which obviously means snap apart as well. I had to exercise some caution in not breaking the little tabs to make sure I would be able to reuse some of the connecting parts.

The main goals were to strip out the paper feed mechanism with its associated rotary encoding wheel and optical encoder, and get down to the linear print head driver with its position sensor/encoder strip. Along the way I also uncovered a small motor and encoder wheel in the ink waste tray, and the stepper motor for the scanner head. this last was especially nice as it came out with its gears, belt drive, and linear bearing axle in one unit. I took some not very useful pictures to document the teardown:

I already have the paper feed motor running off the Adafruit motor shield and am working on how to connect the quadrature encoder to measure angle and direction of motion. The encoder device itself is dead simple to use as it is on its own little breakout board and only requires 4 wires +, GND, and two channels of signal (so only 2 i/o pins on the arduino). The challenge I am facing is figuring out which pins are used by the motor shield, and if they are the ones that support the interrupt(s) I need to manage the encoder. I will post more pics and code as I get that worked out. If I am successful (fingers crossed) then the same should be usable for the linear mechanism of the print head. In the end I hope to have a general purpose set up for reusing printer internals.

I also took apart an old lexmark printer and it had a very simple stepper controlled print head. The Motor shield really shines here as it took me all of five minutes to get the stripped down print head shuttling back and forth with microstepped accuracy and smoothness. I took a little video (not much plot, but there ya go).


Dave said...

I wonder if you could direct me to more information about the stepper control systems you used.

I ask because I'm curious about the sophistication of those routines. I spent some time reading about the fairly sophisticated stepper control techniques used by the GeckoDrive controllers and I'm interested in perhaps doing some experimenting with them in an Arduino environment.

Josh Kopel said...


The stepper is running on an motor shield from (Limor Fried's store) and uses a driver library she wrote.

You can download her code from here

Nice blog BTW, I like the programmatic CNC control stuff.

Evan said...

Hi Josh,

I am trying to get my canon shell to do simply what you have it doing here (going back and forth) but i can't even get a click. I think my problem is that I don't have the right external power source going into my motor sheild, do you mind telling me what type of power you used for the motor? it kind of looks like you just powered it directly from the arduino but i can't tell . . .

thanks, Evan

Josh Kopel said...

@evan the choices are kind of confusing. I messed around with a few options, but I think I was powering the motor using an wall wart (12V I think) connected through the motor shield. The Arduino was running of USB power. The Adafruit site is your best reference for hookup info.

There is a pretty clear explanation of the options here

Good luck and let me know what you come up with!

Evan said...

Hey josh,
thanks for the feedback, I got the motor to work, thanks! My next question is I want to try what you did with your encoder and the dc motor, I've got your code and everything, but where and how did you attach the pins to the shield? It looks like you just soldered them on top, is that what you did? on top of 2 and 3?