Hardware Reference
In-Depth Information
Example Application
One of the domains where Internet-connected devices are in constant demand
is home security. Most security devices use a home's Wi-Fi connection, but
these devices are vulnerable to attack. For this reason, many security systems
also have a backup GSM system, allowing devices to communicate even if the
physical line to the Internet is severed.
For this application, you will create a system that monitors a door or window.
In the event of this entrance opening, a warning message is sent via text message.
To make sure that the system works, every few minutes a “heartbeat” is sent
to an Internet server. This message is just a small bit of information that shows
that the system works. If the server does not hear from the Arduino within a
certain timeframe, then it knows that something is wrong.
This example uses an Arduino Uno and a GSM shield. One entrance is monitored
by means of a reed switch, button, or other contact-based switch. This switch must
be coni gured as NC, normally closed, and connected to the Arduino's ground.
Normally this would require a resistor to pull either the 5-V power rail or the ground,
but Arduinos have internal pull-up resistors that can be activated in code, and
that is what will be done here. If the door is open, the connection is severed, and
the Arduino's internal pull-up registers an intrusion. Also, if the wires are cut, the
Arduino also registers that as an alert. The schematic is shown in Figure 17-1.
 
Search WWH ::




Custom Search