lbenson
Senior Member
Since this thread is about a security system, I’ll start with a disclaimer:
Use or modify the accompanying code as you wish. It is not guaranteed or warranteed to be suitable for the protection of persons or property.
USE AT YOUR OWN RISK!
This is another version of the picaxe web server that I wrote about here (see that thread for more details about the “table-driven” program): http://www.picaxeforum.co.uk/showthread.php?25050-Picaxe-Web-Server-Water-System-Monitor-and-Controller
This picaxe web server models the monitoring of 10 sensors—8 windows and 2 doors, with the windows configured as zone 1 and the doors as zone 2. The outline of the building is roughly shown in ASCII art, and the condition of the sensors is shown with colored indicators.
The system could use standard open/closed sensors, which are ordinarily “normally closed”. Instead it implements a version of “Fully Supervised Loop” (“FSL” monitoring, with resistors in the control panel and in the sensor which allow different conditions to be detected with ADC.
Various FSL implementations are possible. This uses 4 resistors with “normally open” sensors to detect 5 conditions, of which 3 represent wiring faults or tampering. The conditions are—Line to sensor cut, positive line to sensor externally grounded, lines to sensor shorted, sensor closed (e.g., window open) and sensor open (window closed). The resistors used are subject to modification, but I used the following
With a 5 volt power supply to the picaxe, the resistors shown will give the following nominal voltages and ADC readings:
The color coding on the web page is as follows: Black=positive sensor line shorted to external ground; Grey=lines to sensor shorted; purple=lines to sensor cut; Red=window/dooropen (sensor closed) when alarm is armed; Green=window/door closed (sensor open) when alarm is armed ; Orange=window/door open (sensor closed) when alarm is disarmed); Lime=window/door closed (sensor open) when alarm is disarmed.
The system, as configured, has 4 display states—alarm off, zone 1 armed, zone2 armed, and zones 1 and 2 armed. The image shown above is disarmed (alarm off), with open doors/windows showing orange, and closed showing lime.
The first attached image shows both zones armed, with the open doors/windows changing to red, and closed changing to green. The second attached image shows only zone 2 armed, with the correctly wired windows showing lime and the doors (Zone 2) showing red and green.
Note that security is a relative term when one is talking about a web-enabled device. This application uses a "pin" to keep the web page form name from being too easily guessed, but any security provided by the “pin” used in this application could easily be compromised if your network were compromised, or if your wifi was insecure, allowing snoopers to eavesdrop. On the other hand, many companies are starting to market web-enabled home security systems. Most employ more powerful devices which are better able to provide security than the picaxe--but how well is it implemented?
Use or modify the accompanying code as you wish. It is not guaranteed or warranteed to be suitable for the protection of persons or property.
USE AT YOUR OWN RISK!
This is another version of the picaxe web server that I wrote about here (see that thread for more details about the “table-driven” program): http://www.picaxeforum.co.uk/showthread.php?25050-Picaxe-Web-Server-Water-System-Monitor-and-Controller
This picaxe web server models the monitoring of 10 sensors—8 windows and 2 doors, with the windows configured as zone 1 and the doors as zone 2. The outline of the building is roughly shown in ASCII art, and the condition of the sensors is shown with colored indicators.
The system could use standard open/closed sensors, which are ordinarily “normally closed”. Instead it implements a version of “Fully Supervised Loop” (“FSL” monitoring, with resistors in the control panel and in the sensor which allow different conditions to be detected with ADC.
Various FSL implementations are possible. This uses 4 resistors with “normally open” sensors to detect 5 conditions, of which 3 represent wiring faults or tampering. The conditions are—Line to sensor cut, positive line to sensor externally grounded, lines to sensor shorted, sensor closed (e.g., window open) and sensor open (window closed). The resistors used are subject to modification, but I used the following
With a 5 volt power supply to the picaxe, the resistors shown will give the following nominal voltages and ADC readings:
Code:
Line(s) to sensor cut: 5V, 255
Normal sensor-open position: 4.2V, 218
Normal sensor-closed position: 2.7V, 138
Sensor lines shorted: 0.7V, 39
Positive line to sensor grounded: 0V, 0
The system, as configured, has 4 display states—alarm off, zone 1 armed, zone2 armed, and zones 1 and 2 armed. The image shown above is disarmed (alarm off), with open doors/windows showing orange, and closed showing lime.
The first attached image shows both zones armed, with the open doors/windows changing to red, and closed changing to green. The second attached image shows only zone 2 armed, with the correctly wired windows showing lime and the doors (Zone 2) showing red and green.
Note that security is a relative term when one is talking about a web-enabled device. This application uses a "pin" to keep the web page form name from being too easily guessed, but any security provided by the “pin” used in this application could easily be compromised if your network were compromised, or if your wifi was insecure, allowing snoopers to eavesdrop. On the other hand, many companies are starting to market web-enabled home security systems. Most employ more powerful devices which are better able to provide security than the picaxe--but how well is it implemented?
Attachments
-
78 KB Views: 20
-
78 KB Views: 13
Last edited: