• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Need circuit help? Post them in the comments! I've answered over 50,000!

Blog | Categories | About | Hire Me | Contact | Calculators-online
You are here: Home / Motor Controller / PIR Ceiling Fan Controller Circuit

PIR Ceiling Fan Controller Circuit

Last Updated on June 30, 2026 by Swagatam 141 Comments

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.

Table of Contents
  • Technical Specifications
    • The Design 
    • Circuit Diagram
    • The PIR Module
    • Sensing Human Presence

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

PIR controlled ceiling fan 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.

LDR and PIR controlled ceiling fan circuit

You'll also like:

  • Simple 220V AC Fan Regulator Circuit using Push Button
  • universal H bridge mosfet driver compressedEasy H-Bridge MOSFET Driver Module for Inverters and Motors
  • 50V BLDC motor controller using L6235 IC module50V 3-Phase BLDC Motor Driver
  • Single Phase Variable Frequency Drive VFD Circuit

Filed Under: Motor Controller Tagged With: Ceiling, Controller, PIR

About Swagatam

I am an electronics engineer and doing practical hands-on work from more than 15 years now. Building real circuits, testing them and also making PCB layouts by myself. I really love doing all these things like inventing something new, designing electronics and also helping other people like hobby guys who want to make their own cool circuits at home.

And that is the main reason why I started this website homemade-circuits.com, to share different types of circuit ideas..

If you are having any kind of doubt or question related to circuits then just write down your question in the comment box below, I am like always checking, so I guarantee I will reply you for sure!



Previous Post: « Programmable Solar Porch Light Circuit
Next Post: How to Test a MOV (Metal Oxide Varistor) Surge Protector Device »

Reader Interactions

Questions & Answers

Total Posts: 141
Newest Oldest
Jayanath Ranasinghe
September 23, 2014 • 12 years ago #25904

if any animal comes it will get on? i mean cat or dog? if human motion is not there will it remain on position?

Reply
SwagatamAdmin
September 23, 2014 • 12 years ago #25921

yes it'll detect all warm blooded living beings..

with nobody in the range the unit will stay shut off…and get activated when the same is detected

Reply
Souren Bhattacharya
September 28, 2014 • 12 years ago #26063

how many circuits are required for controlling 3/4 fans in a 350 sq/ft class room.?? is the sensor is available in kolkata?/

Reply
SwagatamAdmin
September 28, 2014 • 12 years ago #26070

A single unit would take care of each room comfortably, preferably it could be positioned on the center of the ceiling in order to get a radial view of the classroom.

All the fans could be controlled through the single relay for getting a simultaneous ON/OFF toggling.

PIR sensors have become too common nowadays, so it should be easily available in Kolkata too.

Reply
Chiranjit Samanta
October 11, 2014 • 12 years ago #26354

When I needs to change the speed of the fan then what happens otherwise it's controlled by human manually?

Reply
SwagatamAdmin
October 11, 2014 • 12 years ago #26363

speed control has no connection with the above circuit, it'll need to be controlled through a series regulator as usual

Reply
Chiranjit Samanta
October 11, 2014 • 12 years ago #26389

If I used the sensor for a cfl light or tube light, when I entire the dark room then it worked properly?

Reply
SwagatamAdmin
October 12, 2014 • 12 years ago #26409

yes it will work.

Reply
style
October 17, 2014 • 12 years ago #26575

Sir from where I will get PIR sensor and is it costly

Reply
SwagatamAdmin
October 18, 2014 • 12 years ago #26590

yes it will be a bit costly, inquire with your local electronic retailer, he'll know better.

Reply
Ankur Sengupta
November 16, 2014 • 12 years ago #27165

Sir, the problem I am facing after making the sensor is that .. If I have set the delay timing for 30sec.. And i am sitting in that area ideally i.e. there is no physical movement it would get automatically turn off after the delay timing.. Can u plzz suggest me how to rectify this problem of mine..

Reply
SwagatamAdmin
November 17, 2014 • 12 years ago #27177

Ankur, PIR devices are designed for sensing IR from our bodies not for sensing motion….so if it's not sensing your presence then may be you are not in the range of the device or there's some fault in the system components.

Reply
Bubai
February 12, 2015 • 11 years ago #28755

What will happen if I use 7812 for output of 12v when input of 12vDC instead of 7805 as +5v regulator ?

PIR device will burn ?
Please clear my concept.

Reply
SwagatamAdmin
February 12, 2015 • 11 years ago #28760

if your PIR is specified to work with 5V then surely it will burn.

Reply
Ashish
March 4, 2015 • 11 years ago #29119

sir what should i use as a 12v dc supply… should i design a rectifier circuit separately?…. or using a 12v battery could be a better option?… please guide..
Thanks

Reply
SwagatamAdmin
March 5, 2015 • 11 years ago #29130

Ashish, the 12V could be from a ready made 12V AC/DC adapter unit or any similar power supply.

Reply
manjunath
March 7, 2015 • 11 years ago #29173

sir can know the connections of relay 12v spdt in the diagram clearly , that i was new to electronics

Reply
SwagatamAdmin
March 7, 2015 • 11 years ago #29174

manjunath please go through the following article for more info:

https://www.homemade-circuits.com/2012/01/how-to-understand-and-use-relay-in.html

Reply
manjunath
March 16, 2015 • 11 years ago #29401

sir I had gone through above link but I have some doubts please solve it sure I will success in this circuit
1) which diod( number of diod) has connected from pir output
2) wheather both side of relay coil are same ( output and input) mean which side of coil is connected to collecter bc 547 and which side of coil to 7805
ground.

3) As in diagram first wire of 220v is connected to realy n/c and that 220v wire ic connected to fan and where to connect other wire of fan to

Reply
manjunath jain mp jain
March 16, 2015 • 11 years ago #29402

pirpir

Reply
SwagatamAdmin
March 17, 2015 • 11 years ago #29409

manjunath,

the diode can be a 1N4007

relay coil does not have a polarity, so you can simply connect it anyway round across the shown points.

an AC load will never have a polarity, so here too the shown load (fan) may be connected anyway round across the indicated locations

Reply
manjunath
March 21, 2015 • 11 years ago #29481

sir i had build the circuit as shown in diagram and connected light instead of fan and it seems to be not working properly, means if i close the sensor with paper or if nobody present in an range of sensor also the light glows, and while glowing if i went near the light will switches off for few seconds and then glows agalin by making small tik sound . what it means and i was not sure about connecting wire to relay.
i had connected 220 v one wire to nc and and another wire to light and then another wire of light to relays " com" NO of relay has been left without any connection
where the mistake has been occured please suggest me sir,
sorry for my bad english
sure

Reply
SwagatamAdmin
March 22, 2015 • 11 years ago #29494

Manjunath, you can first confirm the working of the PIR sensor separately by connecting an LED across its out and ground pins, while doing this you can keep the relay disconnected from the transistor.

check how the LED responds in the presence or absence of a human body, this will confirm whether the fault is in the PIR or the transistor driver stage.

Reply
manjunath
March 24, 2015 • 11 years ago #29525

sir, i had tested pir sensor with both buzzer and led. it was working properly,
then what may be the problem, please help me to correct the circuit . thanks

Reply
SwagatamAdmin
March 24, 2015 • 11 years ago #29530

please check it in the present set up that you have made, or alternatively you can connect an LED in series with the transistor base resistor, if this LED toggles as per the specs, but the relay doesn't then the fault could be in the transistor….for more info you can connect another LED parallel with the relay coil with a series 1k resistor…

check response from all these LEDs, it will help you to pin point the issue.

Reply
manjunath
March 25, 2015 • 11 years ago #29548

sir i had made new circuit of the same above, because of that i cant find the faulty stage. as i am an new to electronics but this was also the same as above so i dicided to send the real picture of my circuit made if you agree. i was so intersted that i dont want to leave this thanks

Reply
SwagatamAdmin
March 26, 2015 • 11 years ago #29553

manjunath, please do the steps which I mentioned in the previous comment, this is only way you'd be able to troubleshoot the circuit.

pls do it and check the results

Reply
manjunath
March 29, 2015 • 11 years ago #29598

sir please can you discribe the method of connecting an LED in series with the transistor base resistor to check th faulty stage, or any site address reguarding this . thank you for your cooperation.

Reply
SwagatamAdmin
March 29, 2015 • 11 years ago #29607

Manjunath, cut the link between the transistor base and the 1k resistor and then connect the longer lead of the LED with the 1K and the shorter lead with the base of the transistor

Reply
manjunath
March 31, 2015 • 11 years ago #29645

SIR, i had made above test by connecting led to transistor base, and another led to relay coil with 1k resistor . both led responce to sensor but led connected to transisitor was too low bright.(was any mistake in this stage) when i switch on both circuit and relay load , even though if no body present in front of sensor it goes on running,and if i move in front of sensor it switch off the load for few seconds and then goes on glowing. please slove this
thanking you

Reply
SwagatamAdmin
April 1, 2015 • 11 years ago #29658

The transistor base LED and the relay LED should light up together in the presence of a human in the zone and shut off permanently in the absence of a a human being

If the LEDs are lighting up with nobody around then there could be something wrong with your PIR device.

Reply
manjunath
April 1, 2015 • 11 years ago #29672

sir, sorry to disturb you that i had connected new pir sensor but it was working as before it had. in this comment section interested peoples who suceeded in this project please help me as i am not to disturb this comment section.
was this an right swagatham sir , my mail id
manjujain06@gmail.com

Reply
SwagatamAdmin
April 2, 2015 • 11 years ago #29685

The transistor base LED and the relay LED should light up together in the presence of a human in the zone and shut off permanently in the absence of a a human being

If the LEDs are lighting up with nobody around then there could be something wrong with your PIR device.

Reply
sskopparthy
April 5, 2015 • 11 years ago #29774

Please let me know the model of the PIR sensor that you've used, so that I could help you further in this regard.

Reply
manjunath
April 5, 2015 • 11 years ago #29778

sir i had used and tested " robodo hc-sr501" in this one is having trigger i think.
thank you

Reply
sskopparthy
April 6, 2015 • 11 years ago #29801

As far as I know, HC-SR501 sensor has its Vcc on the left and its control signal pin is its centre pin. If you have connected it correctly, it is not an issue but if you didn't, then you have to interchange the connections between Vcc and signal pin ACCORDING TO CIRCUIT DIAGRAM ABOVE.
If still it does not work, try replacing the transistor as you told that you even tried using a new pir sensor in one of your above comments.
Also recheck the connections that you've made and correct them (if any).
Above steps might solve your problem. Even after following above steps, if your cicuit does not work, try troubleshooting the circuit according to the instructions given by our senior, Swagatam sir.

Reply
manjunath
April 9, 2015 • 11 years ago #29902

sir, this project also succeded with your guidence. thanks a lot.
but as shown in diagram and reffering to relay topic, i had confused that wheather relay load has to connect to "NC or NO"
but my circuit working .SIR this just to clarify, thanks

Reply
SwagatamAdmin
April 10, 2015 • 11 years ago #29911

Thanks Manjunath, in the article the PIR is assumed to generate a high pulse on detection of a subject, so the shown connections of the load to the relay is correct, it's across the N/O point….N/C is open

Reply
Sham
June 15, 2015 • 11 years ago #31532

Hi Swagatam,
I have tried the above circuit for my kitchen light. It is working perfectly and a great way conserve energy. My kitchen has sufficient daylight during day time so i dont need pir to switch on the light during day time. I need it only during absence of daylight. How to get this done by using LDR in the above circuit?
I have seen your other articles on PIR but it seems to be complicate for me with dual relays and 555 timer. Please show me a simple way to do this.
Thanks,
Sham.

Reply
SwagatamAdmin
June 16, 2015 • 11 years ago #31544

Hi Sham, glad to know that the circuit is serving the purpose for you.

I'll upgrade the diagram as per your requirement, and post it soon in the above….please keep in touch.

Reply
Sham
June 16, 2015 • 11 years ago #31549

Thanks Swagatam. Looking forward to it.

Reply
SwagatamAdmin
June 16, 2015 • 11 years ago #31554

Hi Sham, it's been updated, you can check it out

Reply
Sham
June 16, 2015 • 11 years ago #31576

Ho very nice. Sure will check tomorrow and inform u. Thanks a lot Swagatam.

Reply
SwagatamAdmin
June 17, 2015 • 11 years ago #31592

you are welcome sham…

Reply
Sham
June 19, 2015 • 11 years ago #31631

Hi Swagatam,
I could not get back early. Please excuse me.
Tested the circuit today. Its working perfectly well. Once again hats off to you and thank you so much.

Reply
SwagatamAdmin
June 19, 2015 • 11 years ago #31642

Hi Sham, that's great, congrats to you on that. I am glad the circuit worked as intended.

Reply
Sham
June 19, 2015 • 11 years ago #31647

Swagatam,
I noticed that at some point of light intensity, the relay toggles continuously. I have placed the LDR on the other side of the light source. As the daylight fades off the relay started to toggle. Looks like it is not getting latched. How to fix this defect?
I have used 4.7uf across CE of LDR ckt and 100uf from BE of PIR ckt. Since i did not have 1uf and 470uf cap.

Reply
SwagatamAdmin
June 20, 2015 • 11 years ago #31652

Hi Sham, the light from the PIR lamp should not be allowed to fall on the LDR, otherwise it'll malfunction.

also for a stable response you can try connecting a 10uF/25V capacitor directly across the relay coil

Reply
Sham
June 19, 2015 • 11 years ago #31648

And btw i am using 100k pot at the base of LDR 547.

Reply
Sham
June 19, 2015 • 11 years ago #31649

OK. I got some suggestion from your other article.
https://www.homemade-circuits.com/2011/12/super-simple-light-activated-switch.html
I will try this and update you.
Sham.

Reply
View Older Comments

Need Help? Please Leave a Comment! We value your input—Kindly keep it relevant to the above topic! Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar



My Youtube Channel

Circuit Simulator

circuit simulator image



Subscribe to get New Circuits in your Email



Categories

  • Arduino Projects (95)
  • Audio and Amplifier Projects (134)
  • Automation Projects (18)
  • Automobile Electronics (103)
  • Battery Charger Circuits (88)
  • Datasheets and Components (109)
  • Electronics Theory (149)
  • Energy from Magnets and Earth (40)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (20)
  • Health related Projects (27)
  • Home Electrical Circuits (13)
  • Indicator Circuits (16)
  • Inverter Circuits (99)
  • Lamps and Lights (162)
  • Meters and Testers (72)
  • Mini Projects (28)
  • Motor Controller (68)
  • Oscillator Circuits (28)
  • Pets and Pests (15)
  • Power Supply Circuits (91)
  • Remote Control Circuits (50)
  • Security and Alarm (65)
  • Sensors and Detectors (107)
  • SMPS and Converters (45)
  • Solar Controller Circuits (60)
  • Temperature Controllers (43)
  • Timer and Delay Relay (50)
  • Voltage Control and Protection (44)
  • Water Controller (37)
  • Wireless Circuits (31)



Other Links

  • Privacy Policy
  • Cookie Policy
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap

People also Search

555 Circuits | 741 Circuits | LM324 Circuits | LM338 Circuits | 4017 Circuits | Ultrasonic Projects | SMPS Projects | Christmas Projects | MOSFETs | Radio Circuits | Laser Circuits | PIR Projects |



Recent Comments

  • Swagatam on True MPPT Solar Controller Circuit using IC 555
  • Swagatam on Electronic Circuit Projects, Tutorials, and Practical Engineering Solutions
  • Swagatam on Simple 20 watt Amplifier Circuits
  • Miracle on RC Helicopter Remote Control Circuit
  • Dale on Simple 20 watt Amplifier Circuits

Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Stack Exchange
  • Linkedin

© 2026 · Swagatam Innovations