Intruder alarm system controller

From CaveLab
This page is kept for historical interest. It may document projects or methods that are obsolete and/or no longer relevant. The information here is not kept up-to-date.

This module was part of the rack box project — which was terminated when I moved out of my first apartment.
ALU installed in the Rack box

ALU is a alarm central unit with two modes, see below. They can be activated with a key switch on the Rack status panel, when the key is turned green and red LED will toggle. If the key is turned again on green LED mode 1 is activated, and on red LED mode 2. Both modes can also be activated and deactivated from the User panel for alarm.

Modes

Mode 1

Away mode, this has no alarm function. When active the Rack status panel is turned off, system mute is active and lights in the apartment is turned off (via. Light control unit and Multi-purpose module 1). If it's dark in the light will turn on automatically if there is movement in the hall (via. Light control unit).

Mode 2

When activated the system counts down 6o seconds for you to leave the area. During this countdown the alarm LED and the green LED is flashing, short bursts from the buzzer. If a alarm or tamper input is active the alarm can not be turned on. If tamper should be activated during the countdown the buzzer will give long signals. When the countdown is complete the alarm is armed, the Rack status panel turns off, system mute is activated and the apartment lights is turned off (via. Light control unit).

When the alarm is triggered you have 30 seconds to deactivate, or the siren will sound. The alarm LED and red LED flash fast, long signals from the buzzer. If the tamper circuit is broken the siren will sound instantly. If it's dark in the light will turn on automatically if there is movement in the hall (via. Light control unit). If the alarm has been tripped the alarm LED will stay on until the alarm is activated again.

I/O

Inputs

  1. PD0 Key switch N.O
  2. PD1 Key switch N.C
  3. PD2 Alarm trigger N.C
  4. PD3 Buzzer trigger
  5. PD4 Trigger mode 1
  6. PD5 Trigger mode 2
  7. PD6 Tamper N.C

Outputs

  1. PB0 Alarm LED
  2. PB1 Green LED
  3. PB2 Red LED
  4. PB3 Buzzer in Rack status panel
  5. PB4 Siren
  6. PB5 Lights out to Light control unit
  7. PB6 Away mode relay
  8. PB7 Lifesignal (to Module stability monitoring unit 2)

D-Sub 9 pin

Connector 1

  1. 5V
  2. 0V
  3. In 1 (Key switch N.O)
  4. In 2 (Key switch N.C)
  5. In 3 (Alarm trigger N.C)
  6. In 4 (Buzzer trigger)
  7. In 5 (Trigger mode 1)
  8. In 6 (Trigger mode 2)
  9. +12V Status LED

Connector 2

  1. In 7 (Tamper N.C)
  2. Out 1 (Alarm LED)
  3. Out 2 (Green LED)
  4. Out 3 (Red LED)
  5. Out 4 (Buzzer in Rack status panel)
  6. Out 5 (Siren)
  7. Out 6 (Lights out to Light control unit)
  8. Out 7 (Away mode relay)
  9. Out 8 (Lifesignal)

Source code

Git-alt-brands.svg
Bascom-AVR source is available in a git repository:
https://github.com/thomasjsn/AVR-Intruder-alarm

Gallery

Schematic drawing

Intruder-alarm-circuit-46xxv4.png

Parts list

Qty. Part
1 × AVR ATtiny2313-20PU, DIL-20, 20 MHz, 18 I/Os
1 × Capacitor, aluminium electrolytic, 10 µF, 25V
1 × Capacitor, ceramic, 1 nF, 100V
1 × D-sub soldering cups, 9 pin female
2 × D-sub soldering cups, 9 pin male
1 × DIL socket, 20-pin, 7.62mm
1 × Enclosure, plastic (1591 FL), 120x65x40mm, flange
1 × Fuse 5x20 mm, 400 mA, fast-acting
1 × Fuse holder, open, PCB, 5x20mm
1 × Fuse holder, open, PCB, Protective cover
1 × LED 5mm coloured clear, Green, 2.1V, 20mA, 30mcd, 10°
2 × LED 5mm, Red/Green, 2.0 2.1V, 10mA, 100 63mcd, 30°
3 × LED holder 5mm, Black plastic
1 × LED lamp 5mm, Red, Ø8.0mm, 12V, 20mA, 15mcd
32 cm2 PCB, stripboard, 100x160mm, 160cm2
10 × Resistor, carbon film, 0.25W, 330 Ω, 5%
9 × Resistor, carbon film, 0.25W, 4.7 kΩ, 5%
7 × Resistor, carbon film, 0.25W, 10 kΩ, 5%
2 × Spacer, round unthreaded, 3mm, Ø6mm, Delrin
21 × Straight pin header, female, Single row, 2.54mm
23 × Straight pin header, male, Single row, 2.54mm
8 × Transistor, NPN, 100 mA, 45V, 0.5W, BC547B