home |  electronics |  toolbox |  science club |  tuxtalk |  photos |  e-cards |  online-shop


By Guido Socher


An Ethernet based alarm system



Many alarm system for buildings use dedicated wiring. They are often just alarming and monitoring one single building.

Using Ethernet and IP we can re-use the existing network in a building (local LAN) for the alarm system. This has especially advantages when a whole campus with several buildings or units in different locations needs to be monitored. For larger distances the public internet can be used as a transport media.

The idea was brought up by a customer who wanted to build an earthquake monitoring system which reports alarms from "P-wave" sensors (seismic wave sensors) several hundred kilometers away to a central server. From there actions can then be taken to e.g park elevators in a save position and shut them off before the wave hits the building.

_________________ _________________ _________________


How it works

Alarms are reported by little tuxgraphics ethernet boards to a central sever. The boards do alarm on contact open or contact close dependent on the needs. Each of the boards gets a name that it reports together with the alarm message. This will help to identify the cause/location. The name can e.g be building "section-42". The central sever is e.g a linux PC. All it needs is a network card and the ability to run perl code. The actual server code is a small perl program. It was done this way to make it easy to adapt the code.

alarm system

Layout of the alarm system with ethernet boards connected via different networks.

The central alarm server maintains not only a log of all the alarms but has the possibility to execute other commands.

In the simplest possible case it would e.g update a web page with the alarm information and send an email (e.g using the unix Mail command). It can as well use other tuxgraphics ethernet boards with the "ethernet remote switch application" software loaded to switch something on or off (e.g switch on a siren).  

Different alarm servers

In the download section you find as part of the avr ethernet board code in the sub-directory "servers" three different servers.


Let's talk

The communication protocol for the alarm system is UDP. The main reason for using UDP was speed. As I mentioned this was build as a earthquake response system. The seismic waves travel roughly at the speed of sound. There is no time for the 3-way handshake which is required to setup a TCP connection and then send the actual data. You want a system that responds in a few milliseconds. The internet's routers and server may as well fall apart just a few milliseconds after the seismic wave hits the area where the sensor is. By using UDP packets we can achieve very low latency.

Security within the alarm system is maintained by using a shared secret (aka password) between ethernet boards out in the field and the central server. Only messages that contain a valid shared secret are processed by the central server. This should provide a sufficient level of security for most applications.

The central alarm server has to be reachable via a static IP address. DNS look-up would be way too time consuming. The server does not have to physically sit in at an ISP. It could be connected even via DSL as long as your ISP assigns you a static IP. Many regional ISPs do that for a small extra fee (e.g 5 dollar per month).  

Other applications

This alarm system has a few properties which make it usable in many areas not only as a home alarm system or earthquake response system. It is based on small robust and independent tuxgraphics ethernet boards sitting somewhere. All they need is power and some kind of network connectivity to a nearby IP network or DSL router. These boards can then report events at the speed that IP packets travel through the wire.

It's a simple, robust and flexible system made to be tailored according to your ideas.

Applications for this could be not only alarm and monitoring systems. You can use it e.g in a production system to report statistics and environmental parameters.  

User interface

The advantage of using an IP network for the connectivity of the alarm sensors is that you can easily get a remote management interface. We run on the ethernet board in addition to the alarm reporting software also a web server. This gives us an easy to use management interface for the remote units.

remote management

Remote management and configuration.

checking the alarm system manually

Checking the alarm system manually.



© Guido Socher, tuxgraphics.org

2010-02-20, generated by tuxgrparser version 2.57