First Day[edit | edit source]
Goal is to take apart a inkjet printer and get the head positioning system working outside the printer.
Reading this article. Web page 6 and 7 have the best information on the Encoder.
Found this picture of module out of HP DeskJet 660C made in 1995 after searching for Encoder H9720.
Video of what needs to be done.
Second Day[edit | edit source]
Found this datasheet on it!
Third Day[edit | edit source]
First soldered cat5 cable to print head. Assumed ground was on the left, looking at print head from the back and in the pictures. So the cable was wired as follows:
- mostly white/blue to ground (pin 1 ... counting left to right)
- mostly white/green to data A (pin 2)
- mostly blue/white to 5 volts (pin 3)
- mostly green/white to data B (pin 4)
Then hooked up Arduino, started blink program, attached power to the arduino, attached encoder power to arduino. Arduino kept blinking, so power was not going to be a problem. Then measured Data A and Data B with voltmeter. Expected to see 5 volts or nothing. Nothing was 20-30 mv. Saw 5 volts on either A or B depending upon where stopped print head when physically moving it. Did see ground on both data pins. Did see 5 volts on either A or B, but not both at the same time, but did not try to hard to see 5 volts on both.
Then hooked up the arduino button example in the digital examples. It assumes a button is attached to digital pin 2 and turns the led attached to pin 13 on when ever the button is pushed. I could get the pin 13 LED to flicker by moving the print head around while one of the green wires was plugged into digital pin 2.
Then modified the button so that it counted (video) the number of shadows. Used the serial monitor to increment the count every time a shadow passed. As expected, the count increased as I moved the print head back and forth. Sometimes I stopped the print head while on a shadow and it kept counting. Sometimes I stopped it on non-shadow and it stopped counting.
The next step is to improve the counting program so that it reads both outputs, determines if there is motion, determines the direction of the motion and then increments or decrements the counter appropriately. Then the total number of shadows could be counted and then print head always started in a certain position.
Next hooked the motor that moves the printhead to the arduino motor shield. And then ran the example/motorshield/motorParty program. This video shows that it is making a loud noise, don't know why yet. The next step would be cut out the stepper motor part of the motorparty program and then begin fiddling with the speed. Then combine with the counting of the program above to control the print head movement.
Could perhaps hook up to the pendulum and simulate pendulum movement for the putt putt golf green.