The circuit used here is almost insensitive to daylight or fluorescent light and therefore can be used outside. The transmitter (Figure 1) generates about 1000 times per second, for a period of 540 ms, a burst of 36 kHz. IC1 has been set with C1, R1 and R2 to a frequency of about 1000 Hz. The output of IC1 ensures that IC2 will oscillate about 1000 times per second for a period of about 540 ms. IC2 is set to a frequency of 36 kHz with C2, P1, R4 and R5. The output of IC2 drives the IR LED D1 via transistor T1. C3 and R3 prevent the reasonably high current through D1 from generating too much interference on the power supply rail.
The receiver (Figure 2) is quite a simple design, because IC3 already does a lot of the work for us. When the IC ‘sees’ an IR-signal with a frequency of 36 kHz, the output of IC3 will become ‘0’. The transmitter circuit alternates between sending an IR-signal of 36 kHz for 540 ms and is quiet for 470 ms. When this signal arrives at IC3, C4 will discharge via D2. Because the non-inverting input of IC4a is set to 2.5 V, with the aid of R10 and R11, the output of IC4a will be a ‘1’. In the intervening quiet periods of 470 ms, C4 will partially charge via R8, but this is not of sufficient duration to exceed the voltage of 2.5 V.
Only when the light barrier is interrupted will C4 charge far enough that the output of IC4a will toggle and become a ‘0’. Because IC4a has an open-collector output, C5 will be immediately discharged and the output of IC4b will become a ‘1’. With R9 and C5 this signal is stretched to about one second. If you increase the value of R9 to 100 k?, then this will become about 10 seconds. R12 and R13 are included to prevent chatter of the output around the trigger point, although there is not really a risk of that happening in this circuit. Together with R14, the output of IC4b delivers a clean logic signal that we can use for further processing.
The quickest way of calibrating the frequency of IC2 to 36 kHz, using P1, is with the aid of an oscilloscope. If you do not have one of those, then point the IR-LED D1 at the receiver IC3 and turn P1 so that the voltage on the inverting input of IC4a is as low as possible. Make sure that IC3 during the calibration does not receive too high a signal by placing the IR-LED a considerable distance away or by not pointing directly at the receiver. If this procedure is not that successful then just set P1 to the center position, this works just fine usually. You should not have a problem with ambient light with this circuit. If you do have a problem because, for example, there is direct sunlight on IC3, then you will need to place it inside a small tube and point it at the IR LED.
In this way no direct sunlight can reach the receiver. If the IR LED and the receiver are placed too close together it is possible that the receiver will sense light reflected off the walls, even when someone is standing between the transmitter and receiver. In this case the solution is also a short piece of tube for both the transmit LED as well as the receiver (Figure 3). Make sure that the tubes are opaque (paint black or use water pipe, for example). The wires to the IR LED can be several meters long without any problems. Do not place the receiver IC too far from the circuit.
No comments:
Post a Comment