Monday 9 April 2012

Steve's wireless shed alarm

I once had the privilege of working alongside a delightful chap named Steve

Say hello Steve

Okay, that's actually his sock.
Moving on, Steve is a man with sheds, and like any man with sheds he wishes to protect them.
But rather than standing guard 24 hours a day with a handy flamthrower, he built a wireless alarm system.


The system uses IR rangefinders to detect would be shed raiders, as pointed out by the man himself.






On the inside of the door there's the innards of the detector, a PIC12F675 and a PMR radio with added wires.









The detectors (3 of, one per shed) have analogue outputs which the PIC reads and compares to it's stored values.
If the reading on any input go over it's stored value for more that 10 readings, the PIC "presses" the call button on the radio, causing an annoying bleepy noise to come from the receiving bedside radio. This in turn causes an angry Steve to come running into the garden, chainsaw in hand.
Or something like that...








AH yes! the code!
Tis in assembler, as mister Steve doesn't believe in brackets