Hi!
I have now built and tested a working prototype which should work with most IR phototransistors. My design is based on a SFH314FA IR-phototransistor becouse I just haeppened to have those in stock. It is very similar to SFH300. Biggest difference being integrated IR filter material. As a light source I used SFH485 IR-LED. Prototype seems to working very reliably. I manufactured one channell light curtain and connected the device to PC via printer port. I used SRM (Slot Race Manager) software to test the sensor. SRM is extremely reliable DOS based program and you can immediately see whether the sensor works or not. The tested prototype can be seen at the picture below.
The sensor needs some additional electronics in order to work properly. Complete circuit diagram can be seen at the picture below. This might be boring - but I will walk you through the design and tell you what each part does and what you should take into consideration when building this kind of device.
Transmitter
I have used SFH485 IR-led as a light source. Any similar IR emitter with correct wavelength should be fine. There are few things to consider. Maximum allowed current through this device is 100mA, but I do not recommend using such high currents with LEDs. Maximum current decreases lifetime of the component and you need higher power rating for the resistor also. I decided to keep the current at 20mA, this enables me to use a normal 470R/0.25W resistor as a current limitter. More current through LED means more light, but you have to buy bigger resistors that are able to handle the increased power. With near-max current the resistor should be something like 120R/1W. See the calculations below. Note that flat side of the LED marks cathode, in other words that side that is connected to ground (= minus pole of your 12V supply).
Darlington amplifier and sensor
SFH314 and SFH300 IR-transistors require amplification in order to work well. Someone mentioned earlier that darlington-phototransistors work very well. Those componets have built-in darlington circuit and are more sensitive for light. We can add darlington circuit for the SFH series phototransistors with a single BC547 transistor. BC547 amplifies the signal, but the signal is still analogue, not digital. Be sure to connect the transistor correctly. See the picture below. Note that the flat side of the SFH300/SFH314 marks the collector. BC547 pinout can be seen at the picture below. (e=emitter(with arrow at the schematic) c=collector b=base(middle part))
Level trigger
As mentioned above, the output signal from the darlington circuit is still analogue. You can try to use darlington output directly for triggering, but better idea is to transform the data into digital pulse with a level trigger. Level trigger circuit gives you an opportunity to add sensitivity adjustment for the sensor. This enhances the reliability of the sensor significantly. Level trigger is constructed by using an operational amplifier = OPAMP. It is useful to know how OPAMP works at simple level trigger (comparator) configuration. This is simple really. See picture below. 1. If the voltage at the OPAMP (-) input is higher than the voltage at the OPAMP (+) input, then the voltage at the output goes LOW. 2. If the voltage at the OPAMP (+) input is higher than the voltage at the OPAMP (-) input, then the voltage at the output goes HIGH.
Why all this trouble with comparator then? The signal coming out from the darlington circuit can have variation depending on ambient illumination, component tolerances, quality of the light source. With level trigger we can adjust the trigger level so that our sensor detects only the cars and is not disturbed by ambient lighting. Consult your local electronics dealer for a suitable OPAMP. Any OPAMP which is able to work as a single supply amplifier will work. Ask for a single device OPAMP in DIP8 case. Frequency or slew-rate parameters are not important. It may be advantageous if the device is marked to be "unity gain stable" - this means that the amplifier is less prone for oscillations. OPAMP has dedicated pins for power and ground, which have to be connected. Connect one 10uF capacitor between the amplifier power input(V+/VCC) and ground(V-/VDD) pins. I used EL2244 dual OPAMP device at my prototype, but I think it is no longer available.
Trig indicator + power LED
This circuit works as an indicator. LED has two functions. It is dimly illuminated constantly to indicate that the sensor has power. Whenever the sensor sees a car the led is fully illuminated. This indicator circuit makes it easy to trim the sensor. How to trim the sensor with this circuit? Cover the receiver (SFH300/314) and adjust the trimmer R3 at the level trigger circuit until the LED D2 is fully illuminated. Let the sensor to see the transmitter and make sure that LED intensity decreases.
Level shifter
PC printer port works with 5V and the sensor circuit with 12V. It is adviceable to provide the PC with 5V signal. Resistor R6 limits current and zener-diode D3 limits the voltage to 5V which is the safe level for PC. Zener diode circuit makes the LED illuminate dimly even though the transistor T3 is not switched on. With the prototype device I connected wire from level shift circuit to a PC printer port PIN 10. Ground of the sensor was connected to printer port PINS 18-19-20-21-22-23-24-25.
For a test program I used DOS based SRM. This sensor circuit seems to be working very well. Sensitivity can be adjusted for various light sources. Make sure that you align the transmitter (SFH485 or similar) with the receiver (SFH300/314) very well with each other.
I tried to keep things quite simple. The fact is that if you are going to use a simple sensor - you will have to build some kind of electronics to get proper signal. If you get more advanced sensor with internal amplification, you pay more for the sensor but can have more simplistic electronics.
Hope that this is useful for somebody, thank you and goodnight !
Cheers!
Julius