Most have part numbers like Q9874 and Q9864, the HP logo, and the part has 4
leads, a lens, etc.
Is this a quadrature detector/direction decoder or just simply a
photo-interrupter? I can't seem to find a data sheet or any other info on
this part. If it is a quadrature direction decoder, I would like to know,
'cause I have a project where I would like to use it.
I have also aquired a couple of HP printers with the very same sensors.
One (Q9864) is used for the striped strip running behind the print-head
for position sensing, while the other (Q9845) is used in a similar
for a similarly encoded disk to gauge the paper position by the
of the rollers. I intend to use them for positioning in a CAD system,
and have also been looking for datasheets without success.
I have decided that I will figure them out datasheet or not, as they're
too useful looking to be sat around doing nothing! I'll happily tell
what I learn if your still looking for information when I've done some
fiddling about with the oscilloscope. So far I've only had a visual
inspection of the components and contemplated their use. I'm fairly
sure of the power connections from this first investigation, but can
guess at the function of the other two pins! I'd like to think one
for left movement and the other for right... but that may be too much
hope! Perhaps it's more along the lines of the sensor system in a
mouse, where extra circuitry is required to decode direction from the
order of the beam interruption.
I have to show my ignorance and admit I have no idea what a
'quadrature' direction decoder is :) But I assume it's effectively a
that provides ready-decoded left and right outputs. Or perhaps it has
some bearing on sensitivity??
so far what I have is:
| | 1: -ve
| | 2: ?
| | 3: +ve
---------- --------- 4: ?
| | | |
1 2 3 4
Not sure of the voltage, but I'd guess 5v *crosses fingers*
Please let me know if you've got more information than this!
> I have to show my ignorance and admit I have no idea what a
> 'quadrature' direction decoder is :) But I assume it's effectively a
> that provides ready-decoded left and right outputs.
You got it. It's not entirely ready as a simple one-bit flag might be for
direction, but that's what it does. Not sure about this actual part, but it
probably is one. Two sensors, placed so that slots making a 50% duty cycle
will place a leading edge on one sensor when the second sensor is still 25%
behind, hence quadrature, a phase shift of a quarter cycle. A circuit can
test which sensor is trailing, regardless of speed, and get direction from
It could well be one of those, but the strip passing between the source
and the sensor is encoded somewhere in the order of 1/4 to 1/2 mm, so
it would need some fairly fancy optics within... The sensor is simply a
chunk of silicon around 3mm square under a protective plastic cover.
Looking at it now, it seems to me the only way it could possibly be a
reliable component is if the source is a laser-diode, and the strip
acts as a diffraction-grating, effectively being magnified by the
formation of interference fringes that can be readily detected when
they fall and move across the sensor. This would also mean there's a
possibility that the intervals the sensor can detect would be smaller
than those on the strip - but now I'm really just guessing :)
Without seeing it I can't say for sure, but two things to think about:
1. The sensors don't have to be at 0.25mm apart to read this
regular pattern, they could be 1.25, 2.25, so long as that fraction is
2. If you look at a cheap ball-type mouse you'll see slotted wheels that
are that finely spaced, it's not expensive tech now.
Usually the sensor surface will have two tiny slots in it. If yours really
is a single window, it might be something different. Maybe a two-element
detector that sees the shadow passing between two halves, determining
direction that way.
I also studied the sensor surface under the magnifying lens, and it
appears to be made up of many sensors on the same axis as the encoded
strip. suggesting it may well be more advanced than simply a
two-element sensor. Certainly there are not two slots on it's surface.
Cheers for the thoughts, you're pushing me closer to digging out a PSU
and firing up the ol' valve-oscilloscope to do some probing of a more
Any motivation to use an oscilloscope is good motivation. :)
That sensor is interesting me a lot now, if it has several sensors built
in. It's possible they depend on equal spacing to make the same detection
as each other, in a way to reduce noise by taking a mean average or
something. Also, I don't know if the light has to be coherent, it might be
enough to be very narrow bandwidth. Some LED's are almost monochromatic, I
had a few from Hewlett Packard that were like that. Coherence can bring
troubles of its own, mainly speckle, which dramatically increases noise.
Strip Direction:1->2->3->4. 2 is 90 degrees before 4
The outputs appear to be TTL compatible (I have hooked them up to the
pushbutton circuit to a little micro for pulse counting through a
74LS148), and the device hasn't burned out on 5v :) I've also rigged up
the vernier caliper with the strip running through the device. Due to
my setup, I only have 1cm translation in which to measure pulses, but
after moving back and fourth 4 times through 4 cm, I've clocked up 237
pulses. This works out to around 0.17 mm per pulse, and a 50/50 duty
judging from the oscilloscope readout. The quadrature output seems to
push the accuracy to under 0.1mm... I like these parts, they have
I'd overlooked speckle... though I'm not sure of it's impact were there
a narrow enough beam of light emmitted... Cretainly it appears to be
general illumination in the near-infrared that is emitting from the
source, and not a beam, which would fit in with it being relatively
monochromatic as opposed to coherent. Were it coherent, I'd have
expected the sensor to be yet more sensitive :)
Looks like I've got enough information to use the sensor myself now -
hope it's useful to others cannibalising HP inkjets!
And just to ensure my pinout is useful, here it is again (even though
it'll be all out of alignment when it's posted):
| -> | Phase1 leads Phase2 90deg
| <- | Phase2 leads Phase1 90deg
| | | |
1 2 3 4
> I've had the sensor hooked up to 5v. Get a pretty, dull red glow from
> the source, and pins 2 and 4 are indeed quadrature outputs almost
> exactly 90 degrees out of phase (judging from the poor trace on my
> valve oscilloscope). Direction encoded like so:
> Strip Direction:1->2->3->4. 2 is 90 degrees before 4
> The outputs appear to be TTL compatible (I have hooked them up to the
> pushbutton circuit to a little micro for pulse counting through a
> 74LS148), and the device hasn't burned out on 5v :) I've also rigged up
> the vernier caliper with the strip running through the device. Due to
> my setup, I only have 1cm translation in which to measure pulses, but
> after moving back and fourth 4 times through 4 cm, I've clocked up 237
> pulses. This works out to around 0.17 mm per pulse, and a 50/50 duty
> judging from the oscilloscope readout. The quadrature output seems to
> push the accuracy to under 0.1mm... I like these parts, they have
> potential :)
Nice, basic part, a good module to have. It rules out the more complex
business of handling analog differences, as you say it's already close to
TTL level switching.
> I'd overlooked speckle... though I'm not sure of it's impact were there
> a narrow enough beam of light emmitted... Cretainly it appears to be
> general illumination in the near-infrared that is emitting from the
> source, and not a beam, which would fit in with it being relatively
> monochromatic as opposed to coherent. Were it coherent, I'd have
> expected the sensor to be yet more sensitive :)
Coherence would have been a real problem I think, not a benefit. The
narrower the beam, the worse it gets. If you have a focussable laser
module, try focussing to a pinpoint at two feet, then drawing the spot
across a white wall, or even a fine white ceramic to show how even the
finest surfaces make huge noise. The jumps in apparent brightness will be
fierce, far worse than if you spread the light in a 3mm spot and try the
> Looks like I've got enough information to use the sensor myself now -
> hope it's useful to others cannibalising HP inkjets!
> And just to ensure my pinout is useful, here it is again (even though
> it'll be all out of alignment when it's posted):
> Top View
> | -> | Phase1 leads Phase2 90deg
> | <- | Phase2 leads Phase1 90deg
> _____| |_____
> | | | |
> 1 2 3 4
> 1: GND
> 2: Phase1
> 3: +5v
> 4: Phase2
I recognise it now, I've seen them in various boards I've salvaged in the
past. Some have the sensors on one side, as in this case, others have a
slot between two projections to work by transmission instead of relection,
and I think most have the same 4 wire connecting plan.
The only versions of these sensors I've seen before the inkjets were
the same style as those in ball-mice, with two clearly visible slits
and one light emitter. These ones are far snazzier than any of the
others in my collection! Also, these are the first I've had that are so
friendly they even save you the trouble of a couple of transistors and
schmidtt triggers to convert to TTL :)
I think that's all there is to say about this little device now, except
mebbe 'I want more of them' :) Thanks for all the motivation to stop me
being a lazy arse, and actually bother to figure it out! I'm awfully
pleased - it's just the thing I wanted for a CAD Milling machine. Now I
just have to build the milling machine... heh
> Thanks for all the motivation to stop me
> being a lazy arse, and actually bother to figure it out!
It keeps me going too. Got to draw on anything I can to motivate me, on
some things... I'm trying to re-aqquaint myself with some trigonometry to
rotate an array of points. Interesting distractions are as helpful as
trying to focus, and definitely more fun.