When my wife and I bought our new home after having lived in apartments and thus making other people rich, some of the first electronic equipment was a few smoke detectors. They were inexpensive, visually mostly unobtrusive, deafeningly loud, alerting each other via radio contact for cross-estate warning, and battery driven.
Well, I said it: battery driven. Battery driven smoke detectors turn into a false sense of security within half a year, because once the batteries run out, you soon learn to forget to change them—especially in the smoke detectors that were purchased which require three double-A batteries and one 9-volt battery. Besides, were it not for the shelf life of batteries versus gold bars, batteries are so expensive that some countries might consider backing their economies with double-A's rather than gold. So eventually we took down the smoke detectors, probably against any recommendations our insurance company might otherwise have given us.
But then who needs batteries? We have wall outlets in every room, and what is the risk that mains power breaks down during a fire before the smoke detectors manage to warn us? Certainly this risk is smaller than having to remember to change the batteries, perhaps unless you suffer from OCD.
Hence, the solution was simple: any electronics tinkerer worth his salt can whip together a power supply, or in the case of our smoke detector, a dual power supply providing 4.5 Volts (corresponding to three double-A batteries) and 9 Volts. A generic 12 Volt wall wart purchased inexpensively over Ebay, coupled with a 78L09 for 9 Volts, followed by a 78L05 and a diode for 4.3 Volts (which is close enough to 4.5 Volts), a few stabilization capacitors, and that was it: solder the output of the voltage regulators to the battery connectors, and our smoke detector would never ask for another battery. The dual power supply could probably be crammed into a single battery compartment, but I happened to have a two small pieces of PCB that I had saved. I hate to throw stuff away.
I was just about to install the improved smoke detector when I realized that smoke detectors are no good if you're away from your house. We already have a network of Zigbee devices scattered throughout our garden for measuring our greenhouse environment, the weather, and radiation level. The Zigbee devices report to a Linux server that is permanently turned on, so it only seemed natural to include a Zigbee radio in the smoke detector so that our server could pick up any warnings and act accordingly (that is, by sending a text message to my wife telling her that the dinner I'm preparing is getting ready).
The "XBee" Zigbee module from Digi is capable of detecting pin changes and sending a pin change notification to another XBee module without any additional electronics. Surely the electronics in the smoke detector would include a signal that indicated the detection of smoke, so it was just a question of locating it, preferably before going deaf while the alarm was sounding.
Fortunately, an obscure German discussion revealed that the on-board microcontroller was an otherwise non-descript KD-5810 half-hidden beneath a metal cover, and someone with little electronics experience seemed to have concluded that pin 7 on the processor went high when the detector was triggered. Right indeed; this—and an additional 3.3 V power supply and a voltage divider to safely feed the 9 V signal on pin 7 to the XBee module—was all I needed. The smoke detector now sits happily on the ceiling in our kitchen, and its companions will be mounted as soon as I have constructed power supplies for them as well. It will not be necessary to put Zigbee radios in the remaining smoke detectors, assuming they will are capable of maintaining their native radio contact with each other.
Yes, I know: it is not too pretty yet. The wire should be hidden beneath (well, above) a wire cover, and the antenna should be white. But it works for now.
I have two spare Spark Cores and I briefly considered using one of those instead. However, I have already built a Zigbee infrastructure, and since I also needed more Zigbee routers to keep the network up, Zigbee became the obvious choice.
Leave a comment