Im in the process of building a new lap timing&counting system for my slot car club. See http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286950257/3 for background if you are interested. Im a newbie around electronics, so please forgive me for any dumb questions or incorrect statements that Ive made.
The basics are a slotted photo interrupter which is mounted in each slot (4 lanes), which gets cut by the car's guide-flag just prior to the start / finish line. The arduino will be responsible for providing lap timing, and probably track power on/off. Laptime data will be sent a race control application on a PC via serial-usb. I havent quite decided on exactly which functions the Arduino and PC will control at this stage.
Anyway, at this point, Im building up a hardware test harness for proving the Arduino logic and PC s/w as I write it. I havent decided whether I will replace existing sensing hardware and logic boards at this point.
Below is the circuit I have set up for a single lane. This circuit will be duplicated 4 times, with different coloured LEDs as the lane colours are Blue, Red, Yellow, Green. Obviously with different R values.
Data Sheet for Photo Interrupter: http://www.jaycar.com.au/products_uploaded/ZD1901.pdf
As it sits, the logic Im getting at the digital input pin on the Arduino is what I want, which is HIGH when the PI is blocked, and LOW when non-blocked. The logic I am seeing is kind of strange to me, as I would have thought the logic would be opposite (PI = switch-closed when unblocked, which I would have thought would be HIGH?).
Anyway, my issue / question; I am presently getting the opposite logic to what I want on the indicator LED. When the PI is un-blocked (closed?), the LED is lit, and the LED is dark when the PI is blocked (open?). What I want is for the LED to light when a car's guide blocks the PI.
Ive spent several days researching in the forums, and on the web, but Im not yet conversant enough with the electronics side to figure out how to reverse the LED logic.
Hoping someone can help!! Rob.