The post explains a simple automatic PIR controlled ceiling fan circuit for school college use, which responds and switches ON only in the presence of a human (students) in the classroom. The idea was requested by Mr. Souren Bhattacharya.
Technical Specifications
I am, souren bhattacharya, a high school teacher in west bengal.
To reduce electricity used in my school classroom can you please make a circuit which can switch off/on fans (3/4 ceiling fans) in the classroom as per routine with a facility to manual override.
For example each class has one computer class and one physical education class in a week. we want to switch off ceiling fans when whole class is empty.
The Design
The design will require some kind of human IR sensor to be included, for example a PIR sensor device which looks to be the most efficient and effective for the proposed application.
Incorporating a PIR sensor makes the design pretty simple since most of the complex circuitry is handled within the unit itself.
The sensor just needs to be integrated with a triggering stage and a correctly rated power supply as shown in the following diagram.
Circuit Diagram


In the given diagram we are able to see a standard preprogrammed PIR module, a 7805 voltage regulator IC stage for supplying the PIR, and a simple 12 V transistor/relay driver stage.
The PIR Module
The PIR module has three terminals, the right one is the ground terminal, center one is the positive +3.3V or +5V, and the left terminal is the responsive output lead of the device.
When the particular assigned (+) and (-) terminals of the PIR device are connected to the specified supply voltages, the device instantly becomes responsive and begins "thinking".
No human presence or motion should be created in front of the unit's lens during this initial switch ON period for about a minute or so, until the device locks ON and puts itself into an alert or a ready stand by position.
The unit now becomes ready and responds to even the slightest human motion or presence in front of its lens by generating a positive supply at its output terminal.
This high at its output terminal persists as long as a human presence is detected within a radial range of around 20 meters in front of the PIR device.
Sensing Human Presence
The output turns into a zero voltage as soon as the human presence moves away or is removed.
The above well defined high/low voltage response at the output lead becomes ideally suited or accessible for a transistor relay driver stage as shown in the diagram.
When the PIR output is high due to the presence of a human (children in classroom), the transistor BC547 base receives the +3.3V out from the relevant lead of the device and quickly switches ON the relay.
The relay in turn switches ON the ceiling fan and the system stays ON as long as the students occupy the premise.
When the students leave and vacate the premise, the PIR instantly switches OFF its output to a zero voltage level.
However, the presence of the 470uF/25V capacitor at the output lead of the PIR prevents the BC547 from getting switched off instantly rather keeps it ON for a few seconds more after the PIR has reverted its output to zero.
After this delay the BC547 also gets deactivated, switching OFF the relay and the ceiling fan or any other desired load whatsoever that may be wired with the relay.
The above circuit may be effectively modified as given below for operating lights, with a feature making sure that it's implemented only during the night time and not during the daytime when ample daylight is accessible. The idea was requested by Mr. Sham.

Hello Sir I have been following your circuits and ideas with keen interest. Please I have a problem with a similar circuit. I an IR obstacle detector(3 pins – VCC-5v, GND and S-OUT) when it detects an object the output S, goes low. Now i want to drive a motor(5-12V DC) such that when IR detects an object the motor should stop, i used a transistor (TIP41) to rive the motor. I wish I can show my circuit here.
I will be happy if you can help me with a simple circuit to perform this
Hello Kofy, you can upload your image into any online free image hosting side and provide the link here, I will check it, and try to solve it for you..
Is there an alternative for PIR? the PIR we bought is not working.
sorry there’s no effective replacement for a PIR, a PIR mostly will work if configured correctly, make sure the pinouts are joined correctly, for more info you can read the following post:
https://www.homemade-circuits.com/pir-sensor-datasheet-pinout-specification-working/
Hi sir
Can I use two PIR ‘s in this circuit from different locations (different rooms). Because I need it to turn on when there is a human presence in the both rooms.
yes definitely you can do that, by connecting the output pins of the two PIRs through separate 1N4148 diodes and terminating the common cathode ends with the transistor base
Sir thanks for the prompt response.
And Pls suggest me a suitable transformerless circuit to power the above circuit
Naresh,
capacitive power supply is not recommended for this design, you must use a 12V SMPS adapter for operating this circuit.
OK can I use 5.5v cell phone charger and 5v relay?
yes you can try that..
I liked your idea it’s brilliant one but what if I got two fans in The same room and I want them to operate sequentialy
thanks, I am glad you liked it, by sequentially do you mean alternately? in that case you can use the other free contact of the relay and wire it with the other fan….
hi can i know what are the pin configuraion of the sensor ?
as per the orientation shown in the figure it is:
OUT—(+)—GND
sir
can i remove the capaciter from the circuit if i dont want delay in shutting off
can i use this circuit for automatic faucet…tell me if there is any modification
NVD, yes removing the capacitor will cancel the delay effect.
and it can be effectively used for an automatic faucet application…
no mods will be required
Thank u sir
I/p supply y r using 2 * IN4148.
For voltage drop using..
We can use one IN4007…
The output Ampere of IN4148 how much it will produce…
two diodes are for dropping 0.6V + 0.6V = 1.4V from the 5V.
you can use two 1N4007 diodes instead.
ampere consumption will depend on the PIR consumption. 1N4148 rating is 100mA
you can refer to the following article and check how the transistor is configured with the triac, the same can be done with the above circuit
https://www.homemade-circuits.com/2011/12/make-simple-refrigerator-thermostat.html