Home automation hack controls lights based on head count

This home automation hardware turns on and off the lights based on room occupancy. The hack is an extension of an earlier version that was only a proof of concept. [RPisces] took the idea and made it into reality by mounting the sensor hardware in a doorway.

He prototyped the device using the MSP430 launchpad. It monitors a pair of IR distance sensors which record a change when something passes between them and the opposite side of the hallway. This is a good sensor choice as it only requires hardware on one side of the passageway. Because two of them are used, it’s quite simple to figure out if a person is entering or leaving the room based on which is tripped first.

In this case [RPisces] drives a relay to switch a lamp on and off. But it could be used for just about anything. We’d enjoy seeing it trigger an audio system like the one [Quinn's] installing in every room.

Comments

  1. Untz says:

    Yes, ditch the lamp. Two is a crowd three’s a party. Cue the music.

  2. Max says:

    This won’t work very well when two persons are simultaneously passing the “Sensing Area”…

  3. Uky says:

    Good job sir!

    I have thought of this exact same device, and made a prototype of it earlier this year but have not extended it to mains yet.

    My version, to check for direction, needed sensor A then sensor B to activate in the right order, followed by both being on, followed by A turning off then B turning off. The opposite was needed for the other direction. I found that doing this removed errors of someone popping in and out, or standing in the doorway.

    I also had the counter bottom out at 0 to avoid longer errors. It is useful to have a button to reset the count if it gets messed up.

    Another feature that I wanted to add that is quite nice, is a manual overide that turns off the light until the count reaches zero. For example, if you want to go to bed, you can set it to sleep, then if anyone else walks in it stays off. However once everyone has left, it resets to normal operation.

  4. fartface says:

    Professional systems try to count people in the room and the all have failure points. the ony solution is the triple technology occupancy sensors. they use IR, FLIR, and Ultrasonics to get a 90% accuracy. nothing will deliver 100% accurate.

  5. Primoz says:
  6. Primoz says:

    Arghhh… screwed up post format – can I edit it? Here is presentation video link on youtube:
    http://www.youtube.com/watch?v=sATcqVFGSjE#t=12m15s

  7. derpdeedoo says:

    how does this work if there is more than one person entering/leaving the room?

    person one enters, light turns on, person two and three enter, light remains on. person three leaves, light turns off, and person one and two are left in the dark? :(

    ‘home automation’ might be a stretch…

    • Jim says:

      It counts them in 1(on)..2..3 and counts them back out 3..2..1(off), the problem comes if the people are huddled together as they enter and the system thinks only 1 or 2 entered, then you get the problem you describe.

  8. wowme@wtf.com says:

    all of my rooms have a small rectangular plastic plate with a small rectangular plastic post sticking out that I TOUCH if I want the light ON or OFF

  9. Circuitmage says:

    Nice. I like the use of dual IR sensors for intelligent sensing. I just wonder how practical the control is long term when set to specific assumptions.

    Also, this project is using the sensor for 1 relay activation, when some logic would do instead of a micro. Funny how micro’s are taking the logic out of design.

    Logic gates / counters could be used for multiple outputs and LEDs as well….just sayin….

  10. axodus says:

    you might be able to use only one sensor, placing it a bit diagonal to the hallway. the software will detect the direction of movement by the person getting closer or farther from the sensor.

  11. We already have a universal program almost anything’ interface. Its called the parallel port.

  12. I love the idea of home automation but until they start building houses specifically to accommodate this, its just not practical. With kids and puppies and a generally busy life its really not practical to have wires and little boxes laying around just to be able to control a light. I think every electronics engineer dreams of a fully integrated, centrally controlled automated home but very few have the budget or time to make it happen – its a bit like the desire I used to have as a kid to have a big 45 degree control panel with lights and dials, levers and controls to press. At 8 years old I was inspired by the scifil programs and having the control panel was actually more desirable and mattered more than having the things it could control – somehow…now I have satisfied that in-built desire with shelves full of test equipment that have buttons and displays in abundance.

  13. ameyring says:

    My dad’s workplace has had an occupancy sensor in the break room for years, turning on the light when someone enters. I don’t know who made it, but it works well. Lutron is one company that makes these sensors.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 92,137 other followers