Talking with my daughter this morning. She complained about the kids (grandchildren) leaving the lights on in their rooms when they leave. She said it must be easy for me to build a circuit that can detect a person walking into a room and turning the light on, and when they leave the light shuts off. And I'm sure it's an easy project. But I don't know where to start other than an infrared emitter mounted between two infrared receivers spaced about an inch apart with a mirror or other highly reflective surface on the opposite side of the door.
I'm familiar with volume controls on stereo's that use encoders to turn the volume up or down. It depends on which switch closes first that determines volume up or volume down. So I'm thinking the same sort of encoder that detects motion in one direction to turn the lights on and motion in the other direction to turn the lights off. If one person leaves the room while others are still in there, a simple wave of the hand will turn the lights back on.
The part I don't know is how to detect which switch (sensor) activates first. I do know that the wave form has to overlap; so no need to point that out.
Encoder sine wave:
Blue wave first - entering room
Green wave first - leaving room
I'm familiar with volume controls on stereo's that use encoders to turn the volume up or down. It depends on which switch closes first that determines volume up or volume down. So I'm thinking the same sort of encoder that detects motion in one direction to turn the lights on and motion in the other direction to turn the lights off. If one person leaves the room while others are still in there, a simple wave of the hand will turn the lights back on.
The part I don't know is how to detect which switch (sensor) activates first. I do know that the wave form has to overlap; so no need to point that out.
Encoder sine wave:
Blue wave first - entering room
Green wave first - leaving room