Silicon ChipBuild An Infrared Sentry - April 1999 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Solar cells becoming ever more efficient
  4. Feature: Autopilots For Radio-Controlled Model Aircraft by Bob Young
  5. Feature: Getting Started With Linux; Pt.2 by Bob Dyball
  6. Serviceman's Log: The day my multimeter lied to me by The TV Serviceman
  7. Project: High-Power Electric Fence Controller by John Clarke
  8. Project: The Bass Cube Subwoofer by Julian Edgar
  9. Feature: SPECIAL OFFER: Low-Cost Internet Access by SILICON CHIP
  10. Product Showcase
  11. Project: Programmable Thermostat/Thermometer by Keith Rippon
  12. Back Issues
  13. Order Form
  14. Project: Build An Infrared Sentry by Branco Justic & Ross Tester
  15. Feature: Electric Lighting; Pt.13 by Julian Edgar
  16. Vintage Radio: Wow! My first vintage radio by Rodney Champness
  17. Project: A Rev Limiter For Cars by John Clarke
  18. Notes & Errata: LED Fun
  19. Market Centre
  20. Advertising Index
  21. Book Store
  22. Outer Back Cover

This is only a preview of the April 1999 issue of Silicon Chip.

You can view 34 of the 96 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • Radio Control (November 1996)
  • Radio Control (February 1997)
  • Radio Control (March 1997)
  • Radio Control (May 1997)
  • Radio Control (June 1997)
  • Radio Control (July 1997)
  • Radio Control (November 1997)
  • Radio Control (December 1997)
  • Autopilots For Radio-Controlled Model Aircraft (April 1999)
  • Model Plane Flies The Atlantic (May 1999)
  • Tiny, Tiny Spy Planes (July 1999)
  • 2.4GHz DSS Radio Control Systems (February 2009)
  • Unmanned Aerial Vehicles: An Australian Perspective (June 2010)
  • RPAs: Designing, Building & Using Them For Business (August 2012)
  • Multi-Rotor Helicopters (August 2012)
  • Flying The Parrot AR Drone 2 Quadcopter (August 2012)
  • Electric Remotely Piloted Aircraft . . . With Wings (October 2012)
Articles in this series:
  • Getting Started With Linux; Pt.1 (March 1999)
  • Getting Started With Linux; Pt.2 (April 1999)
  • Getting Started With Linux; Pt.3 (May 1999)
  • Getting Started With Linux; Pt.4 (June 1999)
Items relevant to "High-Power Electric Fence Controller":
  • High-Power Electric Fence Controller PCB pattern (PDF download) [11303991] (Free)
  • High-Power Electric Fence Controller panel artwork (PDF download) (Free)
Items relevant to "Programmable Thermostat/Thermometer":
  • Programmable Themometer/Thermostat PCB pattern (PDF download) [07504991] (Free)
Articles in this series:
  • Understanding Electric Lighting; Pt.1 (November 1997)
  • Understanding Electric Lighting; Pt.2 (December 1997)
  • Understanding Electric Lighting; Pt.3 (January 1998)
  • Understanding Electric Lighting; Pt.4 (February 1998)
  • Understanding Electric Lighting; Pt.5 (March 1998)
  • Understanding Electric Lighting; Pt.6 (April 1998)
  • Understanding Electric Lighting; Pt.7 (June 1998)
  • Understanding Electric Lighting; Pt.8 (July 1998)
  • Electric Lighting; Pt.9 (November 1998)
  • Electric Lighting; Pt.10 (January 1999)
  • Electric Lighting; Pt.11 (February 1999)
  • Electric Lighting; Pt.12 (March 1999)
  • Electric Lighting; Pt.13 (April 1999)
  • Electric Lighting, Pt.14 (August 1999)
  • Electric Lighting; Pt.15 (November 1999)
  • Electric Lighting; Pt.16 (December 1999)
Items relevant to "A Rev Limiter For Cars":
  • Rev Limiter PCB patterns (PDF download) [05304991/05412981] (Free)
  • Rev Limiter panel artwork (PDF download) (Free)

Purchase a printed copy of this issue for $10.00.

Infrared Sentry If you have a doorway, passageway, window or pathway – up to 25 metres wide or even more – this nifty little project will stand guard for you. If anyone dares intrude on its domain it will scream long and loud! There are many situations where we would like to be warned if anyone is present. Immediately, of course, we think of security applications – intruder alarms, for example. We really do need to know if someone has entered an area where they shouldn’t be. Some form of detection and warning is vital. But there are other uses for a detection system, not necessarily used in anger! The classic shop door buzzer is a good example – if the shopkeeper is busy or in the back office, he or she might not notice a customer entering. Customers don’t like being kept waiting . . . and then there are those who might not be paying customers at all, 66  Silicon Chip just waiting for an unattended counter. Closer to home, you might like to know if visitors are coming towards your door long before they ring the door bell. Advance warning will give you the chance to quickly tidy the room or perhaps turn the music down so they’ll go away! There are many other applications but we’re sure you get the picture. Having said all that, how are we going to detect these intruders/customers/visitors/salesmen/etc? We could use a passive infrared Design by Branco Justic Article by Ross Tester de-tector or microwave sensor. While very effective, they are not particularly easy to camouflage and most really aren’t suitable for outside use. Not only that, they are relatively expensive Under-carpet pressure mats have been used for many years but these have fallen out of favour, again mainly due to cost but also because of their propensity to be damaged, even under carpet (stiletto heels were a real killer – literally – for pressure mats!) How about that good ol’ shop door buzzer we mentioned earlier? Well, until now we probably would have dismissed this idea as well, because of the rather high cost of such units. But now there’s a build-it-yourself alternative which is not only low in cost, it’s rather more versatile than the traditional light beam detector. Most of the light beam detectors we’ve seen have used a transmitter and receiver housed in one unit, with the light beam leaving the transmitter, hitting a reflector and bouncing back to the receiver. While effective, range was somewhat curtailed by the fact that the light had to travel twice the distance. This new design uses a separate transmitter and receiver, both housed in small (82 x 53 x 30mm) jiffy boxes. The prototypes also had universal mounting brackets attached to the boxes but these could be regarded as optional – mounting suits the application. The circuits While the circuit diagram of Fig.1 is shown as a complete system (transmitter and receiver) it really is two independent components and we will discuss it that way, starting with the transmitter. The heart of the transmitter is an infrared light emitting diode, IRLED1. Unlike a conventional LED, this produces no visible light when forward biased. Therefore there is nothing intruders can do to tell that there is a beam of infrared light across their path. As a matter of interest, the old smoke-across-the-beam trick you often see in spy movies and the like simply doesn’t work with infrared light – unless, of course, there is an element of visible light (usually red ‘cause it looks good on the screen) also in the beam. There is no visible light at all from this IR LED. The infrared LED cannot be constantly turned on otherwise the detector in the receiver would not work. It is pulsed at about 38kHz. IC1a and IC1b (two of the gates from a 4093 quad 2-input Schmitt NAND gate) and their associated comThe transmitter PC board is tiny – this ponents form an oscillator at component layout and photograph will help about 38kHz. You may wonder you assemble it. why two resistors (R2 & R3) are specified: these set the oscillator this resistor to 22Ω should increase frequency and R3 allows tweaking if the range to more than 25 metres. required. In practice, the system is There is a trade-off, though, in quite forgiving and adjustment is not gaining extra range in this manner: a needed. Still, it can be done. transmitter power significantly greater You will also note another oscilla- than that required for operation over tor formed by R1, C1 and IC1d. This the range required may cause the beam one runs at about 400Hz (again, not to be reflected around the room from critical) and this “data stream” is im- other objects. It is possible that more pressed on the 38kHz “carrier” by the than one beam path is formed and the fourth gate in the chip, IC1c. receiver may then not respond when the required beam is cut. Zener diode ZD2, transistor Q1 and associated components form a There are other simple ways to switch­ ed constant current source increase range – much more dramatwhich feeds the infrared LED, IRLED1. ically – which we will discuss shortly. Therefore the LED is pulsing at 38kHz Hang on a second! Why would you modulated by 400Hz – which, of want a range to 25 metres or more course, you cannot see unless your anyway? That’s one big window or eyesight is the same as some birds! doorway . . . The peak current through the LED, The reason is that this project can set by R7, determines the range of the also be used as a perimeter alarm. With overall system. three small mirrors to reflect the beam As supplied, with a value of 47Ω, 90°, you could go right around the the range is about 17 metres. Reducing wall of a small warehouse, storeroom, Fig.1: both the transmitter and receiver are shown in this combined circuit diagram. The optional piezo buzzer is not shown here but if used, simply connects to +12V and GND via the relay contacts. April 1999  67 Fig.2: use this PC board layout diagram in conjunction with the photograph above to help assemble the receiver PC board. Parts List TRANSMITTER 1 PC board, 30 x 47mm* 1 plastic case, 82 x 53 x 30mm 1 swivel bracket 1 14-pin DIL IC socket Semiconductors 1 infrared LED 1 4093 quad 2-input Schmitt   NAND gate 1 C8550 PNP signal transistor 1 4.7V 400mW zener diode Resistors (5% 0.25W) 2 47kΩ 1 6.8kΩ 1 3.9kΩ 1 1kΩ 1 47Ω Capacitors 1 100µF PC electrolytic 1 0.1µF polyester 1 .001µF polyester RECEIVER 1 PC board, 52 x 47mm* 1 plastic case, 82 x 53 x 30mm 1 swivel bracket 1 infrared receiver module 1 12V PC relay, SPDT 1 12V piezo buzzer­­(optional) Semiconductors 1 C8050 NPN signal transistor 1 C8550 PNP signal transistor 1 5.6V 400mW zener diode 1 GIG power diode 2 1N60 signal diodes 1 red LED Resistors (5% 0.25W) 1 47kΩ 3 6.8kΩ 2 470Ω Capacitors 2 100µF 16VW PC electrolytic 3 10µF 16VW PC electrolytic * supplied as one board 68  Silicon Chip office, etc to catch anyone breaking in any window or door, or even through the wall itself! The receiver Just as the heart of the transmitter is one dedicated component, so the heart of the receiver is RX1, a dedicated infrared receiver module. This module has just three connections – two for power and an output. While ever a valid infrared signal (ie, 38kHz) is being received, the output voltage remains low. Transistor Q2, therefore, conducts. However, it’s not just the 38kHz signal that’s being received – the 38kHz is modulated by the 400Hz signal. The module passes this 400Hz signal which appears at the collector of Q2. Following Q2 is a voltage-doubling rectifier circuit (D1 & 2, C5 & 6) which converts the 400Hz AC signal to DC. LED2 is then forward biased, not only lighting itself in the process but supplying bias for Q3. Q3 conducts, pulling in the relay. But why go to all this trouble of transmitting 400Hz along with the carrier, then detecting it, rectifying it and so on? Why not simply detect the 38kHz carrier? After all, it is just as surely cut by someone walking through it as a modulated 38kHz carrier? The reason is twofold. The first problem is that a savvy intruder, once they knew what type of infrared detector you were using, could possibly bypass the system by simply firing a beam from just about any infrared remote controller (probably the one they knocked off from the house next door!). If the system didn’t have to do any signal handling, it would probably react to any infrared signal, regardless of encoding. Second, and a little more downto-earth, is that the system could be prone to either electrical or even light-induced noise if operated in a simple mode. As it is, the circuitry is quite good at rejecting noise and is quite reliable. OK, that’s what happens when the receiver is receiving. What happens when someone cuts the beam? Very little! The output of the infrared module goes high, cutting off Q2. Therefore there is no signal at Q2’s collector, so LED2 and Q3 lose their bias. When that happens, the relay drops out. To ensure no harm is done to Q3 or other semiconductors, a diode is connected across the relay coil. When Q3 stops conducting and the field around the relay coil collapses, a quite high voltage spike can be induced in the coil, with opposite polarity to the voltage which powered the coil originally. This forward biases D3, effectively shorting the coil. In the prototype, a low voltage piezo buzzer was glued into the case and connected between the positive and negative supply with the appropriate relay contacts in series. This is reminiscent of the shop door buzzers of old – the buzzer sounds when ever anyone cuts the beam. If you walk slowly enough through the beam, it actually sounds twice. Guess why? Oh, come on, it’s not that hard . . . Of course, you don’t need to fit a buzzer. You can wire the relay contacts to do just about anything you want to (short of setting off a man trap, because that’s illegal). Just remember that the contacts of the relay aren’t rated for mains voltages, so you should limit your circuitry to low voltage and reasonably low currents. Construction Construction is very simple but, as always, check the PC board first for any etching defects (rare, but they do happen). Next, you’re going to have to separate the receiver and transmitter PC boards. For economy, both are supplied on the one board but the cut mark is clearly shown. Use a fine-toothed hacksaw and be sure to protect the PC pattern from damage if you grip the board in a vyce. It’s up to you which board you assemble first. All component positions are clearly marked but take This photo shows the method of mounting the transmitter PC board in its jiffy box. The board snaps into place on lugs moulded into the box walls with no screws or nuts needed. Holes must be first drilled in the case for the IR LED and also the power leads. Note that these photos show early prototypes. care when placing any polarised components. There are a couple of side-by-side components which are opposite-way-around to each other. Also make sure you don’t mistake the power diode, small signal diodes and zener diode. It is possible, though difficult, to insert the infrared detector module the wrong way around. Pinouts are marked on the circuit and on the PC board. To be safe, we would leave the detector until all other components are inserted and soldered in. Testing If you’re going to use the piezo buzzer, we strongly suggest you leave it until the very last thing, or at least heavily muffle it! It’s very annoying to have it going off all the time while setting it up. Testing is probably easiest carried out before mounting the assembled PC boards in their jiffy boxes. Connect a 12V supply (a battery is fine) to both the transmitter and receiver boards and aim one at the other. You should hear the relay click in when they are aimed at each other and drop out when you turn either one away. If that happens, you can proceed to mount the boards in their cases. The photographs give a good idea of how this was done. You may have other ideas, particularly if you have a specific location in mind which requires some ingenuity! If they don’t work? One board at a time, carefully check your soldering (especially bridges between close contacts) and component placement/ orientation. If all appears OK, check voltages. The supply to the IR receiver module (pin 2) should be about +5.6V (plus or minus a tad). On the transmitter board, the easiest voltage check (after the supply, that is) is the voltage across ZD2 – about 4.7V. If basic voltages appear OK, check the output voltage from pin 1 of the receiver module. With the transmitter firing, it should be about +2.5V. With no transmitter, it should be about +5.6V. If these voltages are OK, the error is further down the track – possibly Q2 or Q3 are inserted the wrong way around (though that’s hard because the orientation is shown on the PC board overlay). Perhaps D1 or D2 are back-to-front? If you suspect the relay, that can be checked by carefully shorting Q3’s collector and emitter. It should pull in. Mounting the boards Even if you buy the complete kit, the jiffy boxes supplied will not be drilled. The boxes are actually used upside-down – the lid of the box becomes the base. You will need to drill holes in the bottom of the receiver box for the infrared receiver module, the signal LED and the piezo (if used). The power supply wires, along with any external connection wires, can emerge through suitable holes drilled in the box lid. Similarly, the transmitter will need a hole for the IR LED and a pair in the lid for the power wires. The prototype boxes also had swivel mounting brackets attached to the base (ie, the box lid) to make mounting and aiming much simpler. At the price, we think they’re good value. Mounting the system Assuming you’ve used the jiffy boxes and swivel brackets, all you need to do is determine which aperture you want to protect with this system, mount the units so that they face each other – and that could be it. When you apply power there should be a brief squeak from the piezo buzzer and the system will sit there until the beam is broken, at which time the buzzer should squark its head off! If you haven’t used the jiffy boxes and brackets, you’ll need to work out a method of mounting. But it’s straightforward – as long as the IR LED points to the IR receiver (and as long as they’re not too far apart) the system should work. By the way, when protecting a passageway or similar access route, it’s normal to mount the system down April 1999  69 Left: the receiver PC board mounted in its case (it actually screws to the lid which becomes the base!) This is shown fitted with the optional piezo buzzer, glued into the bottom of the case. Right: using the optional swivel bracket makes mounting and aiming both the transmitter and receiver a lot easier. low (to catch anyone crawling) but not so low as to have pets or other small animals set it off. Increasing the range We mentioned before a range of up to 17m should be possible with the units as described, or 25m if R7 in the transmitter is reduced to 22Ω. This is a pretty handy sort of range, you’d agree. But wait, there’s more! If fitted with simple optics, the range can be dramatically increased. A simple glass lens placed at the focal point of the IR receiver module will give you double, triple and even more range. The same thing applies to a lens at the focal point of the IR diode. Alternatively, using a parabolic reflector will also give an amazing increase in range. In this case, the IR LED and the IR receiver are turned around t Shop soiled bu ! HALF PRICE to face into the reflectors and are mounted at their focal point. Aiming becomes a little more tricky over longer ranges but it can be done. Finally, while the system is relatively free from the effects of ambient light, any system such as this is usually improved with the used of internally blackened tubes. Neither length nor diameter are really important. If you’re looking for very cheap tubes, try toilet roll holders. SC Where To Buy The Parts Parts for the Infrared Sentry are available from Oatley Electronics. The PC board(s) and all on-board components with the exception of the relay are $17.00 while the relay and buzzer are each priced at $3.00 To complete the project, a set of two jiffy boxes, complete with swivel brackets and labels, is available for $6.00. Oatley Electronics’ phone number is (02) 9584 3563; fax (02) 9584 3561; email oatley<at>world.net 14 Model Railway Projects THE PROJECTS: LED Flasher; Railpower Walkaround Throttle; SteamSound Simulator; Diesel Sound Generator; Fluorescent Light Simulator; IR Remote Controlled Throttle; Track Tester; Single Chip Sound Recorder; Three Simple Projects (Train Controller, Traffic Lights Simulator & Points Controller); Level Crossing Detector; Sound & Lights For Level Crossings; Diesel Sound Simulator. Our stocks of this book are now limited. All we have left are newsagents’ returns which means that they may be slightly shop-soiled or have minor cover blemishes. SPECIAL CLEARANCE PRICE: $3.95 + $3 P&P (Aust. & NZ) Order by phoning (02) 9979 5644 & quoting your credit card number; or fax the details to (02) 9979 6503; or mail your order with cheque or credit card details to Silicon Chip Publications, PO Box 139, Collaroy, NSW 2097. 70  Silicon Chip