Jump to content
43oh

Door open/close logger


Recommended Posts

This is a weekend project with a real request from a friend! Will be putting it into use soon for a little test to see if the concept works before more to be done.

 

Long story short on the request: friend is renting an apartment, and suspecting the landlord visited while no one is here (maybe to sell new renter for his other apartments in the same building). The contract terms do not allow this. When we talked about how simple it can be to install little device to detect door movement, we decided to give it a try. The goal is to "log" the door open times while my friend was out and no one is in the apartment.

 

3 LEDs (Green, Blue, Red) vertical left for system state indication.

3 LEDs (all Blue) horizontal at the bottom for number of times the door has been opened.

 

Basically an MSP430G2211 doing some state transition with 1 user input and 1 door sensing (mechanical switch):

 

1. Power on.

2. Green LED on. Awaiting user press key while door is open (friend about to leave home).

3. User presses key and system ready to arm. Blue LED flashing.

4. User closes door, triggered mechanical switch and system is armed. Blue LED stayed on.

5. Someone open door, released mechanical switch and system log one time of door opening.

 

At this point, if this is my friend came back, it can be observed that only one blue LED (on the bottom row) is on.

 

If this is someone else, he will leave (well, before my friend came back ;) ) and ...

 

6. Someone closed door, back to state (4).

 

My friend came back an saw more than one light on :shock:

 

At the moment only the basic stuff above is done. If the test on the basic concept is satisfactory, will move to next stage to fill in the details like covering and protecting the whole stuff etc.

 

This is from a newbie, comments and advice will be much appreciated :)

 

post-2970-135135529168_thumb.jpg

I don't know how to make PCB so this is all hand wired stuff.

 

 

post-2970-135135529174_thumb.jpg

The front panel showing the socket for 2211 and the LEDs.

 

 

post-2970-135135529179_thumb.jpg

Finished and testing. Connected to a coin cell battery through the male headers on the bottom.

 

 

post-2970-135135529453_thumb.jpg

The whole board to be fixed like this. A "bar" is needed on the door at the right position to trigger the mechanical switch.

 

 

post-2970-135135529593_thumb.jpg

The actual installation. The board itself is fixed by using 3M tapes, and the rod by convenient hooks that came with adhesive back.

Link to post
Share on other sites
Nice work. Just can't see how u will hide the thing from your friend's landlord's view.

 

Thanks, and yes the idea to hiding the device was not very well thought out, and we discussed that and think it's not quite easy to hide it completely with my skill level, but came to the conclusion that being revealed by the landlord is not a biggie as he is not supposed to see it after all, and it is also not a violation to put up devices like this one. It is probably more important to protect it from being altered, in case someone really entered, noticed the deice , figured it out and tried to reset it.

Link to post
Share on other sites
Now you need to add an RTC to log the time of events (I will be posting couple of RTC examples using DS1394 and MCP795W22 in few days if you are interested.)

 

Looking forward to your post! RTC will be a great feature to add. Besides being able to have a better piece of information than simply counts, one of the problem found during testing is from the main contact switch which i think is similar to debouncing buttons. I added a little delay to compensate for it. Although after a day's field test it never happened, if the RTC is available, this kind of false positive can be eliminated.

Link to post
Share on other sites
You could easily add a hall sensor and drill a small magnet into the door to avoid the dangling bracket at the height of a 85 year old's eyeball :P

 

I think i haven't heard about hall sensor before and will start studying it. Thanks for the idea!

Another sensor you could use is a reed switch. Get a magnet near one, it makes contact. (or breaks contact, whichever kind is available)

Link to post
Share on other sites

It got installed yesterday, and have been put into real tests! :)

 

A picture of the actual settings:

post-2970-135135529602_thumb.jpg

 

 

Not sure it is typical, after so many tests at home there will still be glitches at its first use ;) One of the LED light does not lit up when i arrived at the apartment and opened the box to power it up.. thankfully brought my mobile kit which saved the day - bad soldering..

 

Tests so far has been satisfactory. My friend understood the meaning of the lights without much problem. We decided to fix it at a near ground position to make it kind of low profile. Not that to make it harder to be noticed by the uninivited visitors but make it less visible for whoever sitting on the sofa ;)

 

What surprised me was the life of the coin cell battery.. It has been a whole night test at my home Friday to Saturday, and it still keep running :lol:

 

Thank you everyone for your valuable input and comments! :)

Link to post
Share on other sites

Very cool! For logging, you could connect serial lines from an MSP430 to something like a Linux router or computer that could then log the times into a DB when certain input comes over the serial. I did something similar for an art installation recently. Wrote a post about it but it has many external links and my account is apparently too new and post too "spammy" to go through at this point. I'll try again tomorrow.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...