Introduction: Pocket Burglar Alarm

This is a multi functional infrared intruder alarm that has (just about) been squeezed into a zippo lighter.


I recently added this project to my blog, if you don't want to wade through all the how to 'ness then this summary might be better to read.

I made it as part of the Gift Exchange.

It works by sending out a modulated infrared signal. The detector then senses any of the reflected signal, this is how it knows if anyone has passed by.

The main board contains a pickaxe chip. There is a mode select button which allows you to cycle through the different detection methods and alerts.
It runs off of 3 x AG-13 button cells and can sense up to 15cm+ in good conditions.

For a demo watch this video.

If video won't play, right-click and watch on YouTube
 
I also made a couple of instruction manuals which are attached.

Instructables reduces the image quality of uploads so I've included a PDF with all the diagram illustrations at high res.

Step 1: Materials

A few components can be scavenged for this project.

I've included links to techsupplies.co.uk  so you can see what the pieces look like, as well as places you are likely to find the component.

Components:                                                                Likely places to find them:

- Picaxe 08M chip
- Perf / strip board
- IR sensor 38kHz
- 2mm red LED
- 5mm IR LED                                                                   Any Remote control
- Piezo transducer                                                           Anything that makes a beep noise
- 6mm tactile switch                                                         Anything that clicks when you press it
- PCB mount slide switch
- Resistors with rough values of 32k, 10k, 1k, 300, 180 Ohms
- <1.2mm insulated wire 
- Button cell battery contacts                                         Anything powered by button cells
- 3 x button cell max size AG-13
- Small nut & bolt 

also a Zippo style lighter, or other pocketable housing
(small altoids tin etc)

Tools:

- Soldering iron with fine tip
- Drill with 1mm, 2mm, 4mm and 12mm bits
- Small files / sandpaper
- Needle nose pliers
- Side cutters
- Tin snips
- 2 part epoxy glue / hot glue gun
- Pva glue / nail varnish
- Screwdriver
- Hacksaw

These images show what I was able to get out of a broken electronic die.
small electronic things like this are the best place to look for battery contacts.

Step 2: Prototyping

Note: if following the above circuit it's been pointed out that on the breadboard image, the red led and switch are reversed compared to the circuit diagram. Also don't assume the pin out for your ir sensor will follow the circuit diagram, always check a data sheet. 

This Instructable assumes you are familiar with Picaxe or some micro controller system.

If not I suggest you look into it, it's really easy to pick up (this is the first project I've done with it) and it's less costly than arduino.

Set up your circuit as shown in the pictures and circuit diagram.

Place the IR sender and receiver next to each other on your board, facing off of the edge, and make sure to place something between them so only reflected light will set off the sensor.

If you are using the example code then download it and test the circuit.

If you are writing your own program (which I suggest) then here are a few tips.

IR Sensor:
Read through any data sheets you can find for your sensor, it will only respond to a specific frequency (mine was 38kHz) and it responds best to certain burst lengths and gap times (how long the signal is on or off)

Also note that the sensor is in a high state (a 1 signal being sent to the chip) when there is no IR signal detected (this confused me at first).

Mode Switch:
Because this is used to count switch presses, switch bounce will ruin your program. (bounce is when, what seems like a single press to you, is registered as many presses by the chip)
To stop switch bounce simply add a pause (e.g. 100ms) after the program counts the press. This gives the switch time to settle.


When you are happy with the circuit and program you can move on to miniaturizing it to fit in a zippo.

Alternatively you could cut a slot out of a large tin, dump the breadboard and batteries in and use the intruder alarm just as it is. 

But for me, making stuff smaller and more compact is way more fun.

Step 3: Modifying the Insert

This is quite a lot of work because I wanted to preserve the hinge mechanism of the Zippo.

You could easily get rid of the insert entirely and have the lighter close with some small neodymium magnets placed either side of the opening.
But I like the action of the hinge system so I did it the hard way.


Remove any cotton and wick from the insert and bend the chimney walls out flat.
Cut the chimney off but keep the hinge supports.

Using pliers or a drill remove the flint tube.
Using either some pliers or a drill remove the rivit that holds the spring onto the insert.

Take a large drill bit (slightly smaller than the width of the insert) and drill two large holes in the top of the zippo.
Stay well away from the hinge and remember the spring must be re attached later (a bit further up).

You now have your main hole and using pliers you can pull out the remaining pieces and clean up the opening (see pictures to get and idea of the size / location of the opening)

Now using either tin snips or a hack saw cut off the majority of the insert leaving roughly 10mm (again, see pictures)

Drill a small hole (same size as that in the spring) into the top of the insert and reattach the spring using a short nut and bolt.

you will also need to drill 2 small holes at the far left of the insert for the wires to run through. Carefully drill these using a 2mm (or larger depending on your wires) drill bit.

Finally you will need to drill a 2mm hole in the lighter body. This is where the red LED will poke through.

Whilst looking at the base of the lighter with the hinge on the left, you hole needs to be in the bottom left. (see pictures in the last step showing LED poking through case)

Step 4: Cutting the Stripboard

You will need 3 separate boards. One to hold the sensors in the top of the main body, a large board hidden inside the main board to hold the chip, red LED and resistors as well as a board in the lid to hold the switches and batteries.

For the battery board you need 11 strips of 4 holes.
Sensor board 14 strips of 4 holes.
Main board 14 strips of 8 holes.

The two smaller boards need to fit well, so cut them larger than you need and trim / file them down to size.

The boards shouldn't be too hard to get in and out. the battery board is held in by a screw and the sensor board is held down by the hinge so they don't need to be push fit.

With the main board copper side up cut one square out of the bottom left of the board (this is where the red LED will go)

The battery board is attached into the lid with a small screw. at the far left of the board (see illustration) you need to drill a hole for it.

You can also see the slits for the battery contacts but these will depend on what contacts you are using.

Step 5: Main Board

I recommend placing all your components in as a test fit before soldering anything.

Your board will likely be different depending on what resistors you could find. 

The important part is the red LED, this is surface mounted onto the copper side. The -ive side is on the right, on my board the right hand track is going to ground (when looking at board copper side up). Make sure to put a fair bit of solder on this (i push on the red LED when removing the main board from the lighter)

Also remember that where ever the Picaxe chip is placed you must interrupt the copper tracks in between the legs. (you can do this with a drill bit, file or knife. But be careful not to slip and break other tracks.

When soldering the piezo, keep the wires somewhere between 5 - 10cm. This way you will be able to epoxy the piezo in place before you put the main board in, and the wires won't get in the way once it is all assembled.

The illustration shows an ideal configuration (if you had all the right resistors) but I've combined several to get the values I needed.

I haven't included a download circuit in here so make sure you are happy with the program and that the chip is working before you solder it in place.

Step 6: Battery Board

The hardest part of this is getting some solid battery contacts. I was lucky to find some perfect sized contacts and found a great way of attaching them to the board.

If you couldn't scavenge any your best option is to look at the pictures and try to cut something similar out of a piece of tin can (or if that's too tricky use a drinks can).

I cut out small slots where my battery contacts were going to go. I then threaded the small tabs through these slots, bent them over and 'tied' the contacts down with some thin wire.

I was then easily able to solder the contacts into position.  Making sure that some of the copper track they were attached to was still free for attaching wires.

The other components are simple to place on. Notice that I have put the resistor tying the button to ground on the battery board so that I only have to run 3 wires (not 4) to the main body)

When attaching the wires that will go to the other boards leave them nice and long and you can get the exact length later.

Step 7: Sensor Board

The illustration shows suggested wiring (note: I've used wire that is < 1.2mm so that it will pass through the holes in the board) you could alternatively widen the necessary holes with a drill.

Solder the IR sender and reciever in place. Also solder on the wires that will go down to the main board, and make a note of where the wires from the battery will be soldered later.

Step 8: Attach Main Board to Sensor Board

You now need to expoxy the main board and sensor board together.

This will obscure the soldering of your sensor board so make sure it is all done correctly and that nothing is short circuiting!


Place the main board into the lighter (make sure the red LED is snuggly in place, now sparingly spread some 2 part epoxy across the top edge of the main board, then place the sensor board into the body of the lighter.

Important! you don't want to glue the boards into the lighter. You are just using the lighter to the line the boards up!!

Once the glue is cured take the two boards out. Don't try to pull the board out from the top, instead use a toothpick to push the board out from the bottom (through the LED hole)

For now the join between the two boards may be a bit flimsy but just be careful with it and resist the temptation to add any more epoxy until the end.

Take the loose wires from the sensor board and solder them into their places on the main board.

Step 9: Attach Battery Board

Before doing this test fit the main/sensor board into the body along with the hinge piece.

Once you are happy with this, remove the main board and thread the wires from the battery board through the hinge piece and cut them to right length ready to solder.
Too long is definitely better than too short (you can always loose the excess under the hinge).

Solder the wires from the battery board into their appropriate places.

Put in some batteries and test the circuit one last time before we insulate everything.

Step 10: Insulating

We are about to put a lot of small electronics into a metal box, which is a short circuiting nightmare.

Cationary Tale: Don't be tempted to start protecting and insulating things before the circuit is complete. I was insulating as I went along, slapping epoxy on everything. I tested the device before sending it, and it didn't work. TBH it would have been faster to start from scratch (there was a short circuit which was buried between the main and sensor boards, under about an inch of epoxy) But I eventually found the offending connection, severed it and rerouted the connection.

So leave this step till last!


Battery Board: flip the board over and file down the space in between the battery contacts as much as possible (don't go too far or you will break the connections)

This gives more space for the batteries (you may notice my lighter doesn't quite close)

I then pasted a thin layer of epoxy(clear nail varnish may allow you to get a thinner layer) over the back of the battery board. Otherwise the batteries will short out against all the other components.

Main/Sensor Board: with a small file go round all the edges removing any unnecessarily large solder lumps which may scrape against the edge.

Then go over these edges with epoxy / nail varnish to make sure they won't short.
You could cover the whole of these board but this is probably unnecessary)

Now that the circuit is finished don't be afraid to put epoxy on any vulnerable connections, especially put a lot on the ends of the wires that go across the hinge, these will be constantly bent about and are in danger of breaking.


Lighter Case: the batteries will come into contact with the lighter lid, so I covered the majority of the lid in pva glue, I used this instead of epoxy because I was able to paint it on and get a nice thin layer.

Step 11: Putting It in the Lighter Body

The nut to hold the battery board in place needs to be expoyed inside the lid. Use only a tiny amount of glue to do this or you may accidentally fill the nut with glue, and it's useless.


When everythiing is finally ready the last step is to epoxy the piezo to the side of the lighter. This will improve the volume of the device dramatically, if you just let the piezo rattle around inside then it won't be very loud at all.

Make sure the piezo is secure then begin to put the boards inside the lighter.  Once everything is inside take it for a test run. 


My favourite mode is the reverse detect, mostly hiding it places  (in a cupboard, in the fridge, in a shoe, and seeing people jump when it goes off).

But it does work as a burglar alarm too.

I've no idea about effective battery life. But the batteries used during the demo vid were some 'dead' batteries I took out of a laser pen, so fresh ones should last a while.

Also the batteries will last longer when using the 'reverse' modes. (because the IR sensor isn't drawing power while waiting)

Comments

author
JenniferL198 (author)2016-06-29

I wish I
could work for a First Security Services armed security guards
company like theirs, they really have a good thing going and if you want any
chance of keeping an event safe and as low escalating from problems as possible
these are the guys that will keep your businesses name in good standing...

author
Blackbery (author)2012-12-22

Man can u please please please please tell me how to make d same zippo alarm but with just tht 1 beep feature and not sooooo many detect modes cuz tht will be a lot easier n am a kid so this is way beyond me. So please please please if u cud help tht wud be great! Thanks :)

author
madmanmoe64 (author)Blackbery2013-01-08

Because I used a programable micro controller to do this project, adding more modes and functions doesn't make it anymore complicated. If I made one with just the normal detect mode, the hardware would be the same but there would be empty space left on the pic.

It is of course possible to make a detect circuit without having to program a chip. You can use a standard 555 timer to generate the pulse signal and have the ir detector directly trigger a buzzer. In either case you need to generate a pwm signal. Anything less than that would give too much interference, and mean more hard work tuning the sensor.

I think that the way I've made it is simplest (once you get the program on the chip). And if you're interested in this sort of thing I really encourage you to take a look at learning to use Picaxe. It's kind of the lazy choice, because I end up using it for everything instead of building proper circuits, but it's so easy to use.

http://www.picaxe.com/Getting-Started/Downloading-your-First-Program/

author
Tin Tin (author)2012-10-30

Please tell me that circuit diagram you put up is re-arrange right?
Thanks

author
madmanmoe64 (author)Tin Tin2012-11-10

For anyone else wondering, yes I rearranged the pin out of my ir sensor on the circuit diagram, this was just to simply it and not have wires crossing etc.
I don't know what the convention is, and this was ages ago, so I don't really remember what I was doing but:
You should always check the pin out of your specific component with a datasheet, not just read it off of the circuit diagram. (I sent Tin Tin a longer message which should holpfully help clear this up)

author
Tin Tin (author)2012-10-29

Man, how did u manage to fit it all in a Zippo Lighter?

author
Tin Tin (author)2012-10-29

I got the same project for my electronic class but at the moment, your circuit diagram is not working
My teacher said that IR Sensor Blowed up
Can U help Me here?
Please?

author
unigamer (author)2012-07-14

I really like this, it's elegant (zippo got style!) and reasonably functional! The personal (rape) alarms are pretty small and maybe the electronics could be squeezed into a zippo... they let off a hell of a sound!

Good work. :)

author
madmanmoe64 (author)unigamer2012-08-02

I love the design of the Zippo: simple, functional and hasn't needed updating because it just works.

However I don't smoke so I'm always trying to find more useful things to put in the neat little enclosure.

author
venom1539 (author)2011-10-11

Whats next, a Zippo lighter flamethrower? (that would actually be pretty awesome)

author
madmanmoe64 (author)venom15392011-10-11

Believe it or not, next is an R/C car Zippo.;

:)

author
venom1539 (author)madmanmoe642011-10-12

make it an rc-xd :)

author
JamesRPatrick (author)2010-08-13

Reminds me of True Lies.

author

Which bit, I haven't seen that film in a while.

author

The part in the beginning, in the men's bathroom, he has the cigarette box camera. This is kinda similar.

author

Oh yeah, I looked into trying to fit a camera into a Zippo, But I'd have to build my own circuit which is a bit beyond me.

author
venom1539 (author)madmanmoe642011-10-11

Just get the worlds smallest camera from the Hammacher Schlemmer magazine or www.hammacher.com .

author
elvisarias (author)2011-03-01

excellent idea

author
Taran606 (author)2010-09-12

How did u make it so small

author
madmanmoe64 (author)Taran6062010-09-29

Looking at the breadboard, most of the stuff is just wire. the rest is fairly small and the download socket (top left) isn't in the final circuit.

author
agis68 (author)2010-09-08

Very common subject but very well illustrated and presented. It might be useful if you put a bigger buzzer. Also we can try different houses of this circuit ( like a cigarette box) and maybe add a mini camera. 5*

author
harryjri (author)2010-08-26

Great frickin' idea. Nice nice work.

author
Wasagi (author)2010-08-16

Fantastic! I'd love to put this in even more unassuming things, like fake rocks. Great Job!

author
blackwellj (author)2010-08-15

what software did you use for the diagrams

author
madmanmoe64 (author)blackwellj2010-08-16

the Circuit Diagram was done in Eagle. The illustrations were done in Vectorworks, although Adobe Illustrator is probably better for creating those sort of images.

author
Bluedove2897 (author)2010-08-16

Useful till someone picks it up and takes it!

author
DrWilson (author)2010-08-14

Thanks Man Great Instructable! Im so lucky :)

author
Diabloscope (author)2010-08-13

Thats pretty kool ! i have some Car Security proximity sensors 2" x 2 1/2 i can rig up a piezo and a battery source . you actually built everything , except for the lighter .. "Thumbs Up"

author
mashedpotato13 (author)2010-08-13

Great pictures and well described. Love the idea. 5*

About This Instructable

22,910views

137favorites

License:

Bio: Studied Architecture at Brighton But now spend a lot of time building replica props or random gadgets.
More by madmanmoe64:Zig Zag Structure - Cardboard ChairSimple Japanese BridgeModular Concrete Bench
Add instructable to: