This project was started as part of learning MSP430 microcontrollers. Rpisces wanted to add some home automation using this microcontroller and so built room visitor counter. Device counts how many visitors are in room. If it detects at least one person inside – it keeps relay switched on. And relay turns lap on and off.
Three LEDs keeps binary count of present people. People are detected using pair of IR distance sensors. Two of them are used to detect persons moving direction to figure out weather he is moving in or out. Circuit and sensors are mounted on plexiglass sheet that can be attached to doorway hole.