Introduction: Automatic Led Stairs Controller

Picture of Automatic Led Stairs Controller
This instruction is how I assembled my Automatic Led Stairs Controller.  

What Is a LED stairs controller?
The video shows how it works!


Step 1: The Idea

Picture of The Idea

Many of you have already seen such controllers and a lot of people assembled something similar to it, but I will show you my version.

The main idea was taken from  Alan's Parekh video, many thanks to him.

The idea was this: When I get up at the middle of the night to get some food, I have to go down the stairs from the top floor and then up the stairs again. One day I've decided I need an automatic backlight so I don't  turn all the lights on and wake my family up. Plus I wanted a nice smooth turning on and off so it doesn't irritate sleepy eyes. Also the device had to be error-resistand, ignore sunlight, remotes and other things.

And so in order.

Step 2: Electronic Components

Picture of Electronic Components

At first I was going  to use an Arduino, but then I've decided to make an individual device.
The heart of the controller is an atmega16a-pu chip which has a lot of outputs.
As for load control (12V 1W or more), I've used transisters 2sc2655 as they are powerful enought for what I needed.
For LCD i'm use LCD 16x2 (HD44780 chip)

The sensors I first thought to use was version of the IR lED and IR Transistor, but the distance within it's sight could not get more than 1 meter, so it was decided to use TSOP1838 + Modulation 38kHz .

To power this all up I've used the converter LM7805 + Heat Sink.

Resistors and capacitors you can see on the motherboard of the device.

Step 3: The Algorithm Works

Picture of The Algorithm Works

The algorithm itself is quite simple.

The task was as follows.
When crossing the infrared beam at the bottom of the stairs - the LEDs smoothly light on upwards.
When crossing the infrared beam at the top of the stairs - the LEDs light on down smoothly.
In case when both beams are crossed at the same time- all the LEDs light on smoothly

After a certain time, preset using the display and the keyboard the LEDs light down smoothly in the same direction, in which it has been turned on.

All the delays are set and controlled by the display.
Several iluminating effects can be find in the menu. 
And the choice of outputs (1 to 16)

The program was written in CodeVisionAVR.
I will not post the whole code , but here are some main points:

unsigned char mask;

void processUp(){
if(datUp==0) {
    for (mask = 0x01; mask; mask <<= 1)
        PORTC |= mask;
        wait1();   /

    // delay
    wait1();   // delay before lighting down

    //now lights off (in the same direction)
    for (mask = 0x01; mask; mask <<= 1)
//   for opposite direction:
    //for (mask = 0x80; mask; mask >>= 1)
        PORTC &= ~mask;

Step 4: Finish

Picture of Finish

Here is how the completed device lookes like. Originally I was going to order two PCBs, but the minimum order quantity was equal to 10, so I am happy to sell the rest. For details please visit link ( .

Thank you for looking , I now have my first instruction posted! If you have any questions , please feel free to write it in a comment section below. I will answer to all of you!  


Navaz BackerN (author)2017-04-15

Need a kit

ipf_group (author)Navaz BackerN2017-04-16

Hello. No problem, i can sale kit for you. Please send me email to for more details.
Best regards

InteractiveHome (author)2016-12-31

Good idea!

matthewtweedie (author)2016-09-14


bsmith66 (author)2015-01-30

whats the point of buying your boards if you dont post the code?

ipf_group (author)bsmith662015-01-30

Hi. i have wewbsite there you can buy it
Best regars

rmwilson (author)2014-01-26

For any one interested in one of these controllers I currently have mine for sale. I purchased it but does not work for my project ...


rmwilson (author)2014-01-26

I ordered this board and started my project ..

However I wanted
to wire RGB LED strips lights rather than individual LEDs for each
step, the board will light the steps when it is set to program 3 (manual
- ALL stairs on all the time) but seems to be having all kinds of
problems - the sensors do not seem to work at all and the program will
not light the LED strips (with RGB controllers attached to them) in a
consistent order or manner ... some times they all come on some times
they don't - some times they come on in sequence but in different
colours... some times they don't come on in sequence.

However the sensors are certainly not working right at all from the get go... no matter what LED lights I use - RGB or regular. No matter what i do to break the beam or trip the sensor they do not respond as expected...

NOTICE- this does NOT work with LED strip lights attached to RGB strip
light controllers... ) My set up is 16 stairs with 16 separate 36" long RGB LED
strip lights (one for each stair) and each led strip light is wired to a
RGB controller (that came with them) and each LED RGB controller is
wired to a channel on the board +/- )

esg.827 (author)2013-12-03

hello, i really loved this project, could it be possible for you to send me the schematics for a diy project??

thank you very much

offtherails2010 (author)2013-08-30

Good day to you,

im extremely interested in this for my home's stairs would you please please be able to share the schematic and sketch with me ?

I'd be making the PCB homebrew style so it wont be a nice as yours, lol, just be great if you could email me the details !

A Great many thanks in advance for your help !

eddysmile (author)2013-08-28

helo......friend, my name is eddy, i am form indonesia
how can get the BCP schematic and code source from the project I like this because I need do this in home can u buy and post me to indonesia

Orion96 (author)2013-08-19

how could i do this without the keypad or lcd, just a simple switch using the IR LED and a sensor but still keeping the effect you did with the LED's turning on?

ipf_group (author)Orion962013-08-19

For slow on/off leds i used portc-portd atmega legs with powerfull transistors and code for PWM.
For easy way you need take controller with xx legs (dont know howmany steps you have)
+ 3-4 aditional legs for sensor and ir led. Then make program for slow on\off

ipf_group (author)Orion962013-08-19

For ir led and sensor (if use tsop sensor) you need modulated ir led 36 or 38khz.
For modulation i use PortB2 at atmega 16 with code
interrupt [TIM0_OVF] void timer0_ovf_isr(void)
static char v=0x19;
TCCR0 = 0x00; //stop
TCNT0 = 0x97; //set count
OCR0 = 0x69; //set compare

srb_mh (author)2012-08-16

Is there any chance for us to see the electric diagram of this project for a DIY? Thank you!

ipf_group (author)srb_mh2012-08-16

Private message please )

chandshar (author)2012-07-05

now avaiable on ebay.......£179.99

ipf_group (author)chandshar2012-08-16

It's so BIG price. At my ebay 99usd + free worldwide shipping )

badmad2003 (author)2011-12-28

How can place an order?

ipf_group (author)badmad20032011-12-28

See private or see link at the end of instruction.

badmad2003 (author)2011-12-28

Good idea, good quality and low price

ipf_group (author)badmad20032011-12-28

The idea is not mine, but thanks

About This Instructable



More by ipf_group:Automatic Led Stairs Controller
Add instructable to: