I've recently taken apart a couple of inkjet printers, and in both cases the track that the "write-head" moves on was pretty self-contained. So now I have two nice motorized linear tracks, that pull a little carridge back and forth. The motors are not stepping motors, so determining linear position is done with encoders: Both tracks have neat 300lpi (or dpi) encoder strips and matching IR interrupters. (They also have rotatary encoder discs for the paper feed, but that's for later).
Of course, I'd like to hook the whole thing up to a board, a use it as a motorised dolly for a camera or something, or both together for a 2D plotter maybe.
But unfortunately I have no idea of how to hook up the IR interrupter. And worse still, I have hardly any clue of where to find information on that.
Here's what I know: Neither interrupter carries a manufacturers label. One is merely labelled "15 5113" and the other "3050 482". I've searched to the best of my ability, but no luck finding data sheets on either.
Both interrupters have 6 pins: 2 for the IR diode, and 4 for the sensor-side, as that's a quadrature output (i.e. 2 output pins, plus Vcc and gnd pins). Trouble is, I have no idea which is which. Is there some standard regarding what pin is what on such sensors?
Somewhere in one of the printers, I found an interrupter made by Agilent, but even with that, I couldn't find its specific data sheet, just something that came close in form factor and description. There, of course, I found a pin diagram, but I have no idea if the pins are organised the same way on the slightly-differently-numbered sensor I have. Even if that be the case, that doesn't tell me how the two "unknown" sensors are supposed to be hooked up, what voltage they require, etc.
So, any tips, advice, etc? I can supply a photo if need be
If the "known" and "mystery" interrupters have exactly the same footprint, the odds are good (but not guaranteed) they're compatible: even if no one comes up with an official standard, there's a tendency for manufacturers to make their parts match an unofficial one so they can compete for each other's customers.
You can probably work out the pins just by measuring the resistance to the power supplies: one should be connected directly to ground, one directly to Vcc, and the other two to Vcc through 5-10K or so resistors (pull-ups for the customary open-collector outputs).
Thanks for the tips, Ran!
The footprints are indeed the same for all the quadrature interrupters I've found (2 diode pins 1/10"/2.54mm apart, 4 sensor pins 1mm apart).
Still, there's some confusion on my part, but that may well be my own fault.
Unfortuantely, I'm unable to measure anything in its original setting, as both printers were broken when I got them. Now, they are even more so, as I've taken them apart (it's too fun to stop!).
But looking from the PCB, I've been able to (I think) determine the ground pin on the sensor - the one connected to the untraced part of the board (a couple of capcitors' cathodes connect there as well, so I pretty sure it's ground).
This matches the data sheet I found for the similar interrupter part. Furthermore, the IR diode's presumed Vcc (according to the data sheet) is connected in parallel to a sensor pin, matching the placement of the sensor's Vcc in the data sheet. Ok, common Vcc for LED and sensor, right?
But this is what confuses me a little: I would think that it'd be more appropriate for the sensor and LED to share common GND, since the LED requires a resistor as current limiter (I would imagine). Now there is such a resistor connected to LED, but it's connected to the (presumed) cathode...
so, well, here's a total newbie question - I am very new to electronics - can you place an LED series resistor behind the LED (i.e. between the LED and ground), instead of in front of it (between Vcc and LED)? If so, then the PCB makes perfect sense. Or would there be other some reason to have a series resistor "after" the LED?
If not, then nothing really makes sense to me, looking at the PCB (capacitors would seem reversed, etc).
Lastly, I can't locate any pull-up resistors for the presumed ouput pins, simply because the PCB and its ICs are too complex and the traces are impossibly small and hard to follow. They may be inside one of several large ICs or even inside the sensor package.
I think I'm going to test my assumptions later with 3.3V. At worst, I fry the part (well, I guess at the very worst, I somehow set fire to my apartment, but still...) and have to get another discarded printer. I'll report what happens - presuming I don't burn the house down.
can you place an LED series resistor behind the LED (i.e. between the LED and ground), instead of in front of it (between Vcc and LED)?
Yes: it doesn't matter where the resistor is. It's the difference between the anode and cathode voltages that matters. It can be, say, 5V to 3V, or 2V to ground, for a 2V LED.
I hooked up the interrupter to the arduino just now, using the sussed-out pin configuration and plotted the (analog) result in Processing.
And it worked.
I took a great deal of care to avoid frying the interrupter, so I ran it off 3.3V and added a voltage divider too, to be on the safe side. I started it out at just under 1.5V, and - using an IR-modded webcam - checked the brightness of the LED, and then bumped it up to ~2.5V. It can most likely handle 3V straight up if not more, but I just wanted to see something happen, not use output digitally.
Point is, the presumed pin configuration seems to be spot on. I've attached an image for future reference: