pine 140 Posted December 17, 2011 Share Posted December 17, 2011 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 I don't know how to make PCB so this is all hand wired stuff. The front panel showing the socket for 2211 and the LEDs. Finished and testing. Connected to a coin cell battery through the male headers on the bottom. The whole board to be fixed like this. A "bar" is needed on the door at the right position to trigger the mechanical switch. The actual installation. The board itself is fixed by using 3M tapes, and the rod by convenient hooks that came with adhesive back. Quote Link to post Share on other sites
simpleavr 399 Posted December 17, 2011 Share Posted December 17, 2011 Nice work. Just can't see how u will hide the thing from your friend's landlord's view. pine 1 Quote Link to post Share on other sites
RobG 1,892 Posted December 17, 2011 Share Posted December 17, 2011 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.) pine 1 Quote Link to post Share on other sites
kenemon 29 Posted December 17, 2011 Share Posted December 17, 2011 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 Quote Link to post Share on other sites
kenemon 29 Posted December 17, 2011 Share Posted December 17, 2011 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 pine 1 Quote Link to post Share on other sites
ike 53 Posted December 17, 2011 Share Posted December 17, 2011 He could easily leave on doorstep vertical coin propped up to the door ... Quote Link to post Share on other sites
MattTheGeek 99 Posted December 18, 2011 Share Posted December 18, 2011 He could easily leave on doorstep vertical coin propped up to the door ... Wouldn't that just fall over when he enters.... Quote Link to post Share on other sites
MattTheGeek 99 Posted December 18, 2011 Share Posted December 18, 2011 Nice work. Just can't see how u will hide the thing from your friend's landlord's view. He could use a F2012 target board and flash the number of times the door has been opened on the status LED, or write that result to flash... pine 1 Quote Link to post Share on other sites
pine 140 Posted December 18, 2011 Author Share Posted December 18, 2011 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. Quote Link to post Share on other sites
pine 140 Posted December 18, 2011 Author Share Posted December 18, 2011 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. Quote Link to post Share on other sites
pine 140 Posted December 18, 2011 Author Share Posted December 18, 2011 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 I think i haven't heard about hall sensor before and will start studying it. Thanks for the idea! Quote Link to post Share on other sites
pine 140 Posted December 18, 2011 Author Share Posted December 18, 2011 He could use a F2012 target board and flash the number of times the door has been opened on the status LED, or write that result to flash... That F2012 board is already on my estore wishlist Quote Link to post Share on other sites
nuetron 64 Posted December 18, 2011 Share Posted December 18, 2011 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 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) pine 1 Quote Link to post Share on other sites
pine 140 Posted December 18, 2011 Author Share Posted December 18, 2011 It got installed yesterday, and have been put into real tests! A picture of the actual settings: 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 Thank you everyone for your valuable input and comments! Quote Link to post Share on other sites
nemik 0 Posted December 19, 2011 Share Posted December 19, 2011 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. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.