Turn a home sweet home into a smart house. (Use Your PC for Intelligent Home Security, part 1) (includes related article) (Special Anniversary Issue)
by Howard Millman, Mark Wagoner
Want to make a computer happy? Give it something to do over and over again. Let it check a window several times a second to see if it's been forced open, or take indoor and outdoor temperatures and constantly adjust the heat accordingly, or "look" to see if someone's entered a room and then turn on the lights if it's after 7:00 p.m. These are typical activities in a computer-controlled Smart House.
In 1984, the National Association of Home Builders (NAHB), who coined the term Smart House, developed the idea of a computer-controlled home - whether a house, condominium, or apartment - that would allow owners to spend more time pursuing life's rewards and less time performing routine household tasks. The result of that idea is a 40-million-dollar prototype the NAHB hopes will evolve into an industry standard.
In the meantime, the Electronic Industries Association (EIA) is already promoting a competing standard: the Consumer Electronics Bus, or CEBus. The primary difference between NAHB's Smart House and EIA's CEBus is that the Smart House uses a central computer while the CEBus requires individual devices to have on-board intelligence and computers to exchance data with each other through a common language. Generally, the NAHB standard appears well suited to control equipment and processes while the CEBus delivers greater versatility in controlling appliances.
In addition to NAHB and CEBus, existing standards such as X-10 are also clamoring for a piece of this quickly expanding market. X-10 devices are popular because they use the home's existing electrical wiring to carry a superimposed signal that controls lights and appliances. However, a major problem with X-10 is that because they're line-carrier devices, line voltage electrical noise sometimes falsely triggers wired-in appliances.
A Low-Cost, High-IQ
The computer-in-residence system designed by COMPUTE uses a central computer for two reasons: It involves a lower initial cost, and it's easier to retrofit into an existing building, which makes it a good system to use as a model for your own smart house.
COMPUTE's system consists of four elements: sensors to sample physical event such as temperature, light, sound, motion, and heat; analog/digital cards to convert data received from the sensors into digital form so the computer can understand it; a personal computer with compatible control software to analyze and act on the data it receives; and a series of relays to control different pieces of equipment, processes, and appliances. Since many data-acquisition and control (DA&C) functions' are time based, your computer should contain a battery-backed clock and calendar.
This may all sound expensive, but in fact, you can assemble it for less than $600 if you already have a PC. In fact, if you have an old XT collecting dust in the closet, that's the one you should use. Control software that operates the security system is written in BASIC and will run under BASICA or GW-BASIC on essentially and PC, including older ones (see Programing Your Smart House below.)
The first task you'll want to assign your computer is providing perimeter security. According to a recent U.S. Justice Department survey, burglaries are four times more likely to occur in homes without intrusion alarms. In addition to your improved peace of mind and the property protection, an added bonus to having a system is that some insurance companies provide premium reductions for homes protected by security systems. Be sure to check with your insurance company to find out if you're eligible for such a premium. You may want to switch carriers if not.
At some time or another, most any alarm system is going to inconvenience you - and your neighbors - to some degree, usually in the form of nuisance alarms. A major reason for nuisance alarms in dumb alarm systems that "think" every occurrence warrants an all-hands alert. Such systems are usually activated by a solitary event.
Conversely, a smart alarm system will compare data received from its different sources to determine if a verifiable alarm condition exists. The system we've designed here employs two sensor circuits. Circuit 3 on the analog/digital board you'll use monitors windows and doors with magnetic contacts; circuit 4 uses a low-cost passive infrared detector. When the two data-reporting sources independently confirm activity, the alarm will sound.
While you'll design in some safeguards, you should also recognize that excessive caution is undersirable. Too many precautions mean an overencumbered alarm system may not operate when it should.
Installing the Smart
The first step of installing the system is to define the areas of your home you want to include. Depending on the number and type of sensors you choose, the cost of your alarm system components should only total between $20 and $150.
Your computer's interface will remain the same for all installations. Alpha Products' DA&C cards are recommended for their excellent quality, ease of use, availability, and competitive prices, and because Alpha's control software, SMART 1, is included free of charge with orders. However, you should certainly feel free to shop around for what you consider the best components and prices.
One recommended card is Alpha's AR-133 PC bus adapter, which plugs into any available 8- or 16-bit expansion slot of a PC. Also, Alpha makes a CA-162 ribbon cable, which contains two connectors that accept the RE-140 eight-relay output card and the AD-142 eight-channel analog/digital input card, which you'll see.
Circuit 3 on the Alpha AD-142 uses magnetic contacts to detect open doors and windows. For surface-mount contacts, Radio Shack's 49-495 surface-mount magnetic contact works well. For concealed mounting, use Radio Shack's model 49-496 contact. Although circuit 3 appears to have only two sensors, it will accommodate many more, including a glassbreak sensor such as Radio Shack's model 49-521. Circuit 4 uses a passive infrared detector, such as Radio Shack's model 49-531, to confirm an intruder's entry.
Install the sensors in series so that power flows through each one. Since this is normally a closed system, an alarm condition exists if any one sensor "opens." You can install multiple detectors (in the same or different areas) by wiring them into a series circuit.
The RE-140 card, mentioned earlier, governs the output - flashing lights and a siren. Wire the flashing-light circuit to 120-volt output 0 on the RE-140 card.
Connect the siren to low-voltage output 7 on the RE-140. For the external siren alarm, use Radio Shack's 12-volt model, 49-488 or an equivalent model.
Wires for low voltage (outputs 4, 5, and 6) on the RE-140 can be 24 gauge. Use a minimum three-pair cable to allow for future expansion and spares. Wiring between the 120-volt outputs to the light or lights must be at least 16 gauge and rated for 120-volt service. Be sure to install a snubber circuit her, or make sure your electrician installs it, to protect the relay's points against arcing and to protect the computer against stray signals.
Programming Your Smart House
You must have the right software to operate any computer-based security system. You can order a free copy of Alpha's GW-BASIC control software, SMART1, when you buy Alpha components. Data Systems Services also offers an easy-to-use, menu-driven BASIC program for $134. Both companies are listed in the product information box at the end of this article.
Your basic security alarm system should now be complete. That's an there is to it. In January's issue of COMPUTE, you'll learn how to expand the base system you just set up to include two more elements of intelligent home security - temperature control and lighting management.
Your March issue of COMPUTE will conclude the smart house series. There, you'll learn about sophisticated applications that range from using remote control to operate your appliances by telephone to transmitting realtime still video images over ordinary telephone lines to using infrared as well as direct-voice command of your computer's control programming.