Intruder alarm system controller — AVR
A simple intruder alarm controller I build and used in my old apartment. Uses an AVR ATtiny2313 microcontroller.
Table of contents
I build this intruder alarm controller for my old apartment. It had two modes; away and armed. It was activated either with a key switch, or using the Security keypad with programmable PIN module.
When the key switch was turned, a green and red LED started to toggle back and forth. If the key was turned back on green, the away mode would activate, if on red then the system would arm. The key switch and LEDs was mounted in status panel that I had in the apartment.
This mode had no alarm function. It just turned off the apartment lights, put the system in mute (no audible system failure alarms) and turned off the status panel that I used to control everything in the apartment.
The intruder alarm controller just activated inputs on other controlling modules (like Light control unit and Multi-purpose module 1), that would, in turn, actually turn off and mute alarms and lights.
If it was dark in the apartment then the light turned on automatically if there was movement in the hallway.
When activated; the system counted down 60 seconds for me to leave the area. During this countdown the alarm and the green LED was flashing and a buzzer gave short bursts.
The alarm would not arm if either the alarm or tamper input was triggered after counting down. If the tamper input was triggered curing the countdown, the buzzer switched to long bursts.
When the alarm was tripped I had 30 seconds to deactivate, or the siren would sound. The alarm and red LED flashed quickly, and the buzzer gave long signal bursts. If the tamper circuit was broken, the siren sounded instantly.
If it was dark in the apartment, the light will turn on (via. Light control unit). The alarm LED would stay lit if the alarm had been tripped, until the system was armed again.
- PD0 Key switch N.O
- PD1 Key switch N.C
- PD2 Alarm trigger N.C
- PD3 Buzzer override
- PD4 Trigger mode 1
- PD5 Trigger mode 2
- PD6 Tamper N.C
- PB0 Alarm LED
- PB1 Green LED
- PB2 Red LED
- PB3 Buzzer in Rack box status panel
- PB4 Siren
- PB5 Lights out to Light control unit
- PB6 Away mode relay
- PB7 Life-signal (to Module stability monitoring unit 2)
- In 1 (Key switch N.O)
- In 2 (Key switch N.C)
- In 3 (Alarm trigger N.C)
- In 4 (Buzzer trigger)
- In 5 (Trigger mode 1)
- In 6 (Trigger mode 2)
- +12V Status LED
- In 7 (Tamper N.C)
- Out 1 (Alarm LED)
- Out 2 (Green LED)
- Out 3 (Red LED)
- Out 4 (Buzzer in Rack box status panel)
- Out 5 (Siren)
- Out 6 (Lights out to Light control unit)
- Out 7 (Away mode relay)
- Out 8 (Life-signal)
- Bascom-AVR source is available in a git repository:
- 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