Table of Contents
- Understanding Alarm Zones
- Components Required
- Supervised Zone Wiring
- ESP32 Zone Logic
- GSM SMS Alerts
- Web Dashboard
- FAQ
Understanding Alarm Zones
A professional multi-zone alarm control panel divides a building into independent zones that can be individually armed, disarmed, or bypassed. Zone types: Entry/Exit (30-45s delay for arming), Perimeter (instant alarm when armed), Interior (active in full-arm mode only), 24-hour (always active: panic buttons, smoke detectors). The ESP32 dual-core processor handles sensor polling on Core 1 and network communication on Core 0 simultaneously, avoiding the delays that plague single-core Arduino security systems where SMS sending blocks sensor polling for 15-30 seconds.
Components Required
- ESP32 DevKit v1 (Rs 350-500)
- 4.7k ohm EOL resistors for supervised zones
- NC reed switches for doors/windows, PIR sensors for motion zones (Rs 80-150 each)
- 12V/2A PSU + 7Ah sealed lead-acid battery for backup
- SIM800L GSM module for SMS alerts (Rs 200-350)
- 12V siren/hooter (Rs 200-500), 4×3 keypad, 16×2 LCD I2C display
Supervised Zone Wiring
Supervised zones use EOL (end-of-line) resistors to detect wire cuts in addition to open/close. NC sensor + 4.7k EOL in series: panel sees 2.35V normally. Open sensor = 5V, cut wire = 0V, short = 0V immediate. ESP32 ADC reads voltage and classifies each state distinctly. Wireless sensors (433MHz, Zigbee) supplement wired zones for retrofit installs in Indian homes where running wires through thick masonry walls is difficult.
ESP32 Zone Logic
enum ZoneState { SECURE, OPEN, TAMPER };
struct Zone { int pin; const char* name; ZoneState state; bool armed; };
Zone zones[] = {
{34,"Front Door",SECURE,true},
{35,"Kitchen Window",SECURE,true},
{32,"Living Room PIR",SECURE,true}
};
void checkZones(){
for(auto& z : zones){
if(!z.armed) continue;
int v = analogRead(z.pin);
if(v > 4000) z.state=TAMPER;
else if(v > 3000) z.state=OPEN;
else z.state=SECURE;
if(z.state!=SECURE) triggerAlarm(z.name);
}
}
GSM SMS Alerts
SIM800L connects to ESP32 via UART (TX/RX). Use Jio or Airtel prepaid SIM. AT command sequence: AT+CMGF=1 (text mode), AT+CMGS=”+91XXXXXXXXXX”, message text, 0x1A (send). ESP32 can alert multiple numbers (family, security guard) stored in SPIFFS. Telegram Bot API notifications over 4G data are faster and more reliable than SMS in most Indian cities.
Web Dashboard
ESP32 built-in Wi-Fi enables a local web server with WebSocket push for real-time zone status. Integrate with Blynk (free tier: 2 devices) or Home Assistant MQTT for remote monitoring. For battery backup, the 7Ah SLA at 200-400mA quiescent draw provides 17-35 hours standby. Use LM317 or dedicated SLA charger IC to maintain float charge at 13.6-13.8V.
Frequently Asked Questions
How many zones can ESP32 handle?
ESP32 has 18 ADC-capable GPIO pins (32-39) for supervised analog zones, allowing 8-12 wired zones. For more zones, use I2C PCF8574 port expanders (8 digital inputs each, Rs 30-50) or run multiple ESP32 units communicating over MQTT to a central server.
Supervised vs unsupervised zones – what is the difference?
Unsupervised zones detect only open/closed states. Supervised zones with EOL resistors detect wire tampering (someone cutting the sensor wire). For IS 16800 compliant Indian CMS-connected systems, supervised zones are required.
How long does a 7Ah battery provide backup?
At 200-400mA quiescent draw (ESP32 + LCD + sensors), a 7Ah battery provides 17-35 hours standby. During alarm (siren at 500mA-1A), 7-14 hours. Maintain battery with proper SLA float charger at 13.6-13.8V.
Can I integrate existing third-party alarm sensors?
Yes – any NC contact sensor works regardless of brand. Verify sensor current draw and calculate total zone current to size your 12V supply. EOL resistor technique is universal across all NC-contact sensors.
Add comment