Silicon ChipBuild A Swimming Pool Alarm - September 2000 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Electrical licence to build a kit is ridiculous
  4. Feature: How They're Bringing You The Games by Ross Tester
  5. Project: Build A Swimming Pool Alarm by John Clarke
  6. Feature: Network Troubleshooting With Fluke's NetTool by Greg Swain
  7. Product Showcase
  8. Project: 8-Channel PC Relay Board by Ross Tester
  9. Product Showcase
  10. Order Form
  11. Project: Fuel Mixture Display For Cars, Pt.1 by John Clarke
  12. Feature: LA-CRO - A Must-Have For Students by Peter Radcliffe
  13. Project: Protoboards: The Easy Way Into Electronics, Pt.1 by Leo Simpson
  14. Project: Cybug - The Solar Fly by Ross Tester
  15. Vintage Radio: HMV's Nippergram: a classic 1950s portable radiogram by Rodney Champness
  16. Notes & Errata: PC Controlled VHF FM Receiver / 40V/1A Adjustable Power Supply / Loudspeaker Protector & Fan Controller
  17. Book Store
  18. Market Centre
  19. Outer Back Cover

This is only a preview of the September 2000 issue of Silicon Chip.

You can view 36 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.

Items relevant to "Build A Swimming Pool Alarm":
  • Swimming Pool Alarm PCB pattern (PDF download) [03109001] (Free)
  • Swimming Pool Alarm panel artwork (PDF download) (Free)
Items relevant to "8-Channel PC Relay Board":
  • QBASIC source code for the LPT 8-Channel Relay Board (Software, Free)
Items relevant to "Fuel Mixture Display For Cars, Pt.1":
  • PIC16F84(A)-04/P programmed for the Fuel Mixture Display [AIRFUEL.HEX] (Programmed Microcontroller, AUD $10.00)
  • PIC16F84 firmware and source code for the Fuel Mixture Display [AIRFUEL.HEX] (Software, Free)
  • Fuel Mixture Display PCB patterns (PDF download) [05109001/2] (Free)
  • Fuel Mixture Display panel artwork (PDF download) (Free)
Articles in this series:
  • Fuel Mixture Display For Cars, Pt.1 (September 2000)
  • Fuel Mixture Display For Cars, Pt.1 (September 2000)
  • Fuel Mixture Display For Cars, Pt.2 (October 2000)
  • Fuel Mixture Display For Cars, Pt.2 (October 2000)
Articles in this series:
  • Protoboards: The Easy Way Into Electronics, Pt.1 (September 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.1 (September 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.2 (October 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.2 (October 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.3 (November 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.3 (November 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.4 (December 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.4 (December 2000)

Purchase a printed copy of this issue for $10.00.

Drowning is one of the primary causes of accidental death in children under five. SILICON CHIP would love to see that statistic eliminated – and this simple, effective pool alarm could assist in that aim. Don’t wait until summer: build it NOW! Features  Compact, battery operated  Free-floating unit  Loud siren sounds upon    sudden pool water mo vement  Reduced sensitivity to win d movements and side-of-p ool collisions  Splashproof and rain proof  On/Off switch for pool use  Test switch lowers siren vol ume  50 second alarm Swimming Pool Alarm by JOHN CLARKE 12  Silicon Chip W hile properly designed and maintained pool fences are the primary line of defence in preventing young children falling into a pool, they are not enough. Indeed, we speak from first-hand, recent experience: Georgia, the 18-month-old “model” used in our photographs, was found leaning over the edge of the pool (after that same ball) shortly after the photographs were taken. The reason – the gate had not latched properly. We shudder to think what might have been if we weren’t close by. Needless to say, the gate latch has now been fixed … and we now have a SILICON CHIP pool alarm floating in the water. The problem is, children are very resourceful when it comes to getting to a pool: the smallest gap in the fence; a box or chair left where it can be climbed on (or dragged to the fence); even a dog digging a tiny hole under the fence (if a dog can squeeze through it, a small child can often do so too…) So it is unwise to be complacent about pool safety, even if you think your pool fence is impenetrable. Some people install a closed-circuit TV system to monitor their pool area, with the screen in, say, the kitchen. That’s pretty good to keep watch over the kids while they’re in the pool and mum, for example, is inside. But what happens when she’s not in the kitchen? And even the best TV monitoring system is useless when you’re away and the neighbour’s toddler finds his or her way into your backyard… A much better form of protection is to use a device which can detect someone actually falling into the pool – and then screams its head off. Of course, it would be better to detect them before they fall in but that’s It’s like an insurance policy: you never know when you need it but you’ll always be grateful that you had it if it’s ever really needed! getting even more difficult! One way to detect someone falling into the pool is to sense any small change in the water level and set off an alarm if the change in level matches certain parameters – for example, changes caused by wind or filter Specifications ...... 330uA at 6V Battery current drain....... .... >6 months Expected battery life............ ally 50 seconds Alarm duration..........typic typically .01g Movement sensitivity.......... action need to be rejected). The SILICON CHIP Swimming Pool Alarm is based on this principle. It is fully self-contained and battery operated. There is a small plastic box which is simply left to float on top of the pool surface (you could loosely tether it if necessary). Inside is a sensor which detects small, though rapid, changes in the pool water level as would happen when someone falls in. On detecting this change, a siren sounds. It’s designed to be left on all the time, except of course when the pool is being used. A waterproof on/ off switch is provided to allow it to be removed from the pool without sounding, and there is another switch which tests the alarm (at reduced volume) to periodically check the battery. Detection Detecting a small child’s body entering the pool is rather difficult. The monitoring must attempt to exclude normal pool movements caused by wind or filter operation but still detect changes in water level. Even this is not foolproof: if the Fig.1: the block diagram of the SILICON CHIP Swimming Pool Alarm. The weighted piezo sensor detects water disturbance in the pool. SEPTEMBER 2000  13 Fig.1: the low frequency signal from the piezo sensor is amplified to trigger the siren driver. person climbs slowly down the ladder the rate of change in water level might be virtually nonexistent. By contrast, anyone actually falling into the pool will usually make quite a splash with lots of movement of the pool surface. Even a child overbalancing while leaning over the pool edge to retrieve a toy or ball (by far the most common scenario) will make large ripples on the pool surface. Water level change detection is a compromise between sufficient sensitivity for the purpose intended while rejecting normal pool movement due to wind, etc. As such, it may produce false alarm signals on a windy day. What we are saying is that this method of sensing water level change can never be 100% reliable but it is about as reliable as can be achieved (within reason). No pool alarm can give you absolute assurance – it is very much your second line of defence. Always ensure the pool fence and gates are in perfect 14  Silicon Chip order and remain vigilant while ever kiddies are around. Block diagram The block diagram of the Swimming Pool Alarm is shown on Fig.1. The sensor itself consists of a piezo element which supports a weight. The piezo element is attached to a floating box which floats on the swimming pool surface. Any upwards-movement of water will cause the floating box to rise, pushing against the piezo which doesn’t move as quickly due to the inertia of the attached weight. When this occurs, the piezo element generates a small voltage output. Note that a downward movement of the box will not usually cause decompression of the element. This is because the floating box drops with gravity at the same rate as the mass. The signal from the piezo detector is amplified by IC1a and filtered so that only frequencies below about 2Hz pass through. The amplifier has a gain of 33 for frequencies below 2Hz. As the mass on the piezo element also damps out any fast movement (again due to inertia), it reduces the high frequency response of the piezo element. Thus the output from the filter only changes for slower movements. The signal is squared up by the following Schmitt trigger (IC1b) and has an adjustable threshold to allow setting the sensitivity to pool movement. The Schmitt trigger output is a low frequency square wave which changes with the piezo detector output. The signal drives a charge pump which requires at least two pulses from the Schmitt trigger before the output from the charge pump is low enough to trigger the following timer. This requirement before triggering the timer reduces the likelihood of false alarms. The timer produces a high signal for about 50 seconds which drives the siren driver (Q1) and siren. The siren should be sufficiently loud to attract attention. The circuit is housed in a sealed box to prevent water getting in. However, the siren must be exposed to the outside air so that it can be heard. It also needs to be made as loud as possible to attract attention. This is done by feeding the siren into a tuned port, covered to make it splashproof. Actual dimensions of the port and cover are fairly critical to maximise the sound output level. Simply placing an untuned cover over the siren outlet would severely muffle the volume. Fortunately, we found a couple of easily-obtainable items made a near-perfect port: the flange or front section from a standard bayonet-cap light fitting (the bit that screws on to the actual lampholder which holds a lampshade or diffuser in place) and half a table-tennis (or ping-pong) ball! Circuit Use this component overlay with the photograph below as a reference while building the Pool Alarm and you shouldn’t go wrong. The two 25mm M3 screws don’t actually hold anything – they're there (with the four small “L”shaped brackets not shown in the photo) to stop the battery holders slopping around in the case. Fig.2 shows the circuit for the Swimming Pool Alarm. Signal from the piezo transducer is connected to the low pass filter, comprising IC1a and the associated resistors and capacitors. The 100kΩ resistors and 1µF capacitors set the low pass filter at 2.3Hz, while the 3.3MΩ feedback resistor and .015µF capacitor set the gain at 33 times at or below the 2.3Hz rolloff frequency. IC1a is biased at 1/2 supply (+3V) at pin 3 by the 1MΩ voltage divider resistors connected across the supply. This half supply is decoupled with a 100µF capacitor. The output of IC1a is also at 1/2 supply and this drives a 2.2kΩ resistor decoupled with a 470µF capacitor. The voltage across the 470µF capacitor is therefore at 3V (1/2 supply) and the resistor and capacitor form a low pass filter to reject signals above 0.15Hz. Hysteresis for the Schmitt trigger (IC1b) is set by the ratio of resistance between the 3V supply and pin 5 and the resistance between pins 5 & 7. Thus the hysteresis can be varied from about 13mV when VR1 is wound with its wiper closest to the 2.2kΩ resistor and around 300mV when VR1’s wiper is closest to the 1MΩ resistor. The output of the Schmitt trigger is used to drive a “charge pump” consisting of diodes D1 & D2 and capacitors C1 & C2. These produce a voltage negative with respect to the +6V line across capacitor C2 whenever IC1b's output is toggling (ie, the circuit is sensing water disturbance). SEPTEMBER 2000  15 The voltage across C2 is fed to pin 2, the trigger input of timer IC2. IC2 is triggered when its pin 2 goes below one third of the supply voltage, or 2V. When triggered, the 47µF capacitor begins charging via the 1MΩ resistor and the pin 3 output goes high and drives transistor Q1’s base via the 2.2kΩ resistor. This transistor drives the siren. The siren can be driven directly via the 6V supply or via the 10kΩ resistor connecting to the 6V supply for a reduced output level (for testing). This is selected using switch S2. The output of IC2 (pin 3 ) stays high until the 47µF capacitor at pin 6 reaches two thirds of the supply voltage. The pin 3 output then goes low and the capacitor is discharged via the pin 7 output and 10kΩ resistor. The time duration for the alarm is around 50 seconds. When power is first switched on, the reset input of IC2, pin 4, is held low via the 10µF capacitor to prevent the timer from being triggered by IC1b. After about a second the reset pin voltage reaches about 1V due to the 10µF capacitor being charged via the 560kΩ resistor and then the timer can be triggered. Construction The Swimming Pool Alarm is constructed using a PC board coded 03109001 and measuring 89 x 80mm. This is housed in a sealed plastic enclosure measuring 115 x 90 x 55mm. It is important to use this case, not the plastic project boxes we normally use, as this one has an integral gasket in the lid ensuring it is waterproof. A front panel label measuring 108 x 85mm attaches to the lid of the case. We used a flange cover from a bayonet light socket to cover the piezo siren outlet and made a splashproof hood for it by cutting a table tennis ball in half. The front panel switches were also waterproofed with rubber hoods. Begin construction by checking the PC board for shorts or breaks in the tracks. Also check the hole sizes for fit, especially for the PC stakes, the 3mm screw holes required for the piezo transducer and AA cell holder locating screws. The four corner holes need to be 3mm in diameter. Insert and solder in the resistors and diodes D1 and D2. Use the accompanying resistor colour code table as 16  Silicon Chip We used the flange from a standard 240V light fitting (at left in photo above) to form the “tuned port” cover over the piezo buzzer. This was capped with half a ping-pong ball. The diagram at right shows how the various parts are assembled. a guide to selecting the correct values for each position. If in doubt use your multimeter to verify values. Note that the 560kΩ resistor is mounted on its end as shown. Ensure that D1 and D2 are inserted the right way around. When mounting IC1 and IC2 take Parts List – Swimming Pool Alarm 1 PC board coded 03109001, 89 x 80mm 1 sealed ABS enclosure, 115 x 90 x 55mm (Jaycar HB-6126 or DSE H-2863 or equiv.) 1 front panel label 111 x 87mm 2 2 x AA cell holders 4 AA cells 1 dual sound piezo buzzer (Jaycar AB-3456 or equiv.) 1 piezo audio transducer 30mm diameter 2 SPDT toggle switches (S1,S2) 2 waterproof boots or hoods for toggle switches 1 brass or lead cylinder 15mm OD x 19mm* 1 flange cover from a mains bayonet light socket or line socket (tapered from 36mm to 32mm over 35mm length. 1 38mm diameter table tennis ball 2 40mm lengths of 1.25mm diameter cold drawn brass wire 4 right angle brackets 7 x 9 x 10mm wide 4 M3 x 6mm screws 2 M3 x 10mm screws 2 M3 x 25mm screws 4 M3 nuts 11 PC stakes 1 200mm length of red hookup wire 1 200mm length of black hookup wire Semiconductors 1 TL062 dual low power op amp (IC1) 1 7555, LMC555CN CMOS 555 timer (IC2) 1 BC338 NPN transistor (Q1) 2 1N914, 1N4148 switching diodes (D1,D2) Capacitors 2 470µF 16VW PC electrolytic 1 100µF 16VW PC electrolytic 1 47µF RBLL electrolytic 1 10µF 16VW PC electrolytic 3 1µF MKT polyester 1 0.56µF MKT polyester (used while adjusting sensitivity) 1 0.22µF MKT polyester 2 0.1µF MKT polyester 1 .015µF MKT polyester Resistors (0.25W, 1%) 2 10MΩ 1 3.3MΩ 5 1MΩ 1 560kΩ 3 100kΩ 2 10kΩ 3 2.2kΩ 1 50kΩ (503) horizontal trim pot (VR1) Miscellaneous Solder, neutral cure Silicone sealant (roof & gutter type), “body” for setting sensitivty etc.   *See text for alternatives These two photos give a good idea of how the whole lot goes together, especially the “tricky bits” – securing the weight to the piezo trans-ducer and splash-proofing the piezo buzzer with a flange from a light fitting and half a ping-pong ball. care with their orientation. Likewise, the electrolytic capacitors (the MKT types can be mounted either way around). The accompanying capacitor code table will help you in selecting the value for each position. Transistor Q1 and the PC stakes can be inserted and soldered in position now. Finally, trimpot VR1 can be installed. Piezo and weight Remove the back from the piezo transducer by prising the two halves apart (the back is not used and can be discarded). Attach the transducer in place upside down on the PC board using 10mm M3 screws and nuts. For the weight attached to the transducer, we used a piece of brass water tap plunger (the part that pushes the valve down when you turn the tap off), cut to 19mm long to clear the back of the piezo buzzer when the case is assembled. Alternatively, you could use a 19mm long piece of 13-14mm diameter brass rod, or you could fashion your own weight using a plumbers’ fitting such as a 12.5mm (1/2") brass pipe cap (also known as a stop end), cut to 19mm long and filling it with lead or even solder. This weight is glued to the piezo element on the transducer using a smear of silicone sealant between Resistor Colour Codes        No. Value 4-Band Code (1%) 2 10MΩ brown black blue brown   1 3.3MΩ orange orange green brown   5 1MΩ brown black green brown   1 560kΩ green blue yellow brown   3 100kΩ brown black yellow brown   2 10kΩ brown black orange brown   3 2.2kΩ red red red brown      5-Band Code (1%) brown black black green brown orange orange black yellow brown brown black black yellow brown green blue black orange brown brown black black orange brown brown black black red brown red red black brown brown the mating faces. Allow the sealant to cure. Also, while you have the silicone sealant out, put a small dab in the holes in the base of the case. This will trap air inside the holes and provide extra buoyancy. The lid and cover Cut a 25mm diameter hole in the centre of the case lid, either with a 25mm hole-saw, or by first drilling a series of small holes around the required perimeter and removing this piece then filing to shape. The piezo siren should be a tight fit in the hole. Next drill the holes for the two switches using the front panel artwork as a guide to their position. We made our cover for the piezo siren from a flange from a standard Capacitor Codes Value 1µF 0.56µF 0.22µF 0.1µF .015µF IEC code 105 564 224 104 153 EIA code 1u 560n 220n 100n 15n SEPTEMBER 2000  17 (bayonet cap) light fitting. They’re all much the same size. The flange is placed with the larger diameter end on the lid. File a couple of small notches in this larger diameter end so that water can flow out through these if some does enter. Test that the notches are large enough for water to flow out by placing the end on a flat bench (eg, bathroom sink) and pouring some water in. The water should flow out leaving only a couple of drops inside. The smaller diameter end of the bayonet flange requires brass wire crosshairs to be placed symmetrically across the opening so that the cut in half table-tennis ball can be held in place over the opening. We secured the crosshairs in place by melting the wires into the plastic flange using a soldering iron. The table tennis ball is cut in half using a fine toothed hacksaw and smoothed by rubbing the cut edge on a sheet of fine glass-paper on a flat surface. The half ball is secured centrally over the wire crosshairs and secured at these four points with silicone sealant. Attach the bayonet flange to the lid with a smear of silicone sealant taking care not to fill the water outlet notches cut previously. Four small L-shaped brackets are required to hold the two AA cell holders in place. We made ours from some bits of chassis-mounting capacitor brackets but any small pieces of metal would be fine. Exact size isn’t critical – ours were about 7mm wide and each leg was about 9-10mm long. One of the legs on each bracket needs to be drilled to accept the M3 screws. Further support for the AA cell holders is provided by the 25mm M3 screws mounted on the PC board. When the silicone sealant has dried, you can attach the front panel label and secure the switches in place along with their rubber boot covers. Wire up as shown and insert the PC board in place remembering to also attach the right-angle battery holder brackets under the corner mounting screws. Insert the cells and switch on power. Set S2 to the test alarm position. Check that there is 6V between pins 4 and 8 of IC1 and between pins 1 and 8 of IC2. Pin 1 of IC1a should be at around 3V after about 60 seconds from power being switched on. Jerk 18  Silicon Chip Full-sized artwork for the Pool Alarm front panel and PC board. A photocopy of the front panel makes a handy drilling template for the case lid. the box upward and check that the siren sounds for about 50 seconds. The “body” test Testing in the swimming pool needs to be done with the lid secured on with its neoprene gasket in place. That means you’ll need to remove the lid each time you need to adjust the sensitivity pot, VR1 but otherwise you risk filling the alarm with water! VR1 should be adjusted so that the alarm will sound when a person enters the pool but not so sensitive that it is triggered with normal pool water movements. Adjustment of VR1 may be easier on your ears if you temporarily replace the 47µF capacitor on pin 6 of IC2 with a 0.56µF capacitor. This will reduce the alarm time to less than one second. First, though, you'll need to find a small volunteer “victim” (the smaller the better) – but please, make sure they can swim! Get them to jump in, fall in and even “ease” themselves into the pool, setting the sensitivity pot (VR1) as low as you can with the alarm triggering reliably every time they go in. To check that it will work with a toddler, we don’t suggest throwing one in(!) but perhaps a few bricks wrapped in towels, weighing say 7-10kg, would be a reasonable approximation. SC