Lessons and the learning game

Low-voltage alarm circuits

How an alarm knows a door opened or a wire was cut: NC loops, end-of-line resistors, zones, sirens, keypads and backup, ending in a four-zone panel.

Take it on /learn as Low-voltage alarm circuits.

A model, not a security system

Everything here runs on 5 V and 12 V, and the panel you build is a way to learn how alarms think. It is not a listed or monitored alarm system, and it must never be the thing that protects people or property. Real intrusion panels are listed equipment (UL in the US), installed by technicians who need a license in many states. Fire alarms are life safety, follow NFPA 72, and are never a hobby build.

The lessons

  1. Normally closed loops: three reed contacts in series hold a MOSFET's gate down. Open a door or cut the wire and the alarm lamp lights; cut a normally open panic button's wire and nothing tells you.
  2. End-of-line resistors: a 4.7k resistor at the far end of the loop makes a healthy zone read 2.50 V, so a burglar's jumper (0 V) gives itself away.
  3. Supervised zones: double end-of-line wiring gives four voltages on two wires: short 0 V, normal 2.50 V, open 3.33 V and cut 5 V.
  4. Sirens and strobes: a MOSFET bell output, adding up the current, and the long thin run that leaves a siren under 6 V and silent.
  5. Keypads and arming: the Uno panel arms away and stay, refuses to arm over an open zone, and gives you an entry and an exit delay.
  6. Battery backup: a 13.8 V charger and a 12 V lead-acid battery on one bus. Pull the plug and the battery current changes sign with no gap.
  7. Boss: a four-zone panel: wire the window's loop, walk test, change the code, bypass a zone, catch a tamper and set your own bell cutoff.

The panel

The boss panel's sketch is alarmpanel. Zones 1 to 3 (front door, back door, window) are DEOL loops on A0 to A2, each with a 4.7k pull-up from 5V. Zone 4 is a PIR on pin 10. The keypad's rows are on pins 9 to 6 and its columns on 5 to 2. A MOSFET module on pin 11 switches the 12 V siren, another on pin 12 the strobe, and the beeper is on pin 13.

Keys What it does
code A arm away, after the exit delay
code B arm stay: the motion zone is off
code (while armed) disarm
code C nnnn change the code
code D n bypass zone n, or put it back
code * walk test on or off
# clear what you typed

The code starts as 1234 and lives in RAM, so a fresh Run starts at 1234 again. The serial monitor takes the same keys typed as a line (1234A), and entry 5, exit 5, bell 20 (seconds) and status.

Stand-ins

  • Every reed's magnet starts 40 mm away, so every door starts open. Drag a magnet under 15 mm to shut it; it lets go again past about 19 mm.
  • A burglar's jumper and side cutters are slide switches.
  • The strobe is a 12 V lamp, which does not flash.
  • A real alarm PIR has a normally closed relay contact you wire into a supervised zone. The PIR part has a logic output, so it goes on a pin.
  • The battery's capacity is cut to 1 mAh in one step so it empties in seconds. Under load a real lead-acid battery falls toward 10.5 V at the end, which the model does not show.