In this post I have explained 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.




Comments
The system uses a PIR sensor to detect motion, triggering both the fan and light to turn on when someone enters the room. Additionally, two manual switches allow the user to override automatic behavior and control the fan or light independently. The fan is controlled using a PWM signal to allow speed control, while the light is toggled via a digital output or a relay. need a schematic for that.
NOTE: Will be Using Labjack U3
You can try the following design:
https://www.homemade-circuits.com/wp-content/uploads/2025/07/PIR-controlled-light-and-fan-circuit.jpg
Can you please guide me in selecting the components specifications if i have to control the total power supply to the room having 4fans and 6LED tubes.
The load you have mentioned will not consume more than 6 amps, so a 10 amp relay should be enough.
You can use an 12V OEN type relay, as shown below:
https://www.homemade-circuits.com/wp-content/uploads/2015/04/OEN2Brelay.gif
You can use the following simplified circuit, it is tested by me:
https://www.homemade-circuits.com/wp-content/uploads/2024/04/PIR-fan-controller.jpg
Thank you for the clear and concise explanation of a simple circuit. I have one question, can the relay be connected to the phase wire coming into the room instead of the fan or light?ay connecting to fan or light, can we connect it to phase wire comming in to the room
You are welcome.
The phase wire has to be in series with the relay contact and the load, the same is true for the neutral wire…The phase, the load, the relay contacts, and the neutral, all should be in series, it doesn’t matter in what sequence they are connected.
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
good day sir
i have made the circuit and its working perfect but its delay period is not so long since the 470 mf capacitor is charging to 3.1 v ( the output volt of the pir module. so inorder to get more delay period how to charge the capicitor to more volt like 12v what modification can i use in the above ckt to get more delay time (i even use 1000 uf still not effective
thaku sir
john
John, you may have to do the following modifications:
remove the relay from the collector of the BC547 and replace it with the 470uF cap.
take a BC557 transistor, connect its base to the collector of BC547 via a 22k resistor….connect its emitter with the positive..and connect the relay across its collector the negative supply line.
goood day sir
i would like to make a pir sensor activating light using 4538 timer ic ,the purpose is the delay period of pir module which i am having is anly about 20 sec
and it turns off before it retriggers.so inorder to get the delay period more can i use a 4538 timer ic . if it posible pls help me how to connect the triggering signal to 4538 ic
thanking you
john
John, you can use a 555 based monostable for the purpose, because using a 4538 could make the configuration unnecessarily a little complex
you can use the following concept with the above PIR ciruit:
https://www.homemade-circuits.com/2014/06/input-trigger-synchronized-monostable.html
Eliminate R3, R4, BC557 from the circuit….and also remove the relay from the above PIR circuit
now simply connect the junction pin#2 and R1 from the 555 circuit with the collector of the BC547 of the PIR circuit
sir, in the above circuit can i use "TWO" pir sensors that results in activating load (light) in two differnt locations. if presence of human in any one of sensor the load should activate how can i insert another "pir" sensor thank you .
Manjunath, yes that can done by configuring the second PIR exactly as the shown PIR in the diagram.
the junction of the 1K and the 470uF gets the input feed from both the PIRs via individual diodes
the supply terminals are joined as per the shown PIR wiring
Good day sir, I am an electrical /electronic engineering student in Nigeria and I have been building most of your circuit ever since and I have to say a very big thanks to you, you are a great man.
I want to build the circuit above but I have a problem with the PIR sensor, I couldn't get the exact model used in the circuit but found another model with five pins/terminals with model number (SV612A-V1.4).
How can I use this model in the circuit above?
Hi Gerald, I am glad to know that you could succeed with many of the circuits from this website.
Please go through the datasheet of the PIR as referred in the previous comment, you should be able to figure out the wiring details, if you still have problems, let me know about it I'll try to help.
Dear sir good day to you,
It works perfect for me. But not accurate. How to adjust Retriggering' option ? (L&H position)Why is this? Can you please tell me?
Hi, you can check out the datasheet of the unit below, and configure the circuit accordingly.
http://www.gme.cz/img/cache/doc/754/295/pir-modul-sb00612a-2-datasheet-6.pdf
Dear sir, good day to you
I tried to build the above circuit but encountered a problem with the PIR sensor.
I couldn't find the the exact model in my country but found another one with five pins with model number (SV612A-V1.4). please sir, how can I use this model in the above circuit?.
Dear Rajkumar,
Please Google "PIR retriggering" and you'll be able to find the the required answer online.
and if you want the circuit to be more sensitive then you may have to employ an opamp for the amplifications, as explained in the following article.
https://www.homemade-circuits.com/2012/10/how-to-understand-and-connect-passive.html
He connected the relay wrong. He should have connected it to the n/o instead of n/c.
I'll try to design it if it seems feasible for me….
Yes sir. That would be okay for me sir even if the design is not easy. Can u pls design it sir?
Sansa, do you want the themistor for detecting the room temperature and activating the fan automatically?? that may not be possible with an easy design.
Good day sir. I was so eager to do the circuit but can i request something sir. Can you pls make a circuit also sir that has pir sensor and thermistor as one of the components sir?pls sir. We have our research project and i dont know know how to make tge circuit sir
yes it can be used if its working specification is similar to the shown model.
The type of pir sensor that u use hir sir is not available in our country. i had seen this type of pir sensor revision B 555-28027. Is it ok if i can use it in place of the sb612a-02-001 pir sensor?
You can use any 12V, 5 amp relay, as shown at the end of this article
https://www.homemade-circuits.com/2012/01/how-to-understand-and-use-relay-in.html
Thanks sir. What about the relay sir? What is the maximum and minimum ampere should i use in the ckt so it would work properly?
Sansa, thermistor will not work in place of PIR..if you are planning to make a temp controlled fan then that will be much complex
sir,i am planning to add thermistor in the circuit. will it work? and where can i connect the thermistor if ever sir?what connection is best suitable ?
what kind of pir sensor will i use here sir?