Maker Pro
Maker Pro

Help pl..!! Automatic Human Sensing Fan

AjaYrUleZ

Aug 2, 2011
15
Joined
Aug 2, 2011
Messages
15
I would like to design a circuit that when some one leaves the room, the fan should be turn off. Same goes for lights and other appliances (T.V.'s). Can we come up with a small device, with an IR sensor with a timer that can shut off the device or turn on the device when a person enters the room? Somewhat like a room light sensor, Automatic Human sensing Fan/X ..??
Looking forward for the Reply & Thanks In advance :)
 

daddles

Jun 10, 2011
443
Joined
Jun 10, 2011
Messages
443
Why not just adapt a commercial switch to do what you need? All the design work has been done for you. :)
 

AjaYrUleZ

Aug 2, 2011
15
Joined
Aug 2, 2011
Messages
15
ok nice suggestion but i would like to have it done without a switch something like using an IR Sensor to sense Entry & exit...& then install motion detection by ultra sonic sensor for covering flaws made by IR..
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
There are a number of small PIR controlled lights on the market. It would be reasonably easy to wire them up via an optocoupler (or a relay perhaps) to switch a heavier load.

The problem is that if the person sits quite still, the PIR will no longer detect them (they generally respond to changes) and the load will be switched off.

Maybe someone else can think of a better solution.
 

donkey

Feb 26, 2011
1,301
Joined
Feb 26, 2011
Messages
1,301
there are devices that check for body heat and motion, there are infared beams, mats you can place near a door with switches in it.... the list of ways to turn things on is growing. the question is what size do you want it to be? you could use something like an infared beam(well my idea is 2) placed at the same height approximately 30cm(12inches) apart. when they are activated one way they switch on. when the other way they switch off.
you would have to add a counter to this, so if 3 people walk in 2 walk out, then it would "detect" one person in the room still so the fan stays on. as i said though how much room you got to play with?
 

poor mystic

Apr 8, 2011
1,074
Joined
Apr 8, 2011
Messages
1,074
Hi AjaYrUleZ
Sorry, no can do summary.
But! Can ask questions.:) Hope you don't mind.
The best solutions to a problem are usually found once the entire problem is understood. So, why do you need this circuit? What need does it address? What trouble are you trying to avoid by using this circuit?
 

AjaYrUleZ

Aug 2, 2011
15
Joined
Aug 2, 2011
Messages
15
Actually I wanted to go for that is not done as yet..!! I have started working on it i feel the PIR with ultrasonic sensor is the perfect combination.
& sorry mystic if i asked a wrong question. A newbie so ;(
once i am with the main idea i wanted to know how to go for circuit designing. I will be using Proteus with 8051.
 

AjaYrUleZ

Aug 2, 2011
15
Joined
Aug 2, 2011
Messages
15
Else if this is complicated lets make it simple.
can we use the IR household light switches (in the wall mounted) that works on a similar concept? They too have a timing device option once it is triggered or have a complete by-pass switch feature.

It would be nice to have an IR switch/timer unit that you plug the appliance you want (such as a fan or a TV). Also, since this will be a fairly bulky feature with the electrical plug(s), what if we use an extention cord IR sensing control (3 to 4 feet or more) that is small and can be affixed to the appliance, similar to a portable webcam. So, if the person using the device leaves the room, the IR senses it and starts the timing to switch off?
hope this makes some sense..!!
:)
 

AjaYrUleZ

Aug 2, 2011
15
Joined
Aug 2, 2011
Messages
15
Ok guys i have two different ideas :

The 1st is like a switch box with a built in IR sensor & timer. If it's possible, how about being able to plug in a IR sensor extension (this disables the box IR sensor).The extension sensor can be placed to the front of any appliance (say for example a cooling fan) to switch off when someone leaves the room.

And I have seen many of the older room light IR switch sensors, that if we do not move, the IR sensor turns off the light. I wonder if the IR sensors are now more sensitive, especially people who sleep on the couch (or bed) with minimum body movement? If the sensor can detect body heat and stay on, the better.

The 2nd Idea is an IR sensor timer on an extension cord. Smaller, sleeker one.

sO can anyone suggest me.. whch one suites the best.??
thx in advance ;)
 

donkey

Feb 26, 2011
1,301
Joined
Feb 26, 2011
Messages
1,301
ir sensors are notoriously bad if placed incorrectly, not cleaned... the list goes on. also if you set it to be too powerful then it will detect small movements like the fan blowing a page(depending on distance of course). I am unsure if i made myself clear with the idea i said before so will re iterate it and try to include some diagram. the basic concept is use an infared detector like in shops(the one you walk through and the ding dong lets the people know someone is in their shop). use 2 of these spaced apart (i suggest 30 cm for good measure) then hook them up to a simple counter circuit. if you cross beam 1 then 2 you have walked into a room and a counter goes up, if you leave the counter goes down. when the counter "detects" more than 0 people it will close the circuit activating the fan. when there is 0 people it will turn of. this is a basic device i have used on nightclub entrances to tell us how many people are inside. it depends on space though and number of entrances to the room.
http://imageshack.us/photo/my-images/638/diagramone.png/
anything that needs explaining feel free to ask. the infared beams come from a device like http://www.photonage.com.au/images/images/prod/S/S5335.gif
if you are set on using pir there are ones that detect movement, heat, sound... it just depends on what you want and if you will be doing something that will make the sensor keep the circuit closed.
 

AjaYrUleZ

Aug 2, 2011
15
Joined
Aug 2, 2011
Messages
15
Now i got your Idea. Thanks but why in the pic you have mentioned bad choice for ceiling...??
 

AjaYrUleZ

Aug 2, 2011
15
Joined
Aug 2, 2011
Messages
15
Can i know why cant i go for a switch box with a built in IR sensor & timer & plug into it a IR sensor extension.But what i feel is this would disable the box IR sensor. The extended sensor can be placed to the front of any appliances to switch off when some one leaves the room. The below sketch would make you clear : http://i53.tinypic.com/24vmuep.jpg

Ok guys i have two different ideas :

The 1st is like a switch box with a built in IR sensor & timer. If it's possible, how about being able to plug in a IR sensor extension (this disables the box IR sensor).The extension sensor can be placed to the front of any appliance (say for example a cooling fan) to switch off when someone leaves the room.

And I have seen many of the older room light IR switch sensors, that if we do not move, the IR sensor turns off the light. I wonder if the IR sensors are now more sensitive, especially people who sleep on the couch (or bed) with minimum body movement? If the sensor can detect body heat and stay on, the better.

The 2nd Idea is an IR sensor timer on an extension cord. Smaller, sleeker one.

sO can anyone suggest me.. whch one suites the best.??
thx in advance ;)
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Can i know why cant i go for a switch box with a built in IR sensor & timer & plug into it a IR sensor extension.But what i feel is this would disable the box IR sensor. The extended sensor can be placed to the front of any appliances to switch off when some one leaves the room. The below sketch would make you clear : http://i53.tinypic.com/24vmuep.jpg
Why does the IR sensor need to be close to the appliance? Why not anyplace that has a good view of the room?

Bob
 

donkey

Feb 26, 2011
1,301
Joined
Feb 26, 2011
Messages
1,301
as for the ceiling fan, after i pput it in i realised 2 things. 1st to wire a ceiling fan up to my circuit would mean going into the house wiring...never a good idea, and 2 it was the worst choice for representing a ceiling fan....it was a circle.

anyway i agree with BobK on the placement of the sensor, most sensors go in a corner and get a good view of the entrance and majority of the room. if you are sitting down in this room the chair might be a good place to have it "looking at".
depending on the sensitivity the timer may cut out quite often if you do stay motionless for a while too.

the problem with my setup is it DOES need 2 beams to be efficient as otherwise when you walk in or out of the room it will not be able to tell. so if 2 people walk in 1st will turn it on 2nd will turn it of.
 
Last edited:

AjaYrUleZ

Aug 2, 2011
15
Joined
Aug 2, 2011
Messages
15
Ok then ,I need a bit of clarification on the twin IR beams? Is this fro someone close to the device and if they don't brake the IR beam, then the timer for setting the device goes into effect?
 

TBennettcc

Dec 4, 2010
292
Joined
Dec 4, 2010
Messages
292
You need the IR beams with a counting device. When someone breaks the first beam, then the second, the logic circuit detects someone walking into the room, and the counter increments. When the second beam is broken first, then the first one, the logic circuit detects someone walking out of the room, and the counter decrements.

Might be able to keep track of time and detect signals from both sensors. If so, maybe something like this would work:

if(IR_sensor_1 == tripped){
get_time_last_tripped_from_sensor_1
get_time_last_tripped_from_sensor_2
if(time_difference_between_two_trips < 5 seconds AND IR_sensor_two_tripped_last){
increment_counter
}//ENDIF_INCREMENT
if(time_difference_between_two_trips < 5 seconds AND IR_sensor_one_tripped_last){
decrement_counter
}//ENDIF_DECREMENT
}//ENDIF_TRIPPED

while(counter == 0){
fan == off
}//ENDWHILE

Not sure how much programming experience you have, and/or if you can read that pseudocode. I would think something like a microcontroller should be able to handle that, but I don't have much experience with microcontrollers.
 

donkey

Feb 26, 2011
1,301
Joined
Feb 26, 2011
Messages
1,301
sorry had long day at work. tbennettcc ty for the clarification mate.
 

AjaYrUleZ

Aug 2, 2011
15
Joined
Aug 2, 2011
Messages
15
Hey TBennettcc thanks a ton for the code. But, As far as i know i feel the code above is pretty incomplete i mean if sensor 1 detects then sensor 2 detects then counts up & so on No doubt this is perfect but for outgoing i feel its pretty incomplete.
As you said " if(time_difference_between_two_trips < 5 seconds AND IR_sensor_one_tripped_last)
{
decrement_counter " Imagine one person comes in the room but does'nt continue and comes back then the device counts down and it's not true.
I think we should add this condition as well...??
 

TBennettcc

Dec 4, 2010
292
Joined
Dec 4, 2010
Messages
292
My pseudocode was by no means intended to be complete; rather, it was intended to give a general sense of concept donkey was describing. A few posts up, donkey suggests a spacing of 30 cm between the two beams. This is about 1 foot. If someone walks into a room less that one foot and changes their mind, they will have only tripped sensor 1. According to my pseudocode, they would have to trip both sensor 1 and sensor 2, and the time difference between the two trips cannot be greater than 5 seconds. This would mean if they walked into the room less than one foot, then turned around and walked out, it is true that sensor 1 would be tripped twice. However, since sensor 2 was not tripped at all, the time difference between the two trips would be greater than five seconds, and therefore the condition is false, which does not result in an increment or a decrement. If they did trip sensor 2, then change their mind and exit, sensor 1 would show the later time, and both triggers being within five seconds of each other, would properly decrement. (Ah, I see what you mean... this is wrong, considering it did not first properly register an increment. Gotcha.)

After you detect the break in sensor 1, put in a delay of 6 seconds before any logic is processed. This gives sensor two plenty of time to be tripped and detected within the logic window. That way, it is possible to detect both entering and leaving.

If you think you have a better solution, please feel free to modify my logic. You know what you want moreso than I. I'm just glad to get you started.

If you really want a super-accurate count, make sure people file past the detectors one-by-one, single-file. Even better, use a

P.S. - You're welcome, donkey. Happy to help anywhere I can. After programming for years in college, I might as well put it use somewhere, right?! :)
 
Top