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

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

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

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

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!