The WatchDuck is an accelerometer-based low cost wireless pool alarm. While the summer is coming, everybody knows how unsafe personal pools are for children: accidents happen so quickly. There are some products on the market to prevent such accidents but these pool alarms are quite expensive, about $500, and most of them are not wireless which is unfortunate since a lot of these accidents happen while the parents are inside the house.
To address this issue, I chose to build my own wireless pool alarm. To keep this alarm under $150, I had to use DIY single side PCBs. However, every handyman knows how difficult is using DIY PCBs for a project dealing with RF: the constraint of a single side makes impossible the use of micro-strips for instance. The 433 Mhz RF Transceivers are thus a good off-the-shelf solution to resolve this issue. In addition, the use of a 3-axis accelerometer module H48 was essential to overcome the issue of soldering QFN packages.
This alarm is composed of two parts: the detector and the base station. Mounted into a bath ducky, the detector is using an accelerometer module (H48 from Parallax) to measure the vertical acceleration (Z-axis): the floating duck is following the surface waves of the pool. When an object – a child – fell into the water, it creates waves which are detected by the accelerometer. When the G-force detected is above a threshold, the detector is sending an alert to the base station which triggers an alarm. When the G-force is bellow this threshold, the detector is periodically reporting its status to the base station (about 1 time every 2 seconds). By doing so, the base station is checking the reliability of the link with the detector and this latter, using the Power-Down functionality of the transmitter, is saving every (which is an important consideration for a battery-powered device). All these operation are done by a low power consumption PIC microcontroller (PIC 18F23K20).
The second part of the alarm is the base station, which includes a second RF Transceiver and provides a user interface based on a 2x20 characters LCD display and 4 touch keys. By reading and processing the messages send by the detector, this base station is able to display the detector status, the alarm status and the signal strength (thanks to the RSSI signal). The user can easily navigate through these data using the touch keys which provide a visual and acoustic feedback. When an alert is sent by the detector, the base station is triggering an alarm through a buzzer. All these operation are done by the same microcontroller than the detector.
To ensure the reliability of the system, the wireless link is based on the transmission and reception of fixed length data (1 bytes) in the form of data packets. The data packets consist of a preamble, the actual data byte, and a 16-bits cyclic redundancy check CRC-16-CCITT. The system is also able to detect a low battery level of the detector and report the issue to the user.
As shown on the presentation video, this project is a success. The delay between a motion and the triggering of the alarm is very low (≈ 250 ms) and the 16-bits CRC prevents all false detections. All the other functionalities of the system (signal strength, low voltage detection…) are working. I tested the alarm in a bath tub but further tests need to be performed in situation in order to calibrate the alarm: an issue since I don’t have a pool!