Automatic Led Stairs Controller

63,776

191

23

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!




Begin

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

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) {
delay_ms(50);  
    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;
        wait1();

    }
}
}

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 (https://www.instructables.com/community/Automatic-Led-stairs-controller-Box-not-included/) .

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!  

Be the First to Share

    Recommendations

    • LED Strip Speed Challenge

      LED Strip Speed Challenge
    • Sculpting Challenge

      Sculpting Challenge
    • Clocks Contest

      Clocks Contest

    23 Discussions

    0
    rmwilson
    rmwilson

    6 years ago on Introduction

    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 +/- )

    0
    ipf_group
    ipf_group

    Reply 2 years ago

    Now it work. You can buy rgb controller with memory function and use with my controller and choose color you need .

    Best regards

    0
    ipf_group
    ipf_group

    Reply 2 years ago

    Thanks

    0
    ipf_group
    ipf_group

    Reply 2 years ago

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

    0
    bsmith66
    bsmith66

    5 years ago on Introduction

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

    0
    ipf_group
    ipf_group

    Reply 5 years ago on Introduction

    Hi. i have wewbsite http://ipfgroup.co.uk/ there you can buy it
    Best regars

    0
    rmwilson
    rmwilson

    6 years ago on Introduction

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

    Ryan

    0
    esg.827
    esg.827

    6 years ago on Introduction

    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

    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 !

    0
    eddysmile
    eddysmile

    6 years ago on Introduction

    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

    0
    Orion96
    Orion96

    6 years ago on Introduction

    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?

    0
    ipf_group
    ipf_group

    Reply 6 years ago on Introduction

    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

    0
    ipf_group
    ipf_group

    Reply 6 years ago on Introduction

    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=v;
    v^=0x19;
    }
    TCCR0 = 0x00; //stop
    TCNT0 = 0x97; //set count
    OCR0 = 0x69; //set compare

    0
    srb_mh
    srb_mh

    7 years ago on Introduction

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

    0
    ipf_group
    ipf_group

    Reply 7 years ago on Introduction

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