Monday, December 5, 2011

LED's

They say LED's are the new ECO-friendly lights. And it's true; they only use a tiny part of the energy the old Phillips light-bulbs used, for the same light output. So why not engulf your home with LED's?

One reason would be that LED's are still very expensive relative to the old light-bulbs. Even when you take their longer lifetime into account. The weird thing is, LED's aren't that expensive at all. They become expensive ones they're integrated in a design replacement bulb or fancy armatures (LED's can't be connected to your home outlet without some extra components to regulate current en voltage).

So when you buy only the LED's to build your own armature, then there's no limitation to how to light your home with lots and lots of LED-lights. So... where to start? My though was: the staircase. Because you go frantic with moving lights up and down the stairs, triggered by sensors on the steps. Could be fun to build and to program different 'movies' for my own stairway.

First step: buy some really cheap LED-strips. Preferably the RGB-leds. RGB-leds are just regular LEDs, only they managed to put three of them in one tiny chip, in three different colours (reg, green, blue). I found out that you can buy virtualy every kind of LED on eBay, so I ordered 10 meters of 5050-led-strips with 30 rgb-leds per meter, and paid only about 30 euros for it.

12 RGB-Led-strips connected to a piece of telephone wire
Every strip has one +12v and three ground connections (called common anode). Using pulse width modulation (PWM) to control the intensity of every LED-colour-channel, I can create thousands of different colours.

So there we are: step two. We need a lot of PWM controllers. With 12 steps, 3 colours per step, we need 36 PWM channels. My Arduino Uno only has 6 of them, so that's not an option. Texas Intruments has a solution: TLC5940, a 16 channel PWM unit with 12 bit duty cycle control. It has a serial input, and can be daisy chained to create even more channels. In this case, I need 3. Luckaly there is a library for this chip in the  Arduino Playground (I'd be suprised if there wasn't).

three daisy chained TLC5940's connected to an arduino and  some test-led's. (don't mind the old C-stamp on my breadboard, it's just stuck there)
Next step: make a decent circuit board:


Attach stips to stairs:

And fire it up!




Part 2 will be connecting the sensors to trigger the effects...


9 comments:

  1. I like it! :D
    Actually very similar electronically to something I'm working on: ( http://rambo.co.za/?p=275 )

    I don't see your solution for a problem I ran into though, you seem to be using about 27 LEDs per stair or almost 1meter of strip which draws >250mA per color at 12v, however the max current the TLC5940 can sink is ~120mA.. so you're not getting full brightness? I overcame this by using common cathode strip and small PNP tansistors..

    Otherwise awesome little project! makes me wish I had stairs in my place...

    ReplyDelete
  2. You're right, 1m of led strip driven full brightness would fry the TLC5940. Here's my solution: don't do it :-)
    Here's some facts regarding current limitation in my project:

    - One strairway-step is 80cm (24 rgb-leds)
    - the strips are made for 12v but powered with 9v
    - I use a much higher current limitting resistor on the IREF pin of each TLC5940 (10k instead of 2k)
    - for 12 steps I needed 36 PWM channels. Three TLC5940's gave me 48 channels, so I divided the load equally (12 channels per chip)

    Using small PNP's could indeed also solve the problem. I was just too lazy to solder 36 of 'm on my circuitboard :-)

    ReplyDelete
  3. I agree on this Led Lights are one of ECO friendly, not just for the price but the way they light, its not harmful in the eye, just like this one, they sell high quality led lights. http://www.worldofled.com.au/

    ReplyDelete
  4. the topic that you've tackle here in this blog is really interesting I've found lots of blog but so far this is the nicest that I ever read, thanks men for sharing this.
    http://www.worldofled.com.au/pages/your-electrical-safety-and-nrg

    ReplyDelete
  5. Hi Geert (are you dutch?),
    you did a nice job on that staircase.
    Can you help me out with scheme's, photo's and code of your project? I'm revovating my staircase right now and afterwards i want to implement active led-strips to the steps. I am not sure how to connect and controll the power supply since i thought the arduino can't handle 12v (for the strips).

    Greetings,

    Ysbrand.

    ReplyDelete
    Replies
    1. Hallo Ysbrand,

      Dat klopt, de Arduino heeft bovendien ook lang niet genoeg uitgangen om zoveel kanalen uit te sturen. Ik heb 12 traptreden die elk 3 kleuren hebben: dat zijn 36 analoge signalen. Daarom heb ik 3 serieel-PWM convertors gebruikt (TLC5940) Ik weet niet of je bekend bent met de theorie achter PWM (pulse-width-modulation) Dat is een signaal dat veel gebruikt wordt om kleine servo-motors aan te sturen, maar het leent zich ook uitstekend voor het dimmen van leds. De TLC5940 heeft de mogelijkheid om ze te 'daisy-chainen'. Dat betekent dat ze niet alleen een seriele ingang hebben, maar ook een uitgang. De bitjes schuiven als het ware door de chip heen, zodat je er nog een zelfde chip achter kan zetten. Zo heb je dus maar één seriele uitgang nodig op de arduino (5v, whatever). In de datasheet van de TLC5940 kan je alle details vinden.

      Delete
  6. Hallo Geert,

    dank voor je snelle antwoord. Ik kan je verhaal enigszins volgen. In jouw project zit ook niet al te veel ingewikkeld soldeerwerk. Maar een paar detailfoto's uit verschillende hoeken zou goed helpen. Je filmpjes lijken het ook niet meer te doen. Ik ben een totale noob op t gebied van electrotechniek en programmeren, maar wel nieuwsgierig en met het combineren van voorbeelden en handleidingen kom ik vaak een heel eind. Een paar maanden geleden ben ik begonnen met het verkennen van arduino en raspberry pi met wat startersguides. Het lukte me al vrij snel om op een breadbordje en een arduini met een paar simpele led-lampjes een conceptje te maken van traptreden laten lopen na een aanuit-trigger. Echter dat waren een zeer beperkt aantal kanaaltjes (11 geloof ik) en alles liep op de voeding van de arduino zelf. Het smaakte wel naar meer.
    De code voor jouw aanpak kan ik vinden op de arduino playground? Kan ik daar dan ook vinden hoe ik de aansluiting van de voeding voor de opgeknipte led-strip zou moeten maken want die zie ik nog niet in jouw voorbeeld (of ik zie m over het hoofd)?
    Graag hoor ik meer van je (ik hoop dat ik je niet lastig val).

    Groet,

    Ysbrand.

    ReplyDelete
  7. This comment has been removed by a blog administrator.

    ReplyDelete