Door lock reminder

A place to document your own projects.

Door lock reminder

Postby pppd » Thu Oct 06, 2011 3:36 pm

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:
lock_reminder_circuit.png

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.
lock.jpg

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:
device.jpg


Attached is the source code if anyone wants to use it.
Attachments
at13door.c
(1.58 KiB) Downloaded 944 times
User avatar
pppd
Full Member
Full Member
 
Posts: 145
Joined: Tue Nov 24, 2009 9:49 am
Location: Stockholm, Sweden

Re: Door lock reminder

Postby dps » Thu Oct 06, 2011 3:45 pm

pppd wrote:I don't know about you guys but I constantly catch myself wondering whether I have locked my apartment door or not.

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.
dps
Jr. Member
Jr. Member
 
Posts: 55
Joined: Thu Jul 21, 2011 8:29 pm

Re: Door lock reminder

Postby ian » Fri Oct 07, 2011 2:57 am

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.
User avatar
ian
Crew
Crew
 
Posts: 10578
Joined: Mon Jul 06, 2009 6:14 am

Re: Door lock reminder

Postby pppd » Sat Oct 08, 2011 10:28 am

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:
smd_bb.jpg
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.
User avatar
pppd
Full Member
Full Member
 
Posts: 145
Joined: Tue Nov 24, 2009 9:49 am
Location: Stockholm, Sweden

Re: Door lock reminder

Postby Sjaak » Sat Oct 08, 2011 10:53 am

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?
User avatar
Sjaak
Fellow
Fellow
 
Posts: 3039
Joined: Sun Jan 03, 2010 2:45 pm
Location: Hiero

Re: Door lock reminder

Postby orcinus » Sat Oct 08, 2011 3:04 pm

dps wrote:
pppd wrote:I don't know about you guys but I constantly catch myself wondering whether I have locked my apartment door or not.

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.


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 :)
Ante Vukorepa - arduous.orcinus.me
User avatar
orcinus
Jr. Member
Jr. Member
 
Posts: 58
Joined: Fri Jul 15, 2011 4:00 pm
Location: Zagreb, Croatia


Return to Project logs