Build Your Own Arcade Controls Forum
Main => Main Forum => Topic started by: papaschtroumpf on November 15, 2003, 11:24:48 pm
-
Do you have an idea of how I can interface an optical switch (and LED/phototransistor pair) to a keywiz input?
My homemade mechanical coin/token switch broke and I'd like replace it with an optical sensor.
-
If its 5 volt you can get the poewr from the i-pac.
-
you mean the keywiz? Yes, I got email from RandyT telling me it was OK to power it from the keywiz 5V.
I guess what I'm really asking is how do I hook the phototransistor to get the desired effect. I mostly posted here because I thought RandyT was unavailable but he has since anwered my direct email.
I'll post back here if I get it working, but it's probably going to be a few ays until I get to it...
-
Isn't it just like a regular swith except it has a 3rd wire to connect to power? Same way you hook up a p360 joystick. I don't really know what switch you have so I'm just guessing here.
-
You should be able to do this. I've used optical switches with an I-PAC and it works just fine.
Wire the anode of the LED in series with a current limiting resistor to +5V and the cathode to GND. Then connect one side of the phototransistor to GND, and the other to the button input. Just be aware that an optical switch will be 'always on' when you don't have anything blocking the transistor from picking up the LED. I suppose you could use some type of inverter circuit to make the output 'always off' when the transistor isn't blocked, but I haven't experimented with that.
-
I've found the perfect solution: Optek OPB 490 series "11" (about $1.25 a piece at my local electronic store).
Those are "all in one" light switches with a slot in the middle. Anything that breaks the beam causes the "switch" to appear closed, so the inverting problem Oscar mentions is not an issue.
The switch includes its own built-in pull-up and amplification circuit for the output, so all you have to provide is a single resistor to limit the current in the LED.
Works great with my keywiz...