Automatic WashRoom Light Control Circuit

Status
Not open for further replies.

sulemanzp

Newbie level 5
Joined
Apr 3, 2010
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
lahore
Visit site
Activity points
1,378


Hi every body.

I am trying to create automatic light control circuit for washroom. I made some thing and want to share with experts. Please check the circuit and tell me if I am missing or using anything extra in the circuit.

Let me explain my circuit and problem;
I place magnet on the door and this circuit above the door.
suppose the door is close and nobody is inside.
1- Door opened - magnet pass near REED switch, it pulse the 4017 clock and relay turned on/ light on.
2- door closed and reed switch again triggered and 4017 counter goes to Q2, light still on because somebody is inside the washroom.
3- door open and reed switch trigger, 4017 counter goes to Q3 and light turns off. because somebody is trying leave washroom.
4-door closed reed triggered and 4017 just reset to Q0 and light remains off, because no body is inside the washroom.
this will repeat if anybody else want to go to washroom.

So what you think and suggest Experts.
 

The reed switch gives a digital output so you don't need the op-amp at all.

The problem with the circuit is it doesn't actually check if someone has entered the room. For example, if someone opens and closes the door then opens it again to enter, the circuit gets out of step and turns the light off as they enter.

There is partial fix, to make it reset itself on a timer after a few minutes so it has chance to resynchronize if the door isn't opened for a while. A better solution is to use two light beams and sensors arranged so the order the beams are broken by someone passing through them, this allows you to count people in and out so the light only goes out when the roomis empty. You could also use PIR of course!

Brian.
 

Thanks for your great suggestions. I am only making it for washroom, so I don't think that counting the people going inside or outside is important. Also I am taking your suggestion about timer to turn off the light, but what happens if someone take long time in washroom but the light goes off and will not turn on until they open the door again.
 

The contacts of the reed switch, any other mechanical switch or relay contacts bounce a few times when they open or close and the CD4017 will count every bounce. Then your counting sequence will get mixed up unless you use a debounce circuit or filter.

I use TWO light bulbs in my washrooms in case one of them burns out then there is still light.
 

I didn't mean it to be used to count the washroom usage, I meant that if the number of people entering was more than the number leaving, someone is still inside. You add one to the count as someone enters and subtract one as someone leaves, if the result is zero it should be safe to turn the lights off.

Audioguru is quite right about the 'bounce' problem with reed switches. The logic circuit can respond to extremely short signals so any repeating as the reed closes or opens will count as more than one operation. It should really be 'de-bounced' which is a term meaning it should be made immune to very short switch operations and only respond when the switch has remained stable for a few milliseconds.

Brian.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…