InfraRed Detector (PIC12F629)

16,407

InfraRed Detector (PIC12F629)
InfraRed Detector (PIC12F629)

This unit uses one TSAL6100 IR/LED emitter from Digi-Key. This IR diode has a narrow (10 degree) radiation pattern at 940 NM. It is driven via 2n2904 transistor for maximum current pulses. The detector is a Vishay TSOP4838 38Khz integrated receiver module. The 38Khz signal for the emitter is generated in software. Here is the idea: Send out a 38Khz IR signal and look for its reflection off a nearby object. Both the emitter and detector are optically and electrically isolated from each other to minimize self actuation. Additionally, the pulses are sent out only at certain intervals and the PIC only looks for the signal at the end of the output burst. More: This device is demonstrably immune to most stray activation. It has a 25% greater range at night than in full sunlight. The entire unit is housed in a standard low-profile single outlet electrical box with a blank faceplate drilled out for the emitter and detector. The designation of this device is 'G1'. It responds to the following commands. /G1Pn - Set pulse count for IR transmission. /G1R - Read pulse count setting. /G1V - Return version number. The number of pulses generated on each 38Khz burst is adjustable. Setting the pulse count to 7 provides the minimum sensitivity and anything over 15 is the maximum. This unit automatically transmits code '/C1G1<cr>' over the network to the Clock/Console device (C1) indicating the detection of an object (by G1) within its range (8-10 feet). Note that the emitter and detector are optically isolated using heat shrink tubing.

The described unit employs a TSAL6100 infrared LED emitter, which operates at a wavelength of 940 nm and features a narrow radiation pattern of 10 degrees. This emitter is driven by a 2N2904 NPN transistor, which allows for the generation of high current pulses necessary for effective infrared transmission. The output from the transistor can be controlled via a microcontroller, typically a PIC, which manages the timing and pulse width of the emitted IR signal.

The receiving end of the system utilizes a Vishay TSOP4838, a 38 kHz integrated infrared receiver module. This module is designed to detect modulated IR signals at the specified frequency, providing a robust means of object detection by identifying reflections from nearby surfaces. The microcontroller generates the 38 kHz signal in software, enabling precise control over the transmission parameters.

To enhance reliability and minimize interference, both the emitter and detector are optically and electrically isolated. This isolation is achieved using heat shrink tubing, which prevents stray light from affecting the detector and ensures that the system operates only in response to the intended IR signal. The pulses are transmitted at specific intervals, with the microcontroller set to listen for incoming signals only after each transmission burst, further reducing the likelihood of false activations.

The device is capable of adjusting the number of pulses sent during each transmission cycle. Users can configure the pulse count using the command `/G1Pn`, which allows settings from a minimum of 7 pulses for low sensitivity to a maximum of over 15 pulses for heightened sensitivity. The device can report its configuration settings through the command `/G1R` and its firmware version with `/G1V`.

The operational range of the unit extends from 8 to 10 feet, with performance notably improved in low-light conditions, achieving a 25% greater range at night compared to daylight operation. The entire assembly is housed within a standard low-profile electrical box, featuring a blank faceplate that has been modified to accommodate the emitter and detector, ensuring a tidy and unobtrusive installation.

Upon detecting an object, the unit automatically transmits a code (`/C1G1<cr>`) to a connected Clock/Console device, effectively communicating its detection status over the network. This functionality allows for seamless integration into broader systems, enhancing the versatility and utility of the device in various applications.This unit uses one TSAL6100 IR/LED emitter from Digi-Key. This IR diode has a narrow (10 degree) radiation pattern at 940 NM. It is driven via 2n2904 transistor for maximum current pulses. The detector is a Vishay TSOP4838 38Khz integrated receiver module. The 38Khz signal for the emitter is generated in software. Here is the idea: Send out a 38Khz IR signal and look for its reflection off a nearby object. Both the emitter and detector are optically and electrically isolated from each other to minimize self actuation. Additionally, the pulses are sent out only at certain intervals and the PIC only looks for the signal at the end of the output burst.

This device is demonstrably immune to most stray activation. It has a 25% greater range at night than in full sunlight. The entire unit is housed in a standard low-profile single outlet electrical box with a blank faceplate drilled out for the emitter and detector. The designation of this device is 'G1'. It responds to the following commands. /G1Pn - Set pulse count for IR transmission. /G1R - Read pulse count setting. /G1V - Return version number. The number of pulses generated on each 38Khz burst is adjustable. Setting the pulse count to 7 provides the minimum sensitivity and anything over 15 is the maximum. This unit automatically transmits code '/C1G1' over the network to the Clock/Console device (C1) indicating the detection of an object (by G1) within its range (8-10 feet).

Note that the emitter and detector are optically isolated using heat shrink tubing. 🔗 External reference