Skip to main content
Topic: Door lock reminder (Read 25617 times) previous topic - next topic

Door lock reminder

I don't know about you guys but I constantly catch myself wondering whether I have locked my apartment door or not. I never actually forgotten to turn the key but I did come back just to make sure a bunch of times. Usually it is when I am in a rush trying to catch a bus knowing the next one won't be soon. Anyway, I wanted to do it for a long time, but I finally got some time this evening and I came up with a simple device that will do the job of remembering for me.

Basically this is an ATtiny13 chip with two reed switches and a buzzer:
[attachment=3]
The chip stays in power-down mode using just 4 uA including the shorted door switch (via 1M + 10k resistors). When the door gets opened it activates, powers up the second switch via PB3 and waits for the door to be closed again checking PB1 level. It then checks the lock status and keeps beeping until you lock the door (PB4 level). Once you do that it returns to the power down mode waiting for another door opening. Some energy could be saved by using sleep instead of delays while active, but I guess the door won't be open for too long anyway so it doesn't really matter. One thing I will fix later is the lock & unlock scenario where you lock the door and then unlock it leaving the door closed. It will not be detected and therefore you can still leave it unlocked. But for now it is just what I needed.

The door sensor is a typical alarm type of reed switch and the for the lock I used a magnet glued to one of the lock "bolts" (what are they called?) the lock switch is glued inside the door frame.
[attachment=1]
The reason it took so long to get it done is that I wanted to make a PCB for that and I hate making them ;) Luckily, my sister sent me a few cool small solderless breadboards from China 5RMB each ( less than 1 USD !! ) so there will be no PCB for that, I'll just put it into a small box and glue it to the door frame. I would have done it now but it's already past 22 and I need to drill a hole in the frame to hide the cables.

The "final" device looks like this:
[attachment=0]

Attached is the source code if anyone wants to use it.

Re: Door lock reminder

Reply #1
[quote author="pppd"]I don't know about you guys but I constantly catch myself wondering whether I have locked my apartment door or not.[/quote]
I totally can relate.  Every time I go back to check, of course my door is locked.  :-)

Although, it has been a while since I've done this.

Re: Door lock reminder

Reply #2
Quote
I never actually forgotten to turn the key but I did come back just to make sure a bunch of times.

Also :)

I think it might be treatable.
Got a question? Please ask in the forum for the fastest answers.

Re: Door lock reminder

Reply #3
Hah, sure.. but it was much cheaper to build the device than to go to a psychiatrist to take care of that ;) Anyway, I got it all running yesterday and I hope to never have to return to check the door again.

Also, I'm probably not the first one to do it this way... but if you don't like through-hole parts just as much as I hate them you may want to use surface mount resistors, capacitors or even transistors on your bread board circuits. There's an easy way to do that, just use the pin headers and solder the 1206/0805 parts to them:
[attachment=0]You can see a few 1206 resistors, 0805 capacitor, 0805 RC oscillator I had to create for recovering misconfigured fuses in an ATTiny device and a SOT23 transistor.

Re: Door lock reminder

Reply #4
Cool way to convert smd to pth ;)

Could you also come up with a cool way to not forget the key when running out of the house?

Re: Door lock reminder

Reply #5
[quote author="dps"][quote author="pppd"]I don't know about you guys but I constantly catch myself wondering whether I have locked my apartment door or not.[/quote]
I totally can relate.  Every time I go back to check, of course my door is locked.  :-)

Although, it has been a while since I've done this.[/quote]

I do that too. Ditto with the refrigerator.

The two or three times i *did not* go back, it turned out i actually *did* leave the door unlocked :)