Being in control

So that we know what controls we want on our alarm control panel, we need to map out our system with the number of zone inputs and control inputs and outputs. As you'll remember from Chapter 3, Extending Your Pi to Connect More Things we can essentially have up to 16 zones in our system using the two I/O ports on our port expander. We also have the eight GPIO pins at our disposal on the Raspberry Pi board itself. So, let's now allocate these outputs and document them in the table that follows.

I'm going to set up an 8-zone system for my alarm inputs using port A on the I/O expander board, using the native GPIO pins for things such as buttons and alert outputs. One reason for doing it in this configuration is that the system can always fail-safe—so if the expander board fails, the Raspberry Pi can still communicate alerts and buzzers connected to it.

Port

I/O Pin

Label/Purpose

Expander A

0 (A0)

Zone 1 Input (Entry/Exit Channel)

 

1 (A1)

Zone 2 Input

 

2 (A2)

Zone 3 Input

 

3 (A3)

Zone 4 Input

 

4 (A4)

Zone 5 Input

 

5 (A5)

Zone 6 Input

 

6 (A6)

Zone 7 Input

 

7 (A7)

Zone 8 – Anti-Tamper Loop Input

Expander B

0 (B0)

 
 

1 (B1)

 
 

2 (B2)

 
 

3 (B3)

 
 

4 (B4)

 
 

5 (B5)

 
 

6 (B6)

 
 

7 (B7)

 

R-Pi GPIO

0 (GP0)

Arm/Disarm Switch (Input)

 

1 (GP1)

 
 

2 (GP2)

 
 

3 (GP3)

 
 

4 (GP4)

Armed LED (Output)

 

5 (GP5)

Arm/Disarm Buzzer (Output)

 

6 (GP6)

Alarm LED (Output)

 

7 (GP7)

Alarm Bell (Output)

Arming yourself

The terms arm and disarm are alarm system-speak for switching the alarm monitoring on (arming the system) and off (disarming the system). Zone 1 of our system is going to be linked to the arming and disarming part of the system as it will be connected to the sensors on the door that we leave or enter from; this will be a special zone for entry or exit purposes.

When we set the alarm, we need a bit of time to get out of the house. The way that the system knows we've left the property is by monitoring the exit zone to see if we've opened and then closed the front door behind us within the time allowed.

Similarly, when we return, we will open the front door, but we don't want the alarm to go off straightaway—we need a chance to disarm the system within a given amount of time. We will arm and disarm the system via our web-based control panel, or by using a switch of some sort on the input GP0.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.185.34