Silicon ChipBuild A Low-Cost PIR Movement Detector - November 1995 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Have you had your house wiring checked?
  4. Feature: LANsmart: A LAN For Home Or A Small Office by Bob Flynn
  5. Feature: Programmable Fuel Injection Control by Julian Edgar
  6. Book Store
  7. Project: A Mixture Display For Fuel Injected Cars by Julian Edgar
  8. Order Form
  9. Project: CB Transverter For The 80M Amateur Band; Pt.1 by Leon Williams
  10. Feature: Remote Control by Bob Young
  11. Project: Build A Low-Cost PIR Movement Detector by Conrad Marder
  12. Product Showcase
  13. Project: Dolby Pro Logic Surround Sound Decoder, Mk.2 by John Clarke
  14. Serviceman's Log: How friendly is "user friendly"? by The TV Serviceman
  15. Project: Digital Speedometer & Fuel Gauge For Cars, Pt.2 by Jeff Monegal
  16. Vintage Radio: How good are TRF receivers? by John Hill
  17. Project: Build A PC-Controlled Robot From Surplus Parts by Tony Mercer
  18. Back Issues
  19. Market Centre
  20. Advertising Index
  21. Outer Back Cover

This is only a preview of the November 1995 issue of Silicon Chip.

You can view 27 of the 104 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.

Items relevant to "A Mixture Display For Fuel Injected Cars":
  • Fuel Injected Car Mixture Display PCB (PDF download) [05111952] (PCB Pattern, Free)
Articles in this series:
  • CB Transverter For The 80M Amateur Band; Pt.1 (November 1995)
  • CB Transverter For The 80M Amateur Band; Pt.1 (November 1995)
  • CB Transverter For The 80M Amateur Band; Pt.2 (December 1995)
  • CB Transverter For The 80M Amateur Band; Pt.2 (December 1995)
Articles in this series:
  • Remote Control (October 1989)
  • Remote Control (October 1989)
  • Remote Control (November 1989)
  • Remote Control (November 1989)
  • Remote Control (December 1989)
  • Remote Control (December 1989)
  • Remote Control (January 1990)
  • Remote Control (January 1990)
  • Remote Control (February 1990)
  • Remote Control (February 1990)
  • Remote Control (March 1990)
  • Remote Control (March 1990)
  • Remote Control (April 1990)
  • Remote Control (April 1990)
  • Remote Control (May 1990)
  • Remote Control (May 1990)
  • Remote Control (June 1990)
  • Remote Control (June 1990)
  • Remote Control (August 1990)
  • Remote Control (August 1990)
  • Remote Control (September 1990)
  • Remote Control (September 1990)
  • Remote Control (October 1990)
  • Remote Control (October 1990)
  • Remote Control (November 1990)
  • Remote Control (November 1990)
  • Remote Control (December 1990)
  • Remote Control (December 1990)
  • Remote Control (April 1991)
  • Remote Control (April 1991)
  • Remote Control (July 1991)
  • Remote Control (July 1991)
  • Remote Control (August 1991)
  • Remote Control (August 1991)
  • Remote Control (October 1991)
  • Remote Control (October 1991)
  • Remote Control (April 1992)
  • Remote Control (April 1992)
  • Remote Control (April 1993)
  • Remote Control (April 1993)
  • Remote Control (November 1993)
  • Remote Control (November 1993)
  • Remote Control (December 1993)
  • Remote Control (December 1993)
  • Remote Control (January 1994)
  • Remote Control (January 1994)
  • Remote Control (June 1994)
  • Remote Control (June 1994)
  • Remote Control (January 1995)
  • Remote Control (January 1995)
  • Remote Control (April 1995)
  • Remote Control (April 1995)
  • Remote Control (May 1995)
  • Remote Control (May 1995)
  • Remote Control (July 1995)
  • Remote Control (July 1995)
  • Remote Control (November 1995)
  • Remote Control (November 1995)
  • Remote Control (December 1995)
  • Remote Control (December 1995)
Articles in this series:
  • Dolby Pro Logic Surround Sound Decoder, Mk.2 (November 1995)
  • Dolby Pro Logic Surround Sound Decoder, Mk.2 (November 1995)
  • Dolby Pro Logic Surround Sound Decoder, Mk.2; Pt.2 (December 1995)
  • Dolby Pro Logic Surround Sound Decoder, Mk.2; Pt.2 (December 1995)
Articles in this series:
  • Digital Speedometer & Fuel Gauge For Cars; Pt.1 (October 1995)
  • Digital Speedometer & Fuel Gauge For Cars; Pt.1 (October 1995)
  • Digital Speedometer & Fuel Gauge For Cars, Pt.2 (November 1995)
  • Digital Speedometer & Fuel Gauge For Cars, Pt.2 (November 1995)
Build A LowCost PIR Movement Detector This low-cost circuit is based on a universal PIR chip. It is easy to build, can be adjusted for sensitivity and output duration, and is suitable for use in alarm and surveillance applications. P By CONRAD MARDER ASSIVE INFRARED (PIR) de- tectors are one of the most common sensors used in security systems. Typically, they are mounted high on a wall and are used to turn on lights or to activate burglar alarm systems. The circuit described here uses a sensitive dual-element PIR sensor and has a range of about 12 metres. This range can be adjusted by means of a single sensitivity control. In addition, there is a day/night sensor control and this can be set to dis­able the output during daylight hours; eg, so that security lights only turn on at night. Alternatively, the day/night sensor can be effectively disabled simply by setting the control to one extreme (ie, anti­clockwise). The PIR sensor will 44  Silicon Chip then operate at all times, re­gardless of the ambient light conditions. Another very worthwhile feature of the unit is that the output “on” time can be adjusted from 3 to 30 seconds. It also features very low quiescent current (less than 500µA), making it suitable for long-term battery operation. By contrast, most commercial units have much higher quiescent currents and so can only be battery operated for short periods of time. Apart from its obvious security applications, this PIR detector is ideal for controlling garden and path lights. Typi­cally, these path lights would be low voltage types powered from a battery and a solar panel – see Fig.3. By adding the PIR detec­tor and setting the day/night sensor, the lights could be made to operate only during the hours of darkness, when ever movement was detected. How it works Refer now to Fig.1 for the full circuit details. As shown, the circuit is based on IC1, an MPCC device which is specially designed for use in PIR detectors. This device contains the necessary gain blocks and filters, plus an internal oscillator and counter stages for the output timing function. Its pin func­tions are shown in Table 1. The other important component is the PIR sensor (Murata IRA-E100S1). This is a dual element type that combines a window filter, two heat-sensitive crystals and a FET buffer stage in one 3-pin package. It is combined with an external plastic Fresnel lens, which focuses the IR energy onto the PIR sensor and provides additional filtering. Note that the external Fresnel lens is white-coloured and is almost opaque to visible light. However, it is transparent to the wavelengths associated with body heat in the range 8-10µm. The FET inside the PIR sensor is Fig.1: the circuit is based on IC1, an MPCC device which is specially designed for use in PIR detectors. It operates in conjunction with a dual-element PIR sensor. VR1 sets the sensitivity, VR2 sets the output “on” time, and VR3 sets the sensitivity of the daylight sensor. wired as a source-follow­er, with its source connected to pin 2. This output is, in turn, coupled to pin 8 of IC1 via a voltage divider consisting of R12 and R4. This voltage divider is necessary because the PIR sensor used is far more sensitive than other types that can be used with the MPCC IC. In addition, the sensitivity of the unit is adjusted using VR1. This pot samples the drain reference voltage on pin 7 and applies an offset voltage to pin 2. Each time movement is detected and a signal is applied to pin 8, the output at pin 16 goes high. This then turns on power Mosfet Q4 and so the output goes low for a preset “on” time. VR2, R7 and C10 allow this time to be set anywhere from 3-30 seconds. If you require longer times, just increase the size of C10. Pin 11 of IC1 is the “daylight adjust” pin and is connected to the wiper of VR3. This pot is wired in series with LDR1 and R8 and controls the gain of an internal daylight sense amplifier and hence the sensitivity of the daylight detector. It is adjusted so that the output (ie, the drain of Q4) toggles only when the ambient light falls below a certain level. During daylight hours, the resistance of LDR1 (a light dependent resistor) is low and pin 11 of IC1 is pulled towards Vcc (ie, towards the +5V rail). As night falls, however, the resistance of LDR1 rises (ultimately to several megohms) and so the bias on pin 11 progressively shifts towards ground. When it reaches a critical level, the output can toggle in the normal manner. Pin 17 of IC1 is used to flash a LED indicator (LED 1) each time movement is detected. This LED operates while ever movement occurs, even when the output has been disabled by the day/ night sensor. As an optional extra, the circuit also includes an output toggle facility. This is based on the circuitry connected to pin 15. Normally, the toggle input is Main Features • • • • • • • Optional day/night setting with variable sensitivity. • Optional toggle output (output can change from on to off or from off to on). • Compact size (83 x 54 x 28mm). Output “on” time adjustable from 3-30 seconds. Very low quiescent current: < 500µA. Activated operating current < 5mA. Sensitivity adjustment for PIR sensor. LED output to show sensor has been activated. Open drain Mosfet output able to switch 12V at currents up to several amps. November 1995  45 This is what the top of the board looks like when all the parts have been installed. Note particularly the orientation of Q4 (ie, metal face towards D1). open circuit, Q1 is off and IC1 operates in the normal manner. However, if the toggle input is pulled to +5V, Q1 turns on and pin 15 goes low. This, in turn toggles the output of Q4; ie, if the output was high it switches low and remains there until the toggle input is released, and vice versa. Fig.2: install the parts as shown here, noting that the PIR, LDR and LED 1 are installed on the track side of the PC board (see photo). Note also that pin 2 of the PIR sensor is connected to the top of the adjacent 22kΩ resistor. 46  Silicon Chip The PIR sensor, the LDR and LED 1 are mounted on the track side of the PC board. The plastic Fresnel lens is simply clipped into position. Power for the circuit is derived from a 9-20V DC supply (eg, from a 9V battery or from an alarm control panel). This supply rail is filtered using C1 and regulated to about 5.9V using diode D1 and transistors Q1, Q2 & Q3. A discrete regulator was chosen in preference to a 78L05 because of its very low current consumption (a 78L05 would typically draw around 2mA). Diode D1 sets the voltage on Q1’s emitter to about 0.6V, which in turn means that its base voltage is about 1.2V. The output voltage of the regulator is set by R2 and R3, which form a voltage divider on the base of Q3. Basically, Q3 functions as an error amplifier, while Q2 & Q1 are wired as a Darlington pair. If the output voltage rises above 5.9V, Q3 turns on harder and starves the base of Q2 to throttle the voltage back. Conversely, if the output voltage drops below 5.9V, Q3’s collector voltage rises and Q2 & Q1 are driven harder to bring the output back up again. Construction Construction is straightforward, with all the parts in­stalled on a small PC board (45 x 68mm) – see Fig.2. This board carries a screen-printed overlay pattern to simply the job of assembly. Begin construction by installing the two wire links (one near VR1 and the other near the LDR). This done, install the resistors and capacitors, followed by the three trimpots. VR1 & VR3 are both miniature horizontal mount types, while VR2 is a larger vertical mount type. It is also a good idea to check the resistor values using a digital multimeter, as some of the colours can be difficult to decipher. The capacitor codes are shown in the parts list. Make sure that the five electrolytic capacitors are correctly oriented. IC1, D1 and the transistors (Q1-Q5) can be installed next. The prototype used an IC socket but this is not really necessary and the IC can be soldered directly to the board. Make sure that it’s oriented correctly, though – pin 1 is adjacent to a notch in one end of the IC body and this goes towards Q5. Note that transistor Q4 (the P222 Mosfet) must be installed with its metal face towards diode D1. The remaining transistors are oriented as indicated on the layout diagram. The PIR sensor, the LDR and the LED are all installed on the copper side of PARTS LIST Fig.3: the PIR detector could be married with a solar panel and a 12V battery and used to control low-voltage globes for garden and path lights. By suitably setting the day/night sensor, the lights could be made to operate only during the hours of darkness, when ever movement was detected. Fig.4: this diagram shows how to wire the output to switch a relay. Note that the relay should be powered from the 9-15V source, not from the regulated output at the emitter of Q1. Table 1: Pin Functions for IC1 Pin No. Name Description 1 Vcc Supply voltage (5V nominal) 2 Sens. adjust PIR motion sensitivity input 3 Offset filter PIR motion offset filter 4 Anti-alias PIR anti-alias filter 5 DC cap PIR gain stabilisation filter 6 Vreg Voltage regulator output 7 Pyro (D) Pyro drain voltage reference 8 Pyro (S) Pyro source input signal 9 Gnd (A) Analog circuitry ground 10 Gnd (D) Digital circuitry ground 11 Daylight adjust Daylight adjustment & CdS input 12 Daylight sense Silicon photodiode input 13 Gain select PIR gain select input 14 On/Auto/Off Mode select tri-state input 15 Toggle Mode select toggle input 16 Out Load on/off output 17 LED PIR motion indicator output 18 C Off timer oscillator input 19 R Off timer oscillator output 20 Fref Frequency reference oscillator the board – see photo. Install the LDR and the LED first and note that the LDR can go in either way around. It is mounted slightly proud of the board so that its leads can be soldered (note: you can leave the LDR out if the daylight detec­tion feature is not required). The LED is installed with its top about 10mm above the board. It must be oriented so that its anode lead goes 1 PC board, 45 x 68mm (Oatley Electronics) 1 plastic zippy case, 83 x 54 x 28mm 1 plastic Fresnel lens 1 light dependant resistor (LDR1) 2 500kΩ horizontal mount trimpots (VR1,VR3) 1 1MΩ vertical mount trimpot (VR2) Semiconductors 1 Murata IRA-E100S1 PIR sensor 1 MPCC IC (IC1) 4 BC548 NPN transistors (Q1Q3,Q5) 1 P222 N-channel Mosfet (Q4) 1 1N4148 silicon diode (D1) 1 red LED (LED1) Capacitors 2 100µF 16VW PC electrolytic 3 10µF 16VW PC electrolytic 1 0.47µF monolithic – code 474 3 0.1µF monolithic – code 104 1 .0047µF polyester – code 472 1 220pF ceramic – code 221 Resistors (0.25W, 5%) 1 390kΩ 1 22kΩ 1 150kΩ 4 10kΩ 1 100kΩ 1 3.9kΩ 1 56kΩ 1 22Ω 1 47kΩ Where to buy parts A kit of parts for the PIR Movement Detector is available for $20 plus $3.50 p&p. The case is an extra $3.00. Contact Oatley Electronics, PO Box 89, Oatley, NSW 2223. Phone (02) 579 4985 or fax (02) 570 7910. Note: copyright of the PC board asso­ ciated with this design is retained by Oatley Electronics. to pin 17 of IC1 (the anode lead is the longer of the two – see Fig.1). The PIR sensor is next. Do not touch its IR window, as this will seriously degrade its sensitivity. This device is positioned flat against the PC board and its pin 1 and pin 3 leads then looped back through adjacent holes to the copper side of the board for soldering. The pin 2 lead is soldered to the top of the adjacent 22kΩ resistor. November 1995  47 The plastic Fresnel lens covers both the PIR sensor and the LDR. If necessary, it can be secured to the PC board by applying epoxy resin to its clips. If a fingerprint does find its way onto the IR window, remove it using pure alcohol and a soft lint-free cloth. Finally, the board assembly is completed by clipping the plastic Fresnel lens into its four mounting holes. This lens covers both the PIR sensor and the LDR and can be secured using epoxy resin applied to its mounting clips if necessary. The assembly should now be carefully checked for wiring errors. Testing To test the unit, first set VR1 to mid-posi­tion and set VR2 & VR3 fully anticlockwise. This done, apply power and check that the LED flashes briefly when a hand is waved in front of the sensor. If it doesn’t, switch off immediately and locate the problem before proceeding. The LED may be oriented incorrectly, for example. Assuming that all is well, temporarily connect a LED in series with a 1kΩ resistor between the output (O/P) and the 5.9V rail. Now wave a hand in front of the sensor and check that this LED lights for about three seconds. VR2 can then be adjusted to set the required output “on” time (3-30s). 48  Silicon Chip The completed PC boards fits neatly into a small plastic case with the Fresnel lens protrud­ing through a 24mmdiameter clearance hole. The output toggle function can now be checked by connecting the I/P terminal on the PC board to the +5.9V rail. The output indicator LED that was connected in the previous step should immediately change state; ie, if it was on it should turn off, and if was off it should turn on. Final assembly The prototype was housed in a standard plastic zippy case measuring 83 x 54 x 28mm (eg, DSE Cat. H-2855). As shown in the photos, the board sits on the base with the Fresnel lens protrud­ ing through a 24mmdiameter clearance hole. A second, smaller hole located immediately beneath the lens is used for LED 1 (the movement indicator). The power supply, output and output toggle leads exit through a hole drilled in the lid. Alternatively, they can be connected to a screw terminal strip. VR1 (sensitivity) and VR3 (day/ night adjust) can be set after the unit has been finally installed in position. As a general rule, advance the sensitivity control (VR1) only as far as necessary for reliable triggering. VR3 can be set so that the output operates only in low-light conditions. The best way to do this is to initially set VR3 fully clockwise, then slowly turn it anticlockwise (while waving a hand in front of the sensor) until the output indicator LED (not LED 1) just comes on in daylight conditions. VR3 can then be backed off slightly, so that the output is disabled in daylight (ie, the output indicator LED stays off when movement is detected). There’s just one wrinkle here – each time the output indi­cator LED comes on and VR3 is adjusted, there must be a no-trig­ger period of at least eight seconds before the circuit can be re-tested. That’s because the output at pin 16 of IC1 will continue to toggle if fur­ther movement is detected within this period, regardless of the setting of VR3. If you later find that the lights come on too early or too late, then it’s simply a matter of tweaking VR3. Rotate it clockwise to make the lights come on later, or anti­clockwise to make them come on earlier. Alternatively, if you want the unit to operate at all times (eg, if it is to be used as an alarm sensor), simply set SC VR3 fully anticlockwise.