Introduction: How to Fit LED Kitchen Lights With Fade Effect

In this instructable, I will describe my project to replace my under the cabinet kitchen lights with LEDs.  I couldn't resist adding a microcontroller as well.

The original lights were flourescent and quite badly fitted.  They made a lot of buzzing noise and the bulbs didn't seem to last very long.  I got fed up with them and decided that replacing them with LEDs was the way to go.  My budget was small so I didn't want to buy expensive designer lights.

To add interest and a bit of practicality, I decided to add a fade-up effect when the lights switch on and have a half-bright mode for those special occasions where dimmer lighting is required.





Step 1: LEDs

After experimenting with some cheap LED strips meant for accent lighting on cars, I did some 'proper' research and settled on the flexible strips of SMD 5050 LEDs.  This is an excellent page describing the 5050's vs the 3528 type: http://ezinearticles.com/?All-About-LED-Strips-4---The-Eternal-Debate---SMD3528-Vs-SMD5050&id=4670120 .

You want 5050 LEDs, preferably 3 to each 5cm / 60 per Meter, waterproof (they are covered in a flexible clear plastic and with a adhesive backing.

I got a 5M strip plus power supply from a seller on eBay.  Total cost was UKP 50.00.  

The LED strips can be cut every 5cm (or 3 LEDs) and are very bright.  5M of LEDs consumes approx 3A (36W at 12V).  This is less than the 4 flourescent strips they are replacing.

Step 2: Fader

When the lights were switched on, I wanted a gentle fade up to full brightness.  This would provide a bit of interest and be a contrast to the buzzing, flickering startup of the flourescent lights.

Pulse Width Modulation or PWM is the simplest way to fade LEDs and MOSFETs are the simplest way to rapidly switch large(ish) currents.  By combining a MOSFET with a microcontroller, I had the most flexible way of controlling the fade.  

I used an Arduino to test the concept and my test rig is shown in the photo.  I got the circuit idea from here: http://www.ladyada.net/products/rgbledstrip/  I only used 1 channel (White) instead of 3 (RGB).

Using this rig, I was able to develop the fader software easily.  It is described in the next step.

Step 3: Software

The requirements for the software were:

When power is first applied, fade the LEDs from off to full brightness.
If power is switched OFF before LEDs get to full brightness, then turned back ON, fade the LEDs from off to half brightness.

I used the rig shown to test the software and got the operation as I wanted it.  A few useful things to note:

The brightness of the LEDs under PWM is non-linear.  This means that the fade reaches a brightness level very quickly that then seems to only slowly get to full brightness.  The simple approach to this is to divide the fade into two sections, fade slowly in the first section and then quicker in the last section.  I expect there are more complex algorithms for this and I may try them someday.  In the meantime, this simple approach works well enough for my kitchen.

I used the built-in EEPROM memory to remember the state of the LEDs. Although I am writing to the same location, over and over, the EEPROM cell will outlast the installation by many years.

Included in the software file is the final application as it is working now and one of my first test apps, the video of which is shown below.

Test of fade up and down:

Step 4: Building the Controller

I had enough parts lying around to build the controller so I didn't have to dedicate a whole Arduino to the project.  I've included the schematic and describe the circuit below.  I made the circuit on breadboard and wired everything together on the reverse side.  The MOSFET tend to get warm so I used an old heatsink I removed from a dead piece of kit to help keep it cool.  I mounted the whole thing on a bit of bent metal and hot glued it into this plastic box left over from another project.  The whole thing could be a lot smaller.  I could have used a smaller processor but I already had the atmega168. 

Circuit description

This is a 'minimal Arduino' with a 5V regulated power supply derived from the 12V used to drive the LEDs.  The regulator is bog standard 7805.  All the ATMega168 needs is power, a reset line held high via a resistor and the connections to the ISP programming pins.  I added those because I did not want to socket the processor and have to remove it to re-program it.  I added the white LED for convenience - I always like to have a 'heartbeat' to show me that the processor is running my code correctly.  I fitted the LED to 'pin 13' so it is arduino compatible (I can run 'blink' to test).

There is a pull down resistor on the MOSFET gate so the LEDs won't inadvertently come on during power cycling.

The power supply and controller box are mounted below the cabinets along with the LEDs.

Step 5: Preparing the Strips

I measured the lengths required under the cabinets and cut the strips to size.  I soldered a red wire to the +12V contact and a black one to the GND contact.  On the strips I used, these were marked R G and B.  It turns out that these strips are also used for 3 colour LEDs and these are the individual connections to the colours.  On these white strips, each LED package actually contains 3 separate LEDs so each of the RGB connections needs to be connected to GND.  This was the hardest part - persuading the solder to bridge the contacts.

Step 6: Fitting

The wiring arrangement in my kitchen was very simple.  A cable carrying switched mains connected to the first flourescent light and the circuit was daisy chained to the other fittings.  I connected the mains to the power supply.  This provided the 12V needed to drive the LEDs via the fading circuit.  I then used the remaining cable to supply the rest of the strips.

If you don't have this arrangement, it is much easier to lay wire capable of handling a few amps at 12V than the thick mains cable.

I cleaned the bottom of the cabinets with detergent followed by white spirit and fixed the pre-cut and wired strips.  I used two strips per cabinet and wired the soldered leads to terminal blocks that I fitted to the cabinet with screws. 

After connecting the controller to the power supply and all the LEDs to the controller, the job was complete.

After using the lights for a while, some of the adhesive started to pull away.  The weight of the wire was pulling the strip off.  I fixed that with some staples and they have stayed in place since.

Step 7: Enjoy

I really like my new silent, bright and economical kitchen lights.  here they are working!

You see them go to full brightness, then off.  Then on, off, and on again so they go to half brightness.  

Comments

author
ShamimI3 made it! (author)2016-05-31

Hi dude,

I found your blog here. All post is really helpful.ice to read.Because your blog is really attractive. Thanks for your creative activities.People are often confused, when they have to provide proper lighting to the different areas of their kitchen. Most of the times, it might be quite difficult for anyone to come up with the ultimate lighting solutions for certain areas of the kitchen such as the cove area of the cabinets.Look forward to learn more about: LED CABINET LIGHT

Welcome to Prisma LED

Shamim

Prisma Led.pngprismaled.png
author
FredL20 (author)2016-03-09

Hi am am super new to coding I was wondering if there is there anyway to ad a motion sensor to this code?

author
HelgeS4 (author)2016-02-24

Hey, here`s my solution. I used it with color. Sorry for writing the blog in Norwegian, but I suppose Google Translate can help ;-)

http://www.solevag.com/wordpress/?p=455

author
larsrc (author)2015-04-06

Exactly the instructable I was looking for, thank you. Connecting all three channels together vastly simplifies the design, but how nice is the colour? I got a simple set from a hardware store, and what they call "white" we all find has a horrible blue tone to it. I expect the different colour LEDs don't output the same amount of light, and/or our eyes don't register them equally.

author
Esterill (author)larsrc2015-04-13

Yes, you can get different 'colour temperature' LEDs. You want warm white to more closely match the look of incandescent lamps. My cool white LEDs don't suit everyone but give a crisper more clinical light for close work, cutting, preparation etc.

author
callhow (author)2015-03-07

Very attractive set-up & fully functional. Nice Job! I have a question ? Is there any

formula / chart to indicate how many "leds" will light - on varying voltages ? Like

how many using a 5 volt USB cable ?

author
hanashoib (author)2015-02-19

How do you have the cabling going across the sink and cooker? To power all three sets of lights?

author
Esterill (author)hanashoib2015-02-20

The previous lighting was mains and there is mains cable running between the two sections. I used that - it now carries the 12V.

author
PhantomOfHeat (author)2011-02-06

If the RGB is hooked up to separate leds It seems like you could use that for fading by starting the R then having a delay before starting the G than a delay before the B that will add more of a fading effect.

author
irishjim68 (author)PhantomOfHeat2014-11-07

The RGB channels on these LEDs are actually the different colors of Red, Green and Blue. By tying them together, you get each color to illuminate at it's full brightness to produce the White color. By applying the voltages to the different channels, the illuminated color would change dramatically as the modulated voltage came up to full power.

author
Esterill (author)PhantomOfHeat2011-02-07

Yes, that is a good idea. I would like to have done that but the existing wiring only allowed one channel. Perhaps with a controller on each set of LEDs, I could achieve this. Too expensive (in time) at the moment though.

author
PhantomOfHeat (author)Esterill2011-02-07

I was not sure if you could have programmed the chip to drive 3 mofsets individually. Alternatively you might be able to use a zener diode (do not think that will work with PWM) or something that will allow the first mofset to turn on once the volts hits the knee it allows the second one to turn on and does the same with the third.

author
dxlrant (author)2011-11-17

In your testing environment with the segment of 3 LEDs would 5 volt be sufficient to power all? I realize the strip is rated for 12 volts, but just wondering.

author
PyroMonger (author)dxlrant2011-11-19

you can use 9volts and it will work fine. I have blue strips like the ones used here and they run on a 9volt battery with more than adequate brightness

author
irishjim68 (author)PyroMonger2014-11-07

You are correct here. I have done some testing with white LED strips and have found that they work fine with adequate brightness at 9 volts even though rated for 12 volts.

author
Esterill (author)dxlrant2011-11-18

Hi, thanks for the interest. It may be sufficient but if the LEDs come on at all, they certainly won't be very bright.

author
bwomp99 (author)2013-10-07

Very awesome setup - I think I might try and play around with this, maybe use a tiny arduino or digispark so I don't have to build my own. Any chance you (or someone) could expand on step four? I'm not really understanding how the power is hooked up. When the power comes in from the brick, so you have it set up as a 12V rail and then just connect everything to that? Sorry, I'm pretty new at this.

author
mday8 (author)2013-08-23

Hi, is there any way that the LED strip fade out as well?
I want my leds to rurn on slowly and turn of slowly.

Thanks

author
BAM5 (author)2013-05-02

RGB Strips are actually for creating any colored light you want. It works on the same principal as the individual pixels in your computer monitor. In each pixel there is a red, green, and blue part of the pixel that are individually controlled to output different strengths (Up to 255 different levels of strength) of each color in order to make practically any (16 million different) color in the visible spectrum. In order to do this on the RGB strips all you'd do is set up a separate PWM signal to each of the channels (R, G, and B are the different channels of the led) and change the duty cycle to change the brightness of each. In order to design a color you can use a color picker on a computer. The colors from the color picker are generally written in hex, with the red channel being the first 2 digits, green, the next 2, and blue the last 2. So #FF0000 would be full red, #00FF00 would be green, and #888888 (half duty cycle on all channels) would be grey (on the computer) or a dimmer white on the leds.

tl;dr: Bleh, that went into a whole long rant. RGB leds are for creating any color you want. Not just white, red, green, or blue.

author
BAM5 (author)BAM52013-05-02

Correction #7F7F7F would be half duty cycle/grey/Half dimmed. Side note: There are bussed ic chips for powering/controlling leds with PWM called led drivers. TI makes a large selection of these.

author
atanguay (author)2013-01-05

Great Instructible Esterill...I'm trying to do something similar.

Quick question, any idea why this MOSFET wouldn't work in this scenario...

http://www.futurlec.com/Transistors/IRF510.shtml

These are ones they stock at the local 'Shack, and it seemed capable, but some of the specs I don't really understand. Any thoughts?

I'm using a 12V strip, just like you...powered by an old 'Xbox HD-DVD' power brick, on a regular Arduino, programmed to Pin 9.

author
atanguay (author)atanguay2013-01-06

It all came down to grounding!

I wasn't grounding my Arduino and my PS together. Once I did that, I am in business and fading. Now I just need to try and get the first couple of levels to not look so 'steppy' and more smooth and I'll be golden.

author
Esterill (author)atanguay2013-01-06

I had a quick look at the spec sheets - I can't see an immediate reason that the IRF510 wouldn't work. It can handle the current and voltage required. What are the symptoms? Have you tried just having the FET switched on (no PWM) or tried a different load?

author
atanguay (author)Esterill2013-01-06

Basically, the strip lights up full time, even when the transistor is 'off'. That's what threw me immediately. I was getting 'some' dimming, but nowhere near the full range I'm getting with just an LED. I went and picked up a couple more...maybe this one is bad or dead or something. Although it seems strange that the thing would be 'ON' full time when dead. You'd think it would be a 'dead mans switch' scenario.

(thanks for the ideas and replying, btw. I really want to get this to work)

author
jimthree (author)2012-12-05

Do you use "Arduino" the Mega168, or are you building native atmel Hex files? I thought you needed the !68 to be running with a crystal rather than the internal timer to use Arduino on it?

Cheers Jim.

author
Esterill (author)jimthree2012-12-05

Jim,

I used the Arduino environment. You can use the 168 with an internal oscillator but you need to remember to take into account that it is running at half of the speed Arduino expects. I edited the devices file to add an internally clocked 168 so that it would all make sense.

author
FLAN (author)2012-02-01

I have a question.. I bouhgt this SMD leds and I want to use a power supply 12v 65w, I conect it and LED light up, but the strip is getting to hot, This is normal?

author
samaddon (author)FLAN2012-11-06

you need to decrease the voltage to 11 volts and 35w if you are using a single led then after some time the led will blow up!

author
diy_bloke (author)samaddon2012-11-30

I don' t think the Wattage makes any difference

author
samaddon (author)FLAN2012-11-06

you need to decrease the voltage to 11 volts and 35w if you are using a single led then after some time the led will blow up!

author
Esterill (author)FLAN2012-02-02

Hi, It depends on what you mean by 'too hot'. All LEDs get warm or hot when on. Because there are a lot of quite high power LEDs on the strip, we would expect some heat. Once the strip is fixed to a surface be it metal, wood etc. I would expect the heat to be reduced. However, if you are worried about the level of heat you should contact the supplier for advice.

author
giftsocool (author)2012-09-23

I used the Warm White LED strips. It is also pretty good.
http://www.yupgift.com is my suppliers

author
instme344 (author)2012-08-10

It is great, and my friend used the Warm White LED strips. It is also pretty good.

author
bennyj121 (author)2011-12-14

I have pretty much the same setup and used an old iomega supply ffrom an old drive. It has a 12v output at 2.5A and another 5.1v output that does not light up my 9 foot string. I am not sure which SMD LED's my strip has, but I thought I would do the dim thing the easy way but they will not loght at such a low voltage. I hacked the microwave and used the built in lights on it to power the iomega, so when i turn the microwave/counter lights on, my cabinet strips also power on. The 'dimmer' switch I added (to the 5.1v line) acts as an off switch now.

author
tmasse (author)2011-11-19

Very nice job.
I know it would be messy to implement without parting with PWM, but couldn't you use some sort of capacitor so to have a fade-out effect when turning the power off?

author
fcross1 (author)2011-05-03

WOW !!!!

author
minnegopher (author)2011-02-19

Awesome project! Nice work!
* could you provide a parts list to go with the schematic?
* did you connect the LED strip(s) to ATMEGA168 pin5, or where?

thanks!

author
Esterill (author)minnegopher2011-02-20

Thanks for your kind comments.

I did neglect to properly list parts so here you go:

Processor is an ATMEGA168 in DIP package, although almost any AVR will do.
D2 is a regular LED on the board for a heartbeat indicator. It is optional as is
the 1K resistor.
H1 is a 'standard' AVR ISP programming header with 6 pins. You only need this if you are going to do In System Programming.
U1 is the MOSFET - a STP16NF06
U3 is a 5V regulator - LM05
D1 is actually the LED strip - obviously, there are a lot more diodes! It is connected to pin 5 of the processor via the MOSFET.
The other Rs and Cs are labelled.

author
uncle frogy (author)2011-02-14

I recognize that I am at times parsimonious I can't help it.
So here it is how much current does the controller use and how does that contribute to the overall efficiency compared to just a pot as a dimer? I do appreciate doing the work and fun of doing the controller and how you can get "more light" from a LED by pulsing the voltage over just DC . just wondering . I just like to keep it simple.
I also think that some of the heat seen from those strips comes from the current limiting SM resistors that are on the strips.
Color is very important to how we see food next time you go to the supper market look at what color is in the meat and the produce departments they are not blue. think more along the lines to art and the need to have color accuracy. Same goes for the bathroom think what the lighting difference is between the bathroom in a high class restaurant and a serve-yourself gas-station. no woman is going to feel comfortable in a blueish lighted bathroom
great project and well executed.
uncle frogy

author
Esterill (author)uncle frogy2011-02-14

Hi and thanks for your comments. The controller is an Atmel AVR. Current consumption is in the order of a few mA, so it is utterly insignificant compared to the current consumption of the LEDs. The advantage of using a microcontroller is the programmability and the cost - I can adjust the fade effect as much as I like until it is right and all for a cost of about 1 pound in components.

I don't have the analogue electronics design skills to produce an LED fader with a pot and most LED related controllers seem to use PWM - it is cheap and effective.

I agree on the colour - I tried a warm white LED but my wife didn't like the look. This colour suits us fine. Remember the rest of the room is lit differently and the camera is showing more blue than our eyes actually see.

author
pro2xy (author)2011-02-08

Sorry for a silly question, but what is power cycling?

author
Esterill (author)pro2xy2011-02-08

It's just a phrase meaning turning the power off and then on again (usually with a pause between to allow capacitances to discharge etc.)

author
ken2400 (author)2011-02-06

http://www.candlepowerforums.com/vb/forumdisplay.php?f=89
Start reading.

Heat is still a big problem with store bought LEDs BUT DIY ones can be made with all the heat sink they need. I hope someday they will product less heat and more usable light.

author
devin.buell (author)ken24002011-02-07

The LEDs don't actually generate a lot of heat, that is why they are so efficient. The heat sinks insure that heat doesn't build up and effect the operation of the LED's.

author
Esterill (author)devin.buell2011-02-08

These LED strips don't really generate much heat - it is true that what is generated is dissipated across their length and, to a certain extent, into whatever they are stuck to. If heat was a major problem, I would expect the sticky backing would fail pretty quickly. That hasn't happened yet.

author
belcat (author)ken24002011-02-07

These LEDs actually produce more heat than the ones you buy in the store as bulbs (they are less efficient). But wait, you say, why don't need a heat sink? Because each LED doesn't use a lot of power, so basically, the long strips they are on act as a heat sink, and the heat is distributed all over the strip.
The problem with store bough LEDs are they are trying to fit in old style bulbs, a tight space where you can only put a little bit.
The real problem is the lack of manufacturing, demand and competition. The LEDs are $3-5, the heat sink is $3-4, the driver is about $3. That's $12 at most, the rest is just markup because they are the new kids on the block.


author
alts63 (author)2011-02-06

If finding and connecting isn't your thing:Ikea has several LED lighting strips, some in different colours. Don't know if this is cheaper than sourcing the parts but got me started. Thanks for showing us how to DIY.
http://www.ikea.com/ca/en/catalog/products/20119418 or
http://www.ikea.com/ca/en/catalog/products/60180767
Love the dimmer idea.

author
Esterill (author)alts632011-02-07

I used some Ikea strips in the bedroom - I may replace them eventually with colour changing strips. They cost quite a bit more than the equivalent RGB or White LED strip I used.

author
gmabe1983 (author)2011-02-06

anyway to see the light output in lumens?

author
Esterill (author)gmabe19832011-02-07

I expect I would need some kind of light meter. My guide was 'can I see well enough to prepare food?'.

About This Instructable

199,600views

434favorites

License:

More by Esterill:How to fit LED kitchen lights with fade effect
Add instructable to: