13 June 2010

Dealing with a scavenged P1241 / P1242 optical switch

The general historical considerations will have to wait.

As of lately, we have been feeding on a steady diet of computer carrion, and especially used printers. Actually, I have found that, for a 6 year old, methodically dismantling a printer is a quite powerful incentive to concentrate on something other than TV, pokemons or whatever is fashionable in the sinister gloom of schoolyards. So I make sure the pipeline of stuff-to-dismantle stays filled.

Printers -the older, the better- do yield many useful components. Among them, stepper motors, cabling, springs, steel rods, and several opto-switches.

Early Epson impact and inkjet printers feature fine stuff. The more recent the printer, the less decent components you may expect. The nadir of this trend might have been reached with recent HP inkjets, all DC motors combined with linear encoders on a flimsy thin strip, and no fun.

But at the very least the HP's left us with several "slotted optical switches", labeled P1241 C5 88 (or P1242). Useful to make our own brand of opto-endstops and taking over the world schemes. If only we had some data on them.

This lad must have an IR diode in one side, a phototransistor on the other, and three identical wires coming out of it.
We can guess: +VCC (presumably 5V), GND and DETECT.
So we did some conduction testing with the multimeter. Only one combination conduces. Let us label the wires: +VCC for the one connected to the multimeter's red wire, and GND for the other.
The remaining wire must be DETECT.

We attempt some connexions. After some trial-and-error with the resistance values and a fried opto-switch, we settled on this one:

R2 is a current-limiting resistor (1/4 W). 1 K works OK!
R1 is a pull-up resistor, 100K is more than enough. We found this stabilizes the signal.

The opto-switch's outputs:

No slot obstruction = 0v (+/- 0.2V)
Close = 9V

Why 9v? if only we had the data sheet... But ok, it works.

(BTW: anyone got a better idea?)

Let us fetch that Arduino!

11 June 2010

In the beginning...

This all started some months ago as a personal quest for the state of the art of learning about computing for adults as well as for a 6 year old, given the dysfunctional and obsolete nature of the "official" education channels.

The general assumption is that this is not happening in any particular place or time, but everywhere.

Feeling that the time has come to retrace some findings, highlights and milestones in the path we took.