Friday, March 4, 2011

Uses for motion sensors

You read a lot about people using motion sensors for all kinds of things in home automation.  Some of these are very easy to do but have very limited uses (In my opinion), some are very specific but still fairly easy to setup and use, and some are much more practical in their application but require much more logic and work to implement in a useful and reliable way.  The following post will address an example of three different uses for motion sensors.  First, using motion sensors as a security mechanism in an alarm system which most people are familiar with so I will not dwell on this.  Next, is using motion sensors to turn lights/devices on and off when motion is detected, and finally using motion sensors as an occupancy sensor to turn systems off when people are not using them or in the area.

Using motion sensors to turn lights on and off is fairly simple, but, in my opinion, has limited practical applications.  I really only have 2 applications for motion activated lights in my home automation scheme.  One is outdoor motion activated lights and these are a very useful, and a fairly simple application of this that serves a security oriented purpose.  When the motion sensor picks up motion it turns the light on, once the motion stops for X minutes it shuts them off.  The other area that I use motion sensors is to turn on lights in areas of the house at certain times.  I do not like using this in a very broad way, because it annoys me when I just walk around the house and lights turn on all over the place and they are not needed.  On the other hand, it is very nice when you wake up in the middle of the night and wander around for the stairs light to come to a 20% dim level, or the bathroom light to automatically come to a 20% dim level.  This way you can see, but you are not blinded, and the lights magically shut back off after a few minutes.

The occupancy sensor application was a little harder to do.  How do you tell your system to shut off the lights when there is NOT motion?  What I came up with was the following logic:  When motion is detected remove any events related to the lights in that room and then create an event to turn off the lights in that room in 15 minutes.  The event is set to re check the motion sensor every 10 minutes, so if there is still any motion in the room the event just resets, but if there is NOT motion then a few minutes later it shuts off any devices referenced.  This has been working great for me, and I am just using cheap X-10 Hawkeye motion sensors.  I use this in my media room so that if I am watching something, get distracted and never go back in there the system will shut down the Lights, TV and receivers. 

I am sure that folks are using motion sensors for a lot more than this, and I welcome comments, suggestions and other applications that you guys have in place!