Automatic Staircase Lights using PIR Sensor and Relay

Published  August 8, 2015   68
J Jayant
Author
Automatic Room Lights using PIR Sensor and Relay

This automatic staircase light circuit switch on the staircase lights automatically when someone enters on the stairs and gets off after some time. There are two important components in this circuit, first is PIR Sensor (Passive Infrared Sensor) and second is Relay.

 

PIR Sensor

PIR sensor is used here to detect the Human body movement, whenever there is any body movement the voltage at output pin changes. Basically it detects the Change in Heat, and produce output whenever such detection occurs. You can learn more about PIR sensor here, there are some useful features in PIR sensor like how to change the distance range, how to set the duration for which the light should be ON etc.

Also check: Automatic Staircase light using AVR Microcontroller

 

Relay

Relay is an electromagnetic switch, which is controlled by small current, and used to switch ON and OFF relatively much larger current. Means by applying small current we can switch ON the relay which allow much larger current to flow. Relay is the good example of controlling the AC (alternate current) devices, using a much smaller DC current.  Commonly used Relay is Single Pole Double Throw (SPDT) Relay, it has five terminals as below:

SPDT Relay Working

When there is no voltage applied to the coil, COM (common) is connected to NC (normally closed contact). When there is some voltage applied to the coil, the electromagnetic field produced. Which attract the Armature (lever connected to spring), and COM and NO (normally open contact) gets connected, which allow larger current to flow. Relays are available in many ratings, here we used 6V operating voltage relay, which allow 7A-250VAC current to flow.

 

Relay is configured by using a small Driver circuit which consist a Transistor, Diode and a resistor. Transistor is used to amplify the current so that full current (from the DC source – 9v battery) can flow through coil to fully energies it. Resistor is used to provide biasing to transistor. And Diode is used to prevent reverse current flow, when the transistor is switched OFF. Every Inductor coil produces equal and opposite EMF when switched OFF suddenly, this may cause permanent damage to components, so Diode must be used to prevent reverse current. A Relay module is easily available in the market with all its Driver circuit on the board or you can create it by using above components. Here we have used 6V Relay module.

Relay Module

 

Circuit Explanation

Circuit Diagram for Automatic Room Lights using PIR Sensor and Relay

This automatic staircase light circuit can be easily explained. Whenever PIR sensor detects any body movement, its OUTPUT pin becomes HIGH, which applies the triggering voltage to the base of the transistor, transistor get  ON, and current started flowing through the coil. Coil in Relay gets energies and create electromagnetic field, which attracts the lever and COM and NO get connected. This allows a much larger current (220v AC) to flow, which turns ON the BULB. You can increase or decrease the Bulb ON duration by setting up PIR sensor.

Video

Comments

Submitted by agentX44 on Mon, 08/17/2015 - 22:14

Permalink

do you have any tutorial for this project from the start ?Sorry I'm beginner. Thanks in advance

Submitted by VEERESH on Wed, 03/16/2016 - 19:22

Permalink

sir,may i know what kind of bulb u have used is it led bulb or regular zero watt bulb.
What happens if i use a zero watt bulb ?
Sir, I kindly request u to send me the clear picture of the connection because i am not understanding the PIR and the relay module connection from the above picture...THANK YOU..

Submitted by NITYA $ on Fri, 03/25/2016 - 21:37

Permalink

Hey, I like this project but
what type of relay module u r using ,
And if we use it in real it will work, or it will fuse after using for days
Please reply,

Submitted by MrTiger on Sun, 04/17/2016 - 17:54

Permalink

Great content! I'm new to this world of electronics so I hope my questions are not too annoying. This circuit scares me a bit because I'm used to working with 9v, 6v, and less. This circuit diagram shows to hook up a 220v ac in series with a 9v dc battery. Clearly I am not understanding this correctly. Please advise what I need to read to correct my understanding.

Submitted by AlexG on Mon, 04/18/2016 - 18:59

In reply to by MrTiger

Permalink

@Mr Tiger - you are mistaking the intersection points of the line going from B1 to VCC are connected to the 220v.
There's no easy way to draw it where the lines cross. As a check, if you imagine that the B1 to VCC line was removed, you can clearly see the DC side is separate fron the AC side.

Submitted by MrTiger on Sat, 04/23/2016 - 18:36

Permalink

I made this circuit this morning using components I already own. It was pretty cool to see it work. Thank you for sharing. For the sensor, and circuit I used 5.12 dc v(atm, my only steady power supply), and for the light source I used (9v battery, 330 Ohm, LED) because I fear an early death.

I got the relay module from an Arduino starter kit by Seeed Studio. TIANBO HJR 4102E

Submitted by Awes on Fri, 05/20/2016 - 19:22

Permalink

will this project work if we use 6v relay,instead of 12v

Submitted by Naved Alam on Sat, 06/04/2016 - 11:08

Permalink

Can we use this for office light in retriggering mode,if person is in its area would it continue working or switch it On/off continuously?

Submitted by Sharojalhasan on Sat, 06/18/2016 - 09:57

Permalink

i have made this And Not Working :( please Anyone Help me

Submitted by Kishore Relangi on Sun, 06/26/2016 - 18:50

Permalink

Hi,

Is it possible to add more delay to this ?

Because it will look very odd to switch the lights immediately.

Thanks,
Kishore.

Submitted by Jony Hossain on Wed, 09/07/2016 - 12:34

Permalink

I want to build a transformerless power suply.Please help me and some suggestion

Submitted by S.M. Bakhtiar on Thu, 09/08/2016 - 09:20

Permalink

Dear Concern,
I am working your project. which you have show is very much interesting. But my question is when one object is detected the how can i set long time as long as the object is present of that room then when the object is not in room then sensor will stop the supply.
Thank in advanced

Submitted by S.M. Bakhtiar on Wed, 09/14/2016 - 18:28

Permalink

Dear Concern,

I have got the delay answer what i mention in my previous post.

Now my question is , how do i connect LDR with the above circuit so that when there is dark on the room the light glow.

Thanks in advanced

Submitted by Aazan on Mon, 09/19/2016 - 00:18

Permalink

hi i dont know why but my project is not working i tried my best
i saw all the connection
i just did not put the relay module because i was not able to find it so i made the circuit as it was made in the digram still it does not work my light gets on but does not get closed wat do you thing wat will be the problem plz let me know plz help me sir plz and reply me as soon as possible plz some one help me i need help

I purchased PIR Motion Sensor switch to fix in a room containing 9 small lights each 6 watt. So total load comes 54 watt. Motion switch indicates that it works up to maximum 1000 Watt. Please let me know if one switch will be enough to work for all nine lights. Moreover can we fix on/off switches to control individually.

Submitted by shahid on Mon, 10/10/2016 - 00:48

Permalink

You don't mention R 2 on circuit diagram and also not to mention green colour tuning at your circuit diagram but I have see clearly those item (R2&green colour tuning) soldering at your Relay module and you have to use Relay module to complete your project not to flow your mention circuit diagram so please clear my confusing since I'm not a professional electronic person or stodent.

Submitted by Gokul MR on Sun, 01/22/2017 - 12:14

Permalink

does this circuit keeps the light 'ON' whenever there is a human presence at its range? or does it turns off after some time?? I've made a motion detector which turns of after some time (obviously!). also, i want to use a PIR based circuit for automatic light for my room. by that, when ever i enter my room, the light should turn on automatically and it will be on till i leave my room. so can i use this circuit for the same?? please advice. thanks in advance. :)

Submitted by Ignis on Thu, 01/26/2017 - 05:58

Permalink

Starter here, i wanna ask how long does the bulb will lit up after a movement. Or it will turn off immediately if there's no more movement. Thank you in advance.

Submitted by noah on Sat, 02/11/2017 - 20:23

Permalink

I couldnt find 6v relay. what can I integrate 12 v relay into the circuit

Submitted by Furqan Ali on Thu, 03/09/2017 - 18:34

Permalink

This circuit incomplete because not show R 2 on circuit diagram

Submitted by Deepti on Fri, 04/14/2017 - 21:05

Permalink

Hello Sir/Madam,
I really liked the project. My professor asked me a question: Why are u using relays when transistors are much faster and long lasting? Relays are also electromagnetic sensitive.
I could not answer this question. I am definitely missing something. Please clarify my question.

Regards,
Deepti.

Submitted by Manish on Sat, 05/13/2017 - 11:08

Permalink

Sir...
I wacth the video, in this video the light should automatically OFF after some seconds , when i used this CKT. In bathroom my the CKT. Dectet the motion and its ON (so, it will OFF in some seconds or it should ON till where should i was in bathroom ? ).

Submitted by Dharm patel on Thu, 06/29/2017 - 23:44

Permalink

Dear sir ,
I done this project as per diagram (as without relay module ,i connect relay switch)but my relay switch is countinuslly switching so plz solve it

Thank u.

Submitted by NEEL SHAH on Fri, 08/04/2017 - 10:47

Permalink

PLS SEND THE PCB LAYOUT ............
ON THE ABOVE EMAIL ID.
I WANT PCB LAYOUT OF Automatic Staircase Lights using PIR Sensor and Relay

Submitted by Ayan samanta on Wed, 09/06/2017 - 17:58

Permalink

sir , please tell me that can i use 5or 12v relay for ths project?

Submitted by Saran on Wed, 09/27/2017 - 15:19

Permalink

I am using a 5v relay module with red and green lights both are always on when I connect the battery. When I connect the light its on always and no effect from sensor. i tried keeping the sensor range to high and time to lowest nothing is happening. Please help.

The 5v relay module does not have a transistor (BC547) or the 1k resistor as in the picture. Hence connected them separately as per the circuit diagram and now its
working absolutely perfect.

Submitted by kaushik patel on Sun, 10/08/2017 - 16:44

Permalink

When we enter in room at this time if room have all ready light then our circuit is not run but if it has darkness in room and we enter at this time room light is on...so we connect LDR but in which place in circuit we connect LDR ??????

Submitted by Dayaram Gora on Fri, 10/13/2017 - 20:27

Permalink

hi, i made connection according to you circuit diagram, but my relay is not turning on. when i connect led at place of realy then it work well . i tested all voltage by using DMM. when i connect led then Pir giver 3.5v or when i connect relay then pir sensor give 0.7v . due to 0.7v transistor not turning on. can you tell me where i am doing wrong or which is my part is not working.?
thanks in advance.

Submitted by skufful on Sun, 01/28/2018 - 01:59

Permalink

I am working on a project that would require the use of multiple infrared detectors. I would like to use 4 + mini detectors. I would like each detector to have a maximum range less than 4 inches, and a rather narrow sensing range. I do not understand what the three legs do on a detector do, I assume positive, negative, and output? Some say the output drops off, some have high output? I just want to have a number of sensors that when any one of them detects a warm blooded animal within a few inch proximity (almost contact) to send a signal to a switch which closes it so that the normally open switch closes allow the power to flow like the light bulb (for a set time, 1 second or so) so the next function will occur. I am sure this is out there somewhere but I am not studied at all in this type of circuitry. Any help appreciated.

Submitted by Sanjay jhaveri on Thu, 08/16/2018 - 15:18

Permalink

Staircases light automatically if ready made its ok or please give PCB and components give the rate