It is the 1746th of March 2020 (aka the 10th of December 2024)
You are 18.97.9.171,
pleased to meet you!
mailto:blog-at-heyrick-dot-eu
Home alarm idea
I've been thinking about what to do regarding an alarm system here.
What I'd be looking for is a fairly uncomplicated system that has "zones", so the front of the house and the back of the house could be treated seperately. When something is detected, you'll get a time (say, 30 seconds) to go to the control panel and enter the code. If you do, the system will deactivate. If you don't, a bloody loud alarm will sound.
But... more can be done. One idea is to have the alarm system output periodic "active" pulses to the affected zones, which can be picked up by an ESP32 based camera to have it take a snapshot and store it to SD card and, if there's a network connection, upload it to my site.
And as it turns out, you can get pretty cheap GPRS modules that take a standard SIM and hook into the old 2G network. So the system could even send me notifications.
Which means the idea I'm thinking of is something like this:
Rough idea of an alarm system.
The primary power supply will be 12V. It could be routed through a small UPS unit like the one I'm using for the Livebox, so unplugging it won't cause it to stop working.
The heart will be an ESP32 with a keypad and a 2004 LCD panel.
Each zone will consist of four wires. A 12V supply (through a low rated, 250mA? fuse), a ground, a "trigger" (to the controller), and a "zone is active" (from the controller). As it is four wires, telephony cable ought to suffice here.
The trigger will be pulled high, and if the loop is complete (no doors open), it will be connected to ground. If the cable is broken or a switch activates, it'll be pulled up and rise high.
The equipment on the wire is unspecified, suffice to say that everything must be normally closed going open circuit when triggered. So this can be simple magnetic switches or PIR sensors. Or perhaps both?
Once a zone has been triggered, the controller will output periodic (30s?) pulses on the "active" line to tell any attached ESP32Cam to take a snapshot.
To think about - possible damage from 12V if somebody cuts the cable. Should these signals be opto-isolated?
Zone 1 - living room/front. As it'll be a run of wire, there's no need to have the sensors and camera next to each other. It could be possible to embed the camera within the box of the PIR sensor at the back of the room and then have reed switches on the door/windows. Plus, for that run it'll only need a loop of GND and TRIG so a thinner two wire cable (like bell wire) would suffice.
Zone 2 - back kitchen/back. Basically to look after the back door.
Zone 3 - currently undefined, maybe PIR detectors in the outbuildings?
If the unlock time elapses, then a switch (relay? MOSFET?) will switch 12V to a wire connected to a loud alarm unit.
If the GPRS module is fitted, then it can send me a notification text. The module is controlled by AT commands over a serial link.
The buzzer will be to notify of the unlock time. A regular bleeping for the first 20 seconds, fast bleeping for the next five, then non-stop for the final five. Once the main alarm kicks in, the buzzer will go silent.
Anyway, this is what I have in mind...
...now feel free to tell me in the comments why it won't work... before I build it. ☺
Suggestions and ideas welcome too!
Your comments:
Please note that while I check this page every so often, I am not able to control what users write; therefore I disclaim all liability for unpleasant and/or infringing and/or defamatory material. Undesired content will be removed as soon as it is noticed. By leaving a comment, you agree not to post material that is illegal or in bad taste, and you should be aware that the time and your IP address are both recorded, should it be necessary to find out who you are. Oh, and don't bother trying to inline HTML. I'm not that stupid! ☺ ADDING COMMENTS DOES NOT WORK IF READING TRANSLATED VERSIONS.
You can now follow comment additions with the comment RSS feed. This is distinct from the b.log RSS feed, so you can subscribe to one or both as you wish.
Rob, 30th June 2023, 22:02
Definitely need some sort of separation and isolation of the zones. What happens if somebody deliberately shorts your 12V to ground, for instance? Everything will shut down, so no alarm or alerts, and possibly overload the psu/ups too..
Rick, 30th June 2023, 22:36
Hopefully it'll be a rapid shutdown and restart, assuming capacitors don't keep it going...how long d'you think it would take to blow the fuse? (every line will have a fuse on the 12V)
Plus, of course, to get to the wire to mess with it, you'd need to have entered (triggering the system), identified the cable, noticed the power line and ground, then found a way to short them all in the ~30s before the siren kicks in. By which point photos sent, text sent, and...
But point taken, one should assume that if it is there it could be messed with, so fuses on the 12V and some sort of isolation for the signals (as they won't be 12V tolerant!). Would also potentially help guard against induced currents from thunderstorms.
I'll need to get an optoisolator and play with it. Can I weakly pull up a line to 12V in hardware (high value resistor) and then ground it, in such a way that when the connection breaks the line will go high and turn the optoisolator on?
C Ferris, 30th June 2023, 23:22
What are you planning to do with the info gained - would your local police be interested?
Rob, 30th June 2023, 23:39
I think high value resistors can tie a line high or low enough to work, at least as a signal. You could also tie the 12v on the device side of the fuse, via a decent sized resistor or optoisolator, to an input on the controller so as to alert you if a fuse blows for whatever reason.
Zerosquare, 1st July 2023, 02:36
Remember not to neglect the low-hanging fruits. It's easy to get carried away with sophisticated security while overlooking more fundamental weaknesses.
Wearing a balaclava is enough to defeat identification by cameras. And 30 seconds is more than enough for an experienced burglar to silence the siren (either by cutting the wire, or by spraying expanding foam into the horn).
Getting a notification is useful, but if that happens while you're at work, what do you do? Even if you call the police right way, and they agree to investigate immediately (which is already unlikely...), by the time they arrive the thief will probably be long gone.
C Ferris, 1st July 2023, 10:22
Down here there was raids on various farms - very powerful head lamps were used - and things like quad's were dumped in local fields - presumably planning to come back later if no tracker fitted.
C Ferris, 1st July 2023, 10:25
It seemed to hint at some local knowledge :-(
Rick, 1st July 2023, 12:49
Zerosquare - while that is true, I think the main risk here is a simple smash and grab to lift things like televisions (that I don't have...) and whatever else can be fenced off for a quick bit of cash.
The intention is to make the place look like getting in would prevent some sort of... not exactly a challenge, but make it more of a hassle than bothering somebody else. There's nothing of particular value here, I'm not a known celebrity or wealthy, and it's certainly not a bank.
However, even the "roving traveller crowd" (being polite) are likely to be able to tell the difference between a real alarm and a fake one, given there are only so many makes and models of fake alarm. Plus, looking at my local DIY store, the fake alarm boxes cost as much as an actual *real* alarm box. <shrug>
As for the rest of the system - the thirty seconds isn't for disabling the siren, it's to give me time to open the door and get to the control box before the thing triggers. That being said, it's possible to defeat attempts to silence the alarm (by foam) by running two in parallel - they're only around €20(ish) each. As for cutting wires? Keep the wires inside. Sure, the wires from the control box could be cut. But, then, how does the burglar know that doing so won't immediately sound the alarms? Most of the professional systems include an anti-tamper system within the alarm box for exactly this purpose, though the available selection on Amazon is... limited.
The notification is to let me know that something happened. There's not a lot I *can* do, to be honest. But it's a couple of AT commands and a ten euro module. ;-)
David Pilling, 1st July 2023, 13:32
I know I would not make a criminal - I don't think like that and I mean that in a positive sense - a lot of crime shows imagination and hard work. Reading the comments makes me think if I had access to the wiring I would insert a very high voltage, hoping to cause maximum damage. But I'd imagine in reality you're not going to be victim of the mission impossible team. Sending the photos etc via the mobile phone system is a good idea, because knocking out any exposed phone/broadband connection is an obvious thing someone might do. But then if you're in the know, you probably know about mobile phone enabled burglar alarms. As with many things it would be interesting to know what they do... Hey ChatBot, how to burgle a house.
C Ferris, 1st July 2023, 13:33
Ancient Egyptian saying - a lock keeps a honest person out :-)
Humbly suggest you don't make your place look expensive.
Rick, 1st July 2023, 14:30
Nor I, David. My thinking is that of an engineer. "Okay, I've designed this, how can I break it?".
Again, I think the Micky Rourke was doing the rounds to case places, look at what might have been of value.
Not making my place look expensive? Hehe, I was living Wreck Chic before such a thing became trendy. Heating? Nah. Wall mounted telly? Nah. Door that doesn't include built in draughts? Nah. Double glazing? Nah.
Even the wallpaper is from the sixties. Thankfully the previous owners had taste, so it wasn't that psychedelic mindscrew that you often see in French buildings (my notaire's office used to look like the waiting room from Twin Peaks). A neighbour proudly boasts interwoven designs in lurid yellow and magenta. I can't go there, I keep trying to follow the yellow until I reach the exit...
Rick, 1st July 2023, 14:32
I don't imagine the police would turn up anyway. I think they're maybe just a little busy right now...
Rob, 1st July 2023, 17:41
As an aside... I set up two cctv systems for a relative some years ago. A simple camera+DVR initially, and later a couple of IP Cameras with a PC based recorder. Bloody idiot moved out and left it all behind, before telling me, and the flat got broken into *the next day*. They smashed the cameras, and stole the PC and DVR. I'd set up the PC to backup to the net, but he didn't have internet beyond a mobile phone, so it wasn't active and we never got to see who did it..
Anon, 3rd July 2023, 17:18
Rather than a fuse on the 12V supply, use a "polyfuse" instead. This will go high impedence if the load exceeds a certain amount, but will revert to low impedence once the fault condition is cleared. Basically a self-resetting fuse.
This web page is licenced for your personal, private, non-commercial use only. No automated processing by advertising systems is permitted.
RIPA notice: No consent is given for interception of page transmission.