Smart Staircase LED Lighting
![cover.png](/proxy/?url=https://content.instructables.com/FGD/9JAJ/IZ6CQ2EY/FGD9JAJIZ6CQ2EY.png&filename=cover.png)
![Smart staircase LED lighting](/proxy/?url=https://content.instructables.com/FHS/ZQSB/IZ6C5FP5/FHSZQSBIZ6C5FP5.jpg&filename=Smart staircase LED lighting)
![arduino.jpg](/proxy/?url=https://content.instructables.com/FG3/7T9X/IZ6C5FKI/FG37T9XIZ6C5FKI.jpg&filename=arduino.jpg)
![downstairs.jpg](/proxy/?url=https://content.instructables.com/FAK/6699/IZ6C5FKM/FAK6699IZ6C5FKM.jpg&filename=downstairs.jpg)
![upstairs.jpg](/proxy/?url=https://content.instructables.com/FA6/WUZ8/IZ6C5FKQ/FA6WUZ8IZ6C5FKQ.jpg&filename=upstairs.jpg)
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.
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.
Schema
![schema.png](/proxy/?url=https://content.instructables.com/FBI/HLGO/IZ6C5FKN/FBIHLGOIZ6C5FKN.png&filename=schema.png)
Downloads
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);
} }