Burglar Alarm.

the old fart

Senior Member
I could buy a ready made unit, but where's the fun in that.

I'm thinking of using a separate keypad with display, about 3M away from the main control box.

1off AXE124Y 20x4 OLED with 1off SEN040 keypad, and a few flashy LED's.


The main control box would be;
1 off AXE022P prototype board
1 off AXE014X2 40X2 chip
1off DB3232 rtc
eeprom for message storage.


Hardwire of about 20 doors, windows and garage.
A couple of PIR sensors.

Thought about using the ADC pins to monitor the sensors, using resistors at the sensor, to give a 2.5VDC return.
Multi level control levels, off, garage, main door and windows, all on.


I've not used #slot command before, but presume that I could use #slot0 for main program, #slot1 for interrogation, #slot2 for setup and testing.


Any suggestions or pointers gratefully received before I order the parts from techsupplies.

I have done a 'burglar' search.


thank you
 

premelec

Senior Member
I think you'll want a sound player that hisses and says noxious gas is being released and plays loud old fart noises... possibly even release smelly gases from a tank - should get the burglars out faster... the regular stuff is available from all sorts of places as there are so many systems in place - making it look and act strange compared to standard systems should be an added deterrent.
 

Dippy

Moderator
All you need for that is controlled Whoopee Cushion.

You might like to spend a little extra time with a coffee and post an overall schematic. It'll help you design a better system... you've forgotten the anti-tamper loop, so is there anything else you should add?
Why use slots? What's wrong with a normal PICAXE and subroutines?
And with long wires you may have to give some consideration to filtering and good quality power supply, not some cheapo Chinese noisy thing.

What alarm outputs will you have? Battery backup?
Maybe you'd like to add smoke/heat alarm too?

Have another think and get drawing - it'll concentrate your mind before everyone chips in.
You'll have to make this dead reliable or else you'll just make a PICAXE powered Nuisance Machine.
 

hippy

Technical Support
Staff member
Before diving in it is probably worth deciding on a detailed operational specification, defining how it will work in practice and what capabilities it will have.

I would suggest a vero-board or strip-board design over using the AXE022P as you are likely going to need some means of adding on extra circuitry anyway, even if that is mostly resistors and connectors. The AXE201 28X2 module is something to consider if you don't want to have to build the core circuitry -

http://www.techsupplies.co.uk/AXE201
http://www.techsupplies.co.uk/ICH028W

On the issue of clever sensor arrangements and other enhanced features it's worth asking if necessary or worthwhile. Extra capabilities slow down development, may be for little gain, and even make things overly complicated.

Unless it's commercial property or you are a celebrity it seems unlikely that anyone would be trying to bypass sensors to enter the property without setting off the alarm, more likely that you want to be warned that windows have been left open when going out and protect against traditional break-in burglary.

If you are worried about bypass attacks you have to also consider what happens when the power is cut and that can also apply to opportunistic burglary which takes place when there are power cuts. A decent burglar alarm has to have a good system design as well as an implementation.
 

john2051

New Member
Hi, According to the control panel we've just bought, all the pir sensors are active high 5volts. That should make interfacing easy.
The one thing that stopped me building my own, is the 'insurance company'.
They told us if it isn't n.a.c.o.s approved, as far as they are concerned you don't have one.
Kill joys or what! I've seen commercial panels that look like they were designed by a ten year old delinquent with
a budget of a fiver. Yet some of these are several hundreds of pounds!
I would think an alarm panel with intelligent keypads would be a superb project for a picaxe.
I look forward to seeing how your project goes, afterall if an alarm is well designed, hopefully you won't need
the insuance cover!
regards john
 

the old fart

Senior Member
@Hippy,

The power supply I'm intending to use is a backup '12v sealed Lead acid battery'. possible 7Ahr.


230v----transformer----SLAB charging circuit----battery----12/5 regulator-----picaxe circuit.

external sounders 12vdc.


I'm looking for a SLAB charging circuit, picaxe based, must be one somewhere on this site...

Veroboard and terminals will be a must for connections.


I expect this project to take weeks instead of days, still I have plenty of time.



I'll try and make a floor plan and post it soon.
 

SAborn

Senior Member
All good and fine to point out the pit falls of a home built alarm system, but it can be a greater step forward with a picaxe alarm, than no alarm at all.

I do agree with a reliable system or false triggering will only be annoying to yourself and sourounding people.

A 12v SLA battery is normally kept to a float charge of 13.8 volts and bulk charged to 14.2 max, so its rather easy to charge the battery, all you need to watch is current limiting, so not to exceed the power supply rating.

Many early alarms just used a LM317 voltage reg at 13,8v and a 5w resistor for current limiting for SLA charging, some even used a 5 watt light globe in parallel as a current limiter.

Can i suggest you download PCBexpress, as it has a schematic drawing software (free) that is rather basic that even Old Farts like ourselves can use, without a degree in computer design to undestand how to use the package.

http://www.expresspcb.com/expresspcbhtm/download.htm
 

Dippy

Moderator
"how old are all the 'old farts' - I'm 60".
- well I guess it depends on others.
If I were 18 you'd be ancient. But as I'm over 40 I'd class you as 'experienced' - how's that for diplomacy?
I would guess that most of the regulars here are quite old - as they seem to post very often so must have a lot of spare time. e.g. retired.
Or they are spending too much time on the Company PC (addicts).


Back to the plot...

Not only will false alarms be annoying but you could end up with the 'car alarm' effect - where it gets ignored and the neighbours complain.

How much of this will you (we :) ) be designing?
I'm pretty sure there will be some PICAXE controlled charger circuits and guidelines in some of the popular solar projects.
As SABorn says, it's quite easy (in principle) to make a charger though do look at battery manufacturer's guidelines.
Be careful with battery choice. In my limited experience of long term floaty things you DO get what you pay for and going 'cheap' can be a false economy. Remember, this unit will spend a long time in float mode. Some people may recommend a different battery technology.


And be careful about powering a sensitive circuit post-charger... especially if you plan on making a home-made charger or if you use a 50p 'bargain'.
What about mains protection and filtering?.

Loads to think about so I think it's time for OFart to cogitate and flesh out the design rather than feeding us snippets ;)
 

Roman505

Member
Not only will false alarms be annoying but you could end up with the 'car alarm' effect - where it gets ignored and the neighbours complain.
More the starting point than the ending. In my observation alarms for cars and houses are universally ignored. One near a place I formerly lived an alarm went off occasionally. The third time in a year I went over and found their fuse box and disconnected power. This seemed to discombobulate the alarm which fell silent (odd), I waited ten minutes before reconnecting power whereon the alarm remained calm. Perhaps I helped a burglar escape? I have no idea and did not care for the sake of my wife sensing and passing on peace and goodwill.

I suggest that any burglar alarm have a voice synthesiser which says "Thank you for your photograph." and for extra points, "Would you like a copy on your Facebook page as well?"
 

the old fart

Senior Member
Loads to think about so I think it's time for OFart to cogitate and flesh out the design rather than feeding us snippets ;)
Hi Dippy,

Nothing designed just yet, just collecting peoples thoughts.

I've installed 3 home brew systems over the past 40 years, want to make this one the last and best.
This one will be in a 3 bedroom bungalow with detached garage/workshop.

Thoughts:

Control Panel; OLED 20x4
key pad control with various 'level' controls.
level 0- OFF
Level 1- Just the garage doors and windows.
Level 2- Level 1 plus Home doors and large windows.
Level 3- Level 2 plus all windows.

i.e.
code 12340 -- switch off
code 12341 -- set level 1
code 12342 -- set level 2
code 12343 -- set level 3
code 999 -- activate alarms

Pir's I'm not sure off, but on level 3 if fitted. or even a level 4 ;)

Selectable front and rear door chime. picaxe have some built in tunes that should drive the wife over the edge.

I already have a multiple smoke alarm system, so could link that into the system.

Panic buttons, would also look at portable 'fall over' alarms linked to panel, for when TheOldFart gets older.

All sensors fed back individually to picaxe, for fault finding, reporting.

Walk test of all sensors.

Storage of 'incidents' stored on eeprom for read back on OLED display.

Internal sounder, external sounder on 20min cutoff, think that's the law.

Link to auto telephone call, that'll be the tuff one. any ideas.

Back up battery/charger/voltage regulator on order.
Picaxe parts order today,

sensors later..

TOF
 

JimPerry

Senior Member
As another retired 62-year-old "Old Fart" who knows a lot about alarms ...

Re: Dippy and ignoring alarm - My project at holiday caravan involves a cheap PAYG Samsung mobile (because it has a "press 3 times for panic function), Picaxe and 2 RC servos cobbled together in a small box to send a TXT to my mobile (+ 2 others if needed) when alarm activates - still in progress - but all the parts work fine. Main alarm, which is installed and working, is a recycled commercial Scantronic with remote keypad. :rolleyes:
 

Dippy

Moderator
Oh we all know a lot about alarms Jim ;)

Quite a list OF.

But you're getting ahead of yourself here with all your codes and levels. That's next month's task.
You need to produce some kind of system diagram. And then go into detail of each part.
The better the drawing the better the help as reading a great pile of text is tricky.

If you start with a sketch and modify you can generate a system schematic which everyone can understand .. remember not everyone has hours per day to read your descriptions.

As far as the auto phone thing is concerned; who will it phone? Do you want an approved Autodialler (Google it)?
Yes, you could make a home-made one (with help) but it wouldn't be approved and, assuming it didn't foul up the system, if you started phoning PC Plod with it he'd come round and beat you up :)

1. System.
2. Details of each part and explain your thinking.
3. Sketch, think, modify and post.

With clear requirements people can help quickly and efficiently. Remember; rubbish in, rubbish out.

There are many drawing packages out there free of charge. And even a reasonable drawing package is easy to get. Even Serif's Drawplus or PagePlus is available for a tenner.
http://www.serif.com/home/ - click the big red thing "End of Year extravaganza".
 

the old fart

Senior Member
Is this what your looking for?




Separate cables from each sensor to control box, and hopefully individual inputs to 40X2 chip.
Garage will be an ADC balanced input into due to external wiring.



First part: power supply.

[12v 600mAh SLA charger]--------------[7Ah battery]---------[----[12v to 5v regulator]
.....................................................................................[----[12v to 5v regulator]
.....................................................................................[----[12v supply fused ]

I plumped for a proper Yuasa power charger, not cheap but battery needs proper charging and maintaining.
7 Ahr SLA battery should supply for quite a while, (could monitor battery voltage via picaxe adc 20K/10K resistors)
first regulator for picaxe / oled, in case sensor wires ground out, alarm box still powered.
2nd regulator for sensors
12v supply to uln2803's as needed for alarms / lights.

A wiring diagram would be of no use, one sensor one cable, but a detailed itemization of the control box will be a must,once I get it put together.

to save pins I'm going to try using the keypad as an adc input, re an Andrew brightspark project in 2007.

Could I run 2 20x4 oled displays from the same picaxe pin?
 

Dippy

Moderator
No, that's a plan of your house.

Here's a real quick example... I've got to go to pub so this is a bit rough and ready.
Burglasex.jpg

Obviously the more you buy (rather than make) the simpler it is to draw (and assemble).
Basically a GA (General Assembly) is a schematic overview and you number the separate bits and then each sub-section (e.g. a PSU schematic) is in a separate drawing.

Doing a drawing helps you to spot your omissions and cock-ups - and allows us to understand the layout in 10 minutes rather than 10 hours plus 20 questions :)
 

Paix

Senior Member
If you have much in the way of 12V being regulated to 5V, then you might like to consider small switch mode regulators to save you wasting 7/12 of your power heating the regulators.
 

rossko57

Senior Member
I'd have thought you'd want the sounders, sense wiring etc. to be 12v based - this would allow you to use standard commercial stuff and cater for PIRs etc in future
 

the old fart

Senior Member
I'd have thought you'd want the sounders, sense wiring etc. to be 12v based - this would allow you to use standard commercial stuff and cater for PIRs etc in future
External sounder/light is in 'yellow', 12vdc.

From a previous post, PIR switched 5v.
No PIR shown on diagram, only sensors.
 

the old fart

Senior Member
No provision for Tamper and SAB (Self Activating Bell) for external alarm :confused:

Was going to use split voltage for vulnerable circuits, input to ADC.
Internal circuits will run through the loft, no access.
SAB, thinking on that..thanks for suggesting it.
 

Dippy

Moderator
That's much clear me old Fart. And do you see how it's made life easier for others to see what you've forgotten and then contribute?
And once you have finalised that you (I mean 'we') can start looking at designs for elements such as sensor interfaces etc.

The anti-tamper loop isn't just for cut wires, it's also for seeing if someone has knocked the front off a PIR (for example).
In my case ,many years ago when I spent 6 months installing, a plasterer accidentally did that.
And for some bugger trying to sabotage your bell-box in which, of course, you will have anti-foam sensing too.

I deffo agree with SAB and using suitable power for commercial devices.


I had to do a double-take of '6' on the schematic - I thought it was connected to the Gents' Toilet.:)

Have you sorted the autodialler yet? Who will it phone?
 

the old fart

Senior Member
Pir's are not, at the moment, on the plans. If 12v is needed then would be simple to interface to picaxe. I have 8 I/O free for expansion.

I did have an auto dialler, buried somewhere in the garage, will have to dig it out.
Would use it to dial my mobile, wifes mobile, close by relatives.
You ring back to cancel the autodialler moving onto the next number.
Or I might use something totally different, ie mobile phone.

Loads of paperwork
 

hippy

Technical Support
Staff member
From a previous post, PIR switched 5v.
No PIR shown on diagram, only sensors.
Was going to use split voltage for vulnerable circuits, input to ADC.
Internal circuits will run through the loft, no access.
Not sure I understand what all that means.

Burglar alarm PIR's are usually powered sensors, normally requiring a six-core connection, 0V and 12V, with a two contact normally closed 'tamper' switch and a two contact normally open 'activated' switch.

Door and window open/closed sensors and panic buttons are normally four-core connections, for 'tamper' and 'activated' switches.

Bell, siren and strobe units vary but are often four-core for 0V, 12V plus a 'tamper' switch. They may have separate activation signals especially if combined siren and strobe units.

I am not sure what you mean by split voltages or vulnerable circuits. I guess you may mean having the 'tamper' and 'activated' switches wired to a circuit to give a varying voltage rather than an open/closed signal read as a digital input. I think the advantages of that is rather debatable and most commercial home systems seem to use digital switching. As it's only a matter of circuit complexity, five resistors against two per zone, I would say it isn't really that important.

It's tempting to design against any conceivable attack on an alarm system but then you have to ask what if the attacker puts a 100kV spike or an EMP into the system and simply knocks everything out ? If that is beyond sensibly worrying about then how much else is beyond worrying about ?

I'm not knocking your thought processes because it's how product development proceeds in the real world. That's usually a mix of bottom-up and top-down design which ultimately merge as a whole. No product or project first emerges fully formed.
 

the old fart

Senior Member
Split voltage:
i.e.Window sensors, 5v out to sensor, 0v out to sensor, with a closed switch and 2 resistors a 2.5v return signal which is checked by an ADC input.
using 6 core cable so can add tamper circuit.

Vulnerable circuits:
circuit to garage will have to be run outside, on the surface, so vulnerable to tampering.
 

lbenson

Senior Member
I hope this isn't too much of a diversion, but the issue of tamper-proofing was raised.

I found this site which provides, among others, the attached circuit which seems to me incomplete: http://www.structuredhomewiring.com/TamperProofWiring.aspx Perhaps some of those more experienced with alarm systems can provide enlightenment.

The R2 resistor is part of the sensor/switch package. I can see that someone who tampered with the system either by shorting the wires between the sensor and the panel, or by cutting one of them, would create a difference which could be measured at the panel, but he didn't thoroughly explain how it is done.

Assuming a 12V system, is COM 12V or 0V? It would seem to me that you would need a third resistor, say from the left end of R1 to 0V (if COM is 12V). Then, if the voltage were properly conditioned, a picaxe at ZONE could determine that a short had been introduced since the resistor divider would include only one resistor on the + leg instead of two.

The author of the page suggests 5600 ohm resistors. Is this size ideal for a 12V system, and if so, why? If not, what would be better?

EDIT: Upon reconsideration, how different would a short be from the NC switch? How fine a resolution would you need at the picaxe end to discriminate?

EDIT2: Would not the second attachment be the more appropriate circuit, and perhaps that is what the OP is talking about, with the 2.5V reading at the picaxe. This seems to me to provide the ability to detect cutting or shorting between the panel and the sensor.

What does having additional cores do for tamper proofing?
 

Attachments

Last edited:

Hooter

Senior Member
Both resistors should be at the Sensor end of the cable - hence they are called 'end of line resistors'.
The two resistors are in series. If your device uses normally closed contacts - going open on alarm -
these contacts go across one of the resistors shorting it out thus leaving a single resistor in the circuit loop.
This monitors a short on the loop, an open circuit, and device activation.
A second normally closed switch - going open on activation - can be inserted in series with
one leg of the loop to create a tamper activation.
This would give you four state monitoring.
eg. If both resistors were 10k, the normal state would be 10k, an activation would be 20k,
and a short or open circuit would be a tamper.
I would draw a picture but can't at the moment.
 

SAborn

Senior Member
I just wonder how many theives would take the time to rewire the alarm or even have the smarts to do it, when a brick through the neighbours window without an alarm would be much easier. (perhaps if you are the bank of England it might be different)

It was proven here years ago a sticker in the window stating the house had a fitted alarm, worked just as well as any fitted alarm system.
Most crooks are in and out within 5 minutes, and i would think a few cameras about the house would offer more benifits than some noisy alarm that no one takes any notice of, pehaps a sign saying "Smile you are on Camera" would work better.

My cameras have a alarm mode where you highlight an area on screen and it detects movement in that area, then records and can send a email or sms to my phone.
 

Hooter

Senior Member
Window stickers and an external siren are generally what drives them next door.
Noise is a perception. If the intruder is inside and he hears a frail outside siren he doesn't take too much notice and takes his time.
The idea is to have multiple piezo sirens inside the house so as he goes from room to room the noise is 'in his face' and he is more likely to scarper. The whole idea is to limit your loss, and get rid of the sod as soon as possible.
Hopefully he doesn't take your DVR which had all the camera footage with him.
 

Dippy

Moderator
Good points.

There are so many types of burglar, including;
1. The opportunist who spots an open window.
2. The semi-pro who will just smash a window or break down the door - in and out as highlighted by SABorn.
3. The pro who might case a larger premises and may try and tamper.
4. The gang who don't give a hooter and shoot you.

My local burglar (thick, wears a hoodie, has no teeth but plenty of tattoos) would never have a go if he saw a bell-box.

Most systems (alarms and cameras) would put off most types - it's all down to stats.

But, if it puts off the common-or-garden tea-leaf, and gives you some comfort then it's worth it.
I think cameras are great - probably more useful than a shot-gun or half a pound of C4.

Much of it is down to time; if Burglar Bill (wearing a balaclava) knows he has 10 minutes undisturbed then he'll go for it.
He will also know that the Fuzz won't respond quickly to an alarm unless the Bell-Box has a famous name on it.

A number of linked alarms are silent for a period before the siren so that PC Plod can finish his tea and get round to the house in an attempt at catching the Perp red-handed.


Anyway, all us 'experts' are digressing from the plan so if Old Fart wants a project to do which is good and useful (security and fire) then fair enough - go for it.
 

SAborn

Senior Member
In many ways i think its a bygone era with alarms on a general view, as who the hell takes notice of one, except for annoying the neighbours, we all hear it and can confirm it worked, but done nothing ??

I do agree a powerful piezo at the right frequency can be unbearable to the human ear, causing an early exit of the crook, unless he wears ear plugs as well as gloves.

Then a standard alarm box on the front of you house with a strobe light and siren as most have, would suggest to a crook its a hard target and move on to a softer target.

If they did break in then an alarm tells you nothing, where a few cameras lets you see who the A-hole is and what he looks like. if nothing else after a break in, you have peace of mind knowing what the A-hole looks like.

Its eay to backup camera data to more than 1 location, and how smart do you expect the average crook to be, like i doubt he on the forum researching electronics at present.
 

JimPerry

Senior Member
Physical security is the most important thing - decent deadbolts etc deter most, followed by visible alarm signs - then the alarm :confused:
 

lbenson

Senior Member
Both resistors should be at the Sensor end of the cable - hence they are called 'end of line resistors'.
The two resistors are in series. If your device uses normally closed contacts - going open on alarm -
these contacts go across one of the resistors shorting it out thus leaving a single resistor in the circuit loop.
This monitors a short on the loop, an open circuit, and device activation.
A second normally closed switch - going open on activation - can be inserted in series with
one leg of the loop to create a tamper activation.
This would give you four state monitoring.
eg. If both resistors were 10k, the normal state would be 10k, an activation would be 20k,
and a short or open circuit would be a tamper.
I would draw a picture but can't at the moment.
If both resistors were in the sensor, wouldn't a short introduced between the panel and the sensor kill the system--direct 5V or 12V to 0V? Also, exactly where and how would a picaxe monitor this arrangement?
 

the old fart

Senior Member
First bits arrived this morning, from techsupplies. fast service..

Initial board layout.

Top left 2x uln2830 interface
bot left db3232 rtc
bot left (blue) 5v and 12v inputs

left row (blue) ports A and C
right row (blue) Ports B and D

Picaxe 40x2 plugs onto the veroboard.




I'm experimenting with this, previously published, circuit.



thoughts please.


Code:
          start:
           let keypad = 0
        
          readadc c.2 , keypad       'read value on pin c2 into variable keypad
          if keypad<51 then monitor
	    
	    pause 10                
          if keypad>240 then buttonhash
          if keypad>190 then button0
          if keypad>150 then buttonstar
          if keypad>125 then button9
          if keypad>105 then button8
          if keypad>92 then button7
          if keypad>80 then button6 
          if keypad>73 then button5
          if keypad>68 then button4
          if keypad>62 then button3
          if keypad>57 then button2
	    if keypad>50 then button1       
	    if keypad<51 then start       
	    goto start
 
Last edited:

lbenson

Senior Member
Nice clean start to a project that will probably get hairy.

A further question about tamper proofing and picaxe detection. Would the attached circuit be appropriate for a 12V system?

With a 5V powered picaxe, with the sensor closed, you would have a voltage divider of 2K2/(4K7+4K7+2K2) for a range of approximately 2.4-2.7V for a 12.8-14.2V input. This would be the normal condition.

With the sensor open, you would have 0V, and the same if either or both lines were cut between the panel and the sensor.

With a short between the wire between the panel and the sensor, you would have voltage divider of 2K2/(4K7+2K2) for a range of approximately 4.0-4.5V for a 12.8-14.2V input.

What other forms of sensor tampering should one watch out for?
 

Attachments

the old fart

Senior Member
I wouldn't like to push 12vdc into the picaxe. crackle and pops.

The uln2803 will change voltage levels but not ADC.

Pirs require 12v but standard window sensors can run happily from 5v.
 

Dippy

Moderator
Ibenson's digram uses a divider so it isn't pushing 12V into PICAXE.

Well, I know I'm a bit out of date, but PIRs (at least used to) have relays with a low value series resistor , therefore they can run at 5V. And the tamper was just a microswitch so that can run at 5V as well.
They had a 12V DC supply yes.
Or have things changed?

Personally, I would use digital plus opto-coupled inputs to give far greater protection and also allowing 12V if convenient.
I can't see the point of analogue as dirty/partial contacts could upset your value or induced voltage may cause something nasty; why do you want to ADC the security loops? What's the purpose? Is it just that you are short of I/O? Or is it just a little fetish? ;)
 
Top