loading
For a long time I had the plan to add more lighting to one wall of my
living room, the LED ribbon was bought from a Chinese supplier on eBay, more than a year ago. Now finally I got this done and want to share the results with you.

LED ribbons are flexible circuit boards with SMD LEDs which can be used for versatile lighting applications. Most of the ribbons are suited for a supply voltage of 12V and come in lengths of 5m with power requirements ranging from a few watts per meter to 15W and more per meter.
Adjusted to the forward voltage drop of the LEDs there are normally 3 LEDs in series connection with a current-limiting series resistor, each of these groups then connected in parallel to the supply voltage rails along the ribbon. The ribbon can also be cut between these groups of 3 LEDs to fit your very needs.


Step 1: Mounting the LEDs

The LED ribbon has an adhesive tape on the back and can be glued onto any flat surface. I used an aluminum profile which you can buy at a hardware store (mine is from Bauhaus and comes in 2m long pieces, a=14.5mm b=11mm c=1.5mm).

When attaching the ribbon to the profile make sure that the electrical contacts are well isolated from the aluminum profile. Even though the aluminum is covered with a protective oxide layer, you otherwise risk a short circuit.

I cut the ribbon into 2m pieces and attached these separately to individual pieces of aluminum profiles. At the end I soldered a connective pair of wires between adjacent profiles.

The profiles themselves are mounted on my wall using curtain rod holders from IKEA.

Step 2: Testing the Circuit and Software

The LED ribbon can be directly driven from any 12V dc supply which is powerful enough. At 15W per meter my 4m long installation will draw up to 60W which corresponds to 5A at 12V. Of course you should use a switch-mode power supply, which you can also find on eBay.

But I just had to add something more to my light-strip. I wanted to be able to dim it and if possible from an infrared remote control. Dimming is done by pulse-width modulation (PWM) from an Atmel ATtiny25 microcontroller (I am not using Arduino, but only the controllers directly). The PWM signal directly drives the gate of a power MOSFET, which controls the current through the LED ribbon by switching the ground-side of the LED ribbon. In order to avoid any flickering the PWM frequency has to be chosen high enough.

Currently I am using the following settings:
  • 8MHz internal oscillator
  • phase-correct PWM on Timer 0
  • 64 PWM steps
  • resulting in about 60kHz PWM frequency
The light is absolutely flicker-free, but the progression between the lowest dimming steps could be smoother...

Additionally a standard receiver for infrared remote controls is attached to PB3 of the ATtiny. I found a nice IR remote control library, IRMP, which supports a wide variety of remote controls. Since I had a control for another LED ribbon from a chinese reseller, I chose to use the on/off and dim-codes from this control, but you can choose whichever remote control you have.

The first built of the circuit was on a breadboard for testing purposes, before I moved everything onto a 3-island stripped veroboard.

Step 3: Putting Everything Together

Partlist:
  • ATtiny25 microcontroller
  • suitable power MOSFET, e.g. IRFZ44
  • 78L05 voltage regulator
  • 10kohm resistor (for the reset line)
  • 150ohm resistor (for the optional indicator LED)
  • infrared remote receiver
  • 100uF electrolytic capacitor
  • piece of perfboard
The attached photos show the placement of the components and the necessary solder bridges on the backside. I am currently considering making a PCB layout for the controller, but for now this is all I have.

The source code for the controller is attached, together with a precompiled binary which relies on the same type of chinese remote control I use. If you use a different type of remote control you need to first find out the codings of the remote control and then change the corresponding lines in the file 20131217_tiny_LED_dimmer.c:

// chinese multicolor LED remote
#define LEDPROTOCOL 2
#define LEDADDRESS  65280
#define LEDUP       92
#define LEDDOWN     93
#define LEDONOFF    64

Compiling the code shows that it will fit even in the smallest Attiny device:

  • Program: 1762 bytes (86.0% full)
    (.text + .data + .bootloader)
  • Data: 46 bytes (35.9% full)
    (.data + .bss + .noinit)
<p>Wow .... this is amazing, if not a little daunting for someone such as myself with little to no electrical knowledge. I am thinking of giving this a try though. It really stoked my imagination of what you can do. Thanks!</p>
<p>You can start without the remote control like in my follow-up project, the &quot;curtain of light&quot;. The advantage of the LED ribbons is their flexibility - and here I do not mean that they are mechanically flexible, but you can cut them to about any length. And by now you can also get ready-made remote control units and matching power supplies for cheap... </p>
<p>it will be much better if one could offer the LED Ribbon with Aluminium socket together.</p>
<p>It might be - but I am not aware of anyone selling these as a combo. And I myself only made the instructable...</p>
<p>it will be much better if one could offer the LED Ribbon with Aluminium socket together.</p>
<p>This is cool! Do you think you could provide circuit diagrams?</p>
Very nice, I especially admire your soldering job!

About This Instructable

4,503views

58favorites

License:

Bio: Native German living in Sweden
More by uwezi:A Curtain of Light AVR ISP breadboard adapter Magnetic kitchen towel hanger 
Add instructable to: