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 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.
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:
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.
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.