Smart Staircase LED Lighting





Introduction: Smart Staircase LED Lighting

About: Software engineer, fan of electronics and videogames.

For a long time, we've been turning on the lights at the beginning the staircase, just to turn them off when we reach another floor.

But instead, we built a simple system to turn them ON automatically when you are going upstairs or downstairs, just by using a couple of IR proximity sensors, a relay and an Arduino Pro Mini, to control the timing.

If you want to build your own, just follow our guide.

Step 1: Shopping List

You can optionally use a power converter (from 12v to 5v) if you want to take advantage of the 12v input to power your Arduino and sensors.

Step 2: Schema

Step 3: Arduino Code

#define IR_RECEIVER 8

#define RELAY 10

void setup() { // initialize digital pin LED_BUILTIN as an output. pinMode(RELAY, OUTPUT); digitalWrite(RELAY, LOW);


// the loop function runs over and over again forever void loop() {

int sensorValue = digitalRead(IR_RECEIVER); // print out the value you read: delay(10); // delay in between reads for stability

if (sensorValue == 0 ) { digitalWrite(RELAY, HIGH); // turn the LED on (HIGH is the voltage level) delay(5000); } else { digitalWrite(RELAY, LOW);

} }



    • Casting Contest

      Casting Contest
    • Planter Challenge

      Planter Challenge
    • Make it Move Contest

      Make it Move Contest

    We have a be nice policy.
    Please be positive and constructive.




    Very nice!

    I've also fiddled around with a lighting solution for my stairs to replace the traditional light bulb and came up with this:

    Basically the same idea (PIR sensors and an atmega328) with a few tweaks. For me the goal was powering the thing with a 5V 1A phone charger (or a power bank), I wanted it to light up even if it was no power coming from the wall.

    3 replies

    hi i like it ... i am trying to build by using arduino uno and two pir sensors and relays and 5050 rgb leds 4sets. problem is when down pir detects and process starts and when a person reach to up then the up pir sensor also detecting it and reserving the process and running it after first process completed automatically... that is it detects as up to down processs...

    Sorry for the previous comment, i didn't understand the problem properly, the issue can be solved in code, you may want to add a time period in which the sensor input is ignored to avoid that false trigger. But it's up to you to play with the timing until you find a solution that works best for you. I've gone with a 2.5s delay after the leds started turning off.

    You can put a glass shim near the sensor so it blocks the infrared radiation from the opposite side of the staircase. You can adjust it so it only triggers up to half of the way ?

    if you travel down to up then the down ir detects and starts the process and when you reach to up then up ir also detects so what is the result ? i am working with pir sensors but my problem is after down pir sensor detects and process started person cross to up pir then up pir also detects and reserving the process and running process automatically after first process completed... how to put hold one pir sensor if another detected... ....

    Hey, we made the very same thing just one year back. :) Will be making a video on it but planning to give some upgrades.


    Nice project, you may be interested in this one, for ideas on adding animations and controls:

    With 2 sensors you can build a flip-flop without time consideration.

    I just ordered an IR fired lamp for my hallway, this'd probably be better since it senses in both coming and going directions, good design here. ☺

    1 reply

    Nice, before using these 2 IR sensors, I used a PIR sensor in the middle of the staircase, but it was very unstable. It was even turning itself on when the oven in the kitchen was working (because of the invisible heat wave, I guess).

    Very nice.
    I knew it already but never get idea to use it on stairs.
    Thanks a lot...