Person walks into room - light on. Walks out - light off. How to achieve?

Thread Starter

Tonyr1084

Joined Sep 24, 2015
7,853
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:
1595430494467.pngBlue wave first - entering room
1595430523303.pngGreen wave first - leaving room
 

SamR

Joined Mar 19, 2019
5,031
At one point I was the "guinea pig" for one of those devices in my office at work. It worked great, when I walked into my office the light came on automatically and when the office was unoccupied the light went off. However, when I was quietly sitting at my desk working, after its set time, the lights went off and I would have to wave my arm to get them to come back on. A real pain in the ass! Not to mention feeling like an idiot sitting in the dark waving my arms around. God Forbid anyone would have seen me doing it looking like some moron waving his arms in the dark.
 

dl324

Joined Mar 30, 2015
16,846
Motion activated lights are more commonly used. That's what the company I worked at used.

I installed LED bulbs so I don't care as much about lights being left on.
 

Thread Starter

Tonyr1084

Joined Sep 24, 2015
7,853
I have motion detector lights in the laundry room. Set to be on for ten minutes. Reason is - wife enters carrying laundry (or I do), lights go on. No putting the basket down to turn the lights on and then forgetting to turn them off. If you're in there longer and not in range of the detector the light goes off. Same would be true of the kids rooms. If they're sitting reading then a motion detector isn't going to fit the bill. That was one of our first thoughts. But instead of that I'd like to have the lights come on when you enter the room and stay on until you wave them off OR walk out of the room. No time limit - no arm waving, no getting up and walking around the room just to turn the lights back on.
 

dl324

Joined Mar 30, 2015
16,846
Same as you would if there was a light switch. Get up and turn it off. Or wave it off. Kind of Star Trekkie.
My parents just taught us to turn lights off when we left the room. My Mom would chastise us when we forgot by asking us if we were born in a barn.
 

Thread Starter

Tonyr1084

Joined Sep 24, 2015
7,853
Truth be told, I often forget to turn the lights off in my hobby room (laboratory). Wife gets on me for that. But I get on her for leaving the hallway light on. So maybe this project would be beneficial both in my daughter's house and in my own home.
 

Thread Starter

Tonyr1084

Joined Sep 24, 2015
7,853
Kids would still leave the room and forget to clap.
My parents just taught us to turn lights off when we left the room. My Mom would chastise us when we forgot by asking us if we were born in a barn.
And until you learned, the lights burned.
Assuming they're using LED bulbs, why bother? Pennies per month in electricity...
LED's use 20% of what incandescent used. Still, that's two hours to eight with LED's. Yet, the lights can be on all day if the kids are outside and being supervised. Who's going to do a walk through while kids play in the yard just to make sure lights are off. Over time it adds up.
 

ericgibbs

Joined Jan 29, 2010
18,766
hi Tony,
I also use PIR's for lighting control certain rooms, included a light/dark [night/day] detector outside.
If its light outside the room light PIR's do not switch the lights On.

E
 

Thread Starter

Tonyr1084

Joined Sep 24, 2015
7,853
Strictly an answer - stand (or sit) still and the lights go off. Then like @SamR said
when I was quietly sitting at my desk working, after its set time, the lights went off and I would have to wave my arm to get them to come back on. A real pain in the ass!
Today those motion detector switches come with a manual switch. The kids would probably turn it on so as to not be bothered with the wild arm waving. Then leave the room with the lights still on. Worse still, an adult sees the lights on and assumes they will go off in a minute or two. Then they don't go off.

My grandkids are really smart. They figure out ways to get into things they shouldn't be getting into. I've watched them build towers just to get at the cookies installed on top of the cupboards. ON TOP of the cupboards. Kids find ways around everything. A sensor that shuts the lights off when they leave? To defeat that they'd just duck under the sensor beam. But that would require effort and a desire to leave the lights on just for spite. But then comes the teaching moment as granddad gets the paddle out. Yeah, watch the kids run then.

Y'know that riot in Oregon where the Mom's made a line between protestors and unmarked cops? I think those moms should have been armed with wooden spoons. Gosh I remember the sting of a wooden spoon.
 

SamR

Joined Mar 19, 2019
5,031
I get fussed at when I walk down the hall turning off the unused lights in the rooms and miss seeing someone in the room! One of the schools I worked at installed a sound alarm in the lunchroom to alert when the kids were making too much noise. The idea being the kids would be quieter. Which instead the kids promptly made lots of noise just to make it go off!
 

Thread Starter

Tonyr1084

Joined Sep 24, 2015
7,853
@ericgibbs Obviously a good idea. That would probably have eventually come into play.

How about a pair of radar modules (such as these) in the doorway, plus some logic to determine the sequence of triggering?
That's kind of like what I was planning on doing with two beams a few inches apart. Break one beam and that's the first detect event. Break the second beam before the first goes active again and that indicates which direction a person is moving. No need for microwave transmissions in a kids room. No matter how small.
 

Thread Starter

Tonyr1084

Joined Sep 24, 2015
7,853
One of the schools I worked at installed a sound alarm in the lunchroom to alert when the kids were making too much noise. The idea being the kids would be quieter. Which instead the kids promptly made lots of noise just to make it go off!
Yeah, I can definitely see that.
 
Top