Saturday, February 27, 2010

Smoke Detector and Burglar Alarm in One

Update: I'm proud to announce that this project has made it to Hack-a-day, one of my all time favorite blogs.

Three weeks ago some burglars broke in to our ground floor flat in central Stockholm. I was coming home from work and surprised the vile wantons going through our stuff. I can ensure you it was quite an unpleasant experience. Anyway, I managed to chase the despicable degenerates out of the apartment.

Since then I've been pondering various ways to improve my home security. I looked at a 127dB motor siren to hook up to a window alarm; that would surely deafen, and quite possibly kill, anyone trying to break in. For reference, hearing damage will occur around 120dB and the human pain threshold is ~130dB. The problem with this solution, aside from my neighbors discomfort while trying it out, is that I have cats; and I don't want them to get hurt in any way. This pretty much rules out my other ideas, like smearing neurotoxin on the window frame.

But I still felt I had to do something. How about hacking a smoke detector and using it as a window burglar alarm? Those things are loud, but not loud enough to cause damage to the cats. Just loud enough to catch the attention of my neighbors and anyone passing by on the street outside.



So, today I started hacking away. It would be great if the new burglar alarm functionality didn't interfere with the original smoke detecting function; that way I would get another smoke detector as well and you can't have to many of those.

This smoke detector has a test button that, when pushed, will cause the device to emit a loud hi-pitched sound and flash a red LED. I figured that this switch could be piggypiggybacked for the alarm functionality. I couldn't use the switch directly since it closed when pushed and you normally want a signal when the alarm "switch" opens. Besides, I still want a test switch for the detector. I decided that I also want a bypass switch to turn the alarm part of the detector of (if you for instance want to open the window yourself). You can see the very basic old and new circuits in the image.

In the next step, a pull-up was soldered across the old, now obsolete, test switch. A ground and signal wire was also soldered in place. In the next image you can see the new test and bypass switches mounted and the white wires to the alarm "switch" sticking out.

I'm using a paper clip as the alarm breaker. This is classic. I love the MacGyvery look of this solution.

In the last two images you can see how it looks when it's mounted. The paper clip is attached to the window and the wires are pinned to the window frame, causing the circuit to break if anyone attempts to open the window.

I love tinkering with microprocessors and computers, but it feels good to do something really simple and quite useful for a change. There you have it, a smoke detector and burglar alarm in one!

And yes, I know the image quality is awful, but I can't seem to find my real camera so I had to make due with my cellphone. Sorry about that.

Friday, February 26, 2010

Circuit Transplant

A couple of days ago I was destroying a Seagate USB harddrive. It was one of a set that my company uses for backups. After it stopped working I decided to take my frustration out on it and at the same time make sure that no one would be able to recreate any data stored on the disk.


After smashing it up a bit with a hammer and crushing it in a bench vice I started to feel re-connected with my, rather naïve, sinister side. But the PCB peeking out of the metal enclosure gave me pause. My curiosity got the better of me and I decided to take the disk apart in a more controlled manner so that I could try to figure out how it was made.

As you can see from the second image, the USB disk is really just a regular SATA disk in a metal enclosure with a small controller card to handle the SATA USB interface. I knew for sure that the disk was broken but perhaps the controller card would still work? I had to test it.

I plugged the controller cards surface mounted, female SATA connector into a good Hitachi disk. I connected a USB and power cable to the card and sure enough, the disk started spinning up and I could access it from my computer.

This little card is a universal SATA to USB bridge. Perhaps not that surprising, but at least now I don't have to buy one if I want to check the content of a disk from my laptop.