I'm having a tough time getting the sensors to see the lights reliably, though. The transistors just don't seem to be pulling down far enough (not saturating) to bring the sensor inputs to a "0" logic level. They're pulling it from 5V to about 3.5V or 3V. The phototransistors are supposed to be visible-light sensitive, but respond more to the red end, so swapping the white LEDs for red ones (10,000 mcd) helped but still not quite enough.
Is there something in how I'm hooking them up which might be an issue, or any way to make them more sensitive? What's working for others? Maybe shorten the tubes they're down in? Any suggestions are welcome.
I have the transistors hooked up like this:
Code: Select all
+5V
|
/
\ 10K
/
______|_______>to pic input pin
|/
|\
V
|
___
_
Code: Select all
+5V
|
/
--->\ 10K
|___/
|
/
\ 10K
/ |\
______|___| \o_____>to pic input pin
|/ | /
|\ |/
V
|
___
_