PICAXE-based garage door sentinel
Many garage door controllers have an infrared beam to detect people or objects in the path of the door, preventing it from closing on them. This can be handy to prevent injury and property damage. The simple circuit shown here does the trick.
The garage door controller generally has a 24V DC output. REG1 generates a +5V rail from the incoming 24V and this powers an infrared LED. LED1 is a standard green LED connected in series, which indicates that the unit is active. Both LEDs are pulsed at 38kHz by NPN transistor Q1 which is driven from output P2 (pin 5) of IC1, a PICAXE08M2 microcontroller.
The modulation prevents other IR sources (eg, the sun or an incandescent lamp) from interfering with the circuit. A 47Ω resistor limits the current through LED1 and the infrared LED to around 40mA peak. The duty cycle is 50% so the average LED current is around 20mA.
IRD1 is a standard infrared remote control receiver and is placed on the opposite side of the garage door from the IR LED. It has internal circuitry to ignore any infrared signals without 38kHz modulation. Microcontroller IC1 senses its output level at input P3 (pin 4), which goes high when the beam is broken, triggering a software interrupt.
IC1 drives its output P0 (pin 7) high while the beam is not broken, ie, input P3 is low. This illuminates red LED2 and also turns on NPN transistor Q2, energising the 24V relay which signals to the garage door controller that it’s OK to close the door.
Should the beam be broken, after a short delay, pin 7 of IC1 goes low and the relay switches off, forcing the door to stay open. IC1 is programmed to ignore very short losses of signal to IRD1 as these may be caused by flying insects, electrical noise and so on. Diode D2 clamps the inductive spike from the relay coil when it switches off, while a 470Ω series resistor limits the current through LED2 to around 10mA.
IC1 also periodically drives the piezo buzzer connected to its P4 output (pin 3) if the beam is broken, resulting in a series of chirps. This helps you adjust the infrared LED/receiver alignment and provides an audible warning that the doorway is obstructed. If necessary, pushbutton S1 (connected to input P1, pin 6 of IC1) provides a manual override and pushing it allows the door to close within a 2-minute period, regardless of whether the beam is broken.
The infrared LED can be mounted in a small enclosure and linked to the main unit (on the other side of the garage) with 2-core cable. A small tube should be placed over IRD1 so that it doesn’t respond to reflected IR light (or it can be mounted well inside an enclosure with a small hole in the side).
Both the transmitter and receiver should be mounted on or near the door roller guides, positioned so the beam is unobstructed when the door is fully closed. They should ideally be mounted low enough to detect children walking through the door. The unit can operate with doors up to 10m wide but requires careful alignment.
The software, “garage door.bas”, is available for download from the SILICON CHIP website.
Erskine, WA. ($50)