We have moved at community.getvera.com

Author Topic: DimmableLED light circuit and sketch (used for Kitchen Cabinet Lighting)  (Read 33158 times)

Offline blacey

  • Sr. Member
  • ****
  • Posts: 251
  • Karma: +30/-1
Hek certainly has opened a whole new world of automation possibilities with his extensible Arduino sensor project.  I wanted to connect my kitchen lights to the Vera for a very long time but I had installed low-voltage halogen lights that had two problems:
  • I couldn't find a Z-Wave dimmer that was compatible with them and
  • They would hum when dimmed to anything below 100%.
 
I had 3 options:
  • Spend significant $$$$ on an LED driver that can be dimmed by a triac dimmer and then buy a Z-Wave magnetic dimmer
  • Wait for the Fibraro RGBW to become available in the US or
  • build my own using Hek's project.
 
I opted for #3 - build my own because it was cheaper, offered more control and it was clearly more fun.

I bid on a roll of SMD2050 LED strips on eBay and was able to get a 5M strip for $11.  I prototyped a single channel circuit based upon the actuator example sketch and was able to control the LED light level using pulse-wave-modulation (if you don't know what PWM is, there are a lot of tutorials on the topic but it is the best way to adjust LED light intensity).

I have attached some photos of the project as I built is and will try to post a video of it in action.

By the way, I want to point out that I knew nothing about Arduino and/or building circuits before embarking on this project - bottom-line, give it a shot, Hek has made it a lot easier than it appears but at the end of the day, knowing how to build these simple "sensors" will open huge automation possibilities.  I have at least 3 other ideas brewing so to speak ;)


**Updated Feb 22 - attached v1.0 sketch - download and rename DimmableLED.ino.txt to DimmableLED.ino**
**Updated Feb 27 - attached breadboard/circuit layout**
« Last Edit: February 28, 2014, 04:36:41 pm by blacey »
Three Vera-3 (Home, Seasonal 1 & 2) - Firmware: 1.5.622,   Zwave: 3.20 L:1
One Vera-Edge (Dependent) - Firmware: 1.7.1707, Zwave: 4.5 L:1

Offline blacey

  • Sr. Member
  • ****
  • Posts: 251
  • Karma: +30/-1
Re: Ardruino LED-Driver for Kitchen Cabinet Lighting
« Reply #1 on: February 17, 2014, 11:21:56 am »
Here is a photo of the completed project - my wife loves it!

You can also view a video of the test run of the circuit at http://home.blacey.com/CircuitTest720p.mov

And finally, a video of the final install at http://home.blacey.com/InstallTest720p.mov

Enjoy!
« Last Edit: February 23, 2014, 11:47:49 pm by blacey »
Three Vera-3 (Home, Seasonal 1 & 2) - Firmware: 1.5.622,   Zwave: 3.20 L:1
One Vera-Edge (Dependent) - Firmware: 1.7.1707, Zwave: 4.5 L:1

Offline hek

  • Moderator
  • Hero Member
  • *****
  • Posts: 714
  • Karma: +60/-1
Re: Ardruino LED-Driver for Kitchen Cabinet Lighting
« Reply #2 on: February 17, 2014, 11:45:10 am »
@blacey
Nice project and kitchen lightning!

Offline blacey

  • Sr. Member
  • ****
  • Posts: 251
  • Karma: +30/-1
Re: Ardruino LED-Driver for Kitchen Cabinet Lighting
« Reply #3 on: February 17, 2014, 12:00:34 pm »
@Hek

All thanks to you Hek!  :) :) :)
Three Vera-3 (Home, Seasonal 1 & 2) - Firmware: 1.5.622,   Zwave: 3.20 L:1
One Vera-Edge (Dependent) - Firmware: 1.7.1707, Zwave: 4.5 L:1

Offline waynehead99

  • Sr. Member
  • ****
  • Posts: 296
  • Karma: +16/-1
Re: Ardruino LED-Driver for Kitchen Cabinet Lighting
« Reply #4 on: February 17, 2014, 12:06:04 pm »
Can you share sketch and parts used? I have been looking to do the same thing.

Offline SirMeili

  • Hero Member
  • *****
  • Posts: 1052
  • Karma: +43/-20
Re: Ardruino LED-Driver for Kitchen Cabinet Lighting
« Reply #5 on: February 17, 2014, 12:47:19 pm »
If you have them, I wouldn't mind any additional install pics as well. Like where did you mount the project box, mount the lights, etc. Though I guess you just used double sided tape for the lights.
VeraLite (Live); ISY 994i (Live); Vera 3 (Waiting to replace VeraLite); Vera Edge (Waiting for all the bugs to be fixed); Xuan StackBox (Testing and waiting for more plugins and for it to mature)
Countless z-wave and insteon devices :D

Offline cubs2b23

  • Full Member
  • ***
  • Posts: 102
  • Karma: +2/-0
Re: Ardruino LED-Driver for Kitchen Cabinet Lighting
« Reply #6 on: February 17, 2014, 12:51:54 pm »
@blacey

You wouldn't happen to be taking orders, would you?  :)

Looks really nice!

Offline waynehead99

  • Sr. Member
  • ****
  • Posts: 296
  • Karma: +16/-1
Re: Ardruino LED-Driver for Kitchen Cabinet Lighting
« Reply #7 on: February 17, 2014, 01:12:46 pm »
I have the same lights up now but just plugged into a z wave outlet. So can't dim. I am curious about install too as I had to cut strips of the light and solder together where the cabinets meet. Works but would like cleaner.

Offline blacey

  • Sr. Member
  • ****
  • Posts: 251
  • Karma: +30/-1
Re: Ardruino LED-Driver for Kitchen Cabinet Lighting
« Reply #8 on: February 17, 2014, 01:53:31 pm »
Can you share sketch and parts used? I have been looking to do the same thing.

Absolutely, in the spirit of Hek's project, my plan is to share all the details and sketch.  I should be able to get to that in the next day or two.
Three Vera-3 (Home, Seasonal 1 & 2) - Firmware: 1.5.622,   Zwave: 3.20 L:1
One Vera-Edge (Dependent) - Firmware: 1.7.1707, Zwave: 4.5 L:1

Offline blacey

  • Sr. Member
  • ****
  • Posts: 251
  • Karma: +30/-1
Re: Ardruino LED-Driver for Kitchen Cabinet Lighting
« Reply #9 on: February 17, 2014, 02:05:13 pm »
@blacey

You wouldn't happen to be taking orders, would you?  :)

Looks really nice!

Not taking orders but I will share enough details that you can gin up your own fairly well.   ;)

I have the same lights up now but just plugged into a z wave outlet. So can't dim. I am curious about install too as I had to cut strips of the light and solder together where the cabinets meet. Works but would like cleaner.

I ran 14 AWG wire through the cabinets tucked in either the front or rear corner so you can't really see it (see photo below).  I used 14 AWG to minimize the voltage loss.

The power supply and Arduino PWM dimmer is mounted above the sink where it isn't visible but you could mount it inside a cabinet near the top where it also wouldn't be visible, assuming you don't mind drilling a few holes in your cabinets.

« Last Edit: February 17, 2014, 02:07:35 pm by blacey »
Three Vera-3 (Home, Seasonal 1 & 2) - Firmware: 1.5.622,   Zwave: 3.20 L:1
One Vera-Edge (Dependent) - Firmware: 1.7.1707, Zwave: 4.5 L:1

Offline Drcashman

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +3/-0
Re: Ardruino LED-Driver for Kitchen Cabinet Lighting
« Reply #10 on: February 22, 2014, 10:01:33 pm »
I am doing the same thing with my cabinets but using a rgb strip. Are you still planing to share your sketch blacey? I have been browsing around these forums for a while now and having a blast trying to automate my whole house. Thanks to Hek I am saving a ton of money making my own sensors.  ;D

Offline blacey

  • Sr. Member
  • ****
  • Posts: 251
  • Karma: +30/-1
Re: Ardruino LED-Driver for Kitchen Cabinet Lighting
« Reply #11 on: February 23, 2014, 11:50:03 pm »
Are you still planing to share your sketch blacey?

Absolutely, I have attached version 1.0 of the sketch to the first post in this thread.  Enjoy!
Three Vera-3 (Home, Seasonal 1 & 2) - Firmware: 1.5.622,   Zwave: 3.20 L:1
One Vera-Edge (Dependent) - Firmware: 1.7.1707, Zwave: 4.5 L:1

Offline blacey

  • Sr. Member
  • ****
  • Posts: 251
  • Karma: +30/-1
Re: DimmableLED light circuit and sketch (used for Kitchen Cabinet Lighting)
« Reply #12 on: February 23, 2014, 11:54:11 pm »
I decided to continue the fun by mounting three 1-watt LED lights above the fireplace mantel for accent lighting using the same circuit and sketch above...

Three Vera-3 (Home, Seasonal 1 & 2) - Firmware: 1.5.622,   Zwave: 3.20 L:1
One Vera-Edge (Dependent) - Firmware: 1.7.1707, Zwave: 4.5 L:1

Offline gregl

  • Full Member
  • ***
  • Posts: 188
  • Karma: +9/-3
Re: DimmableLED light circuit and sketch (used for Kitchen Cabinet Lighting)
« Reply #13 on: February 24, 2014, 12:48:02 am »
Really nice work!
What MOSFET did you use?

Offline blacey

  • Sr. Member
  • ****
  • Posts: 251
  • Karma: +30/-1
Re: DimmableLED light circuit and sketch (used for Kitchen Cabinet Lighting)
« Reply #14 on: February 24, 2014, 01:03:02 am »
Really nice work!
What MOSFET did you use?

I don't know if they are the best or cheapest but they work well - http://www.amazon.com/gp/product/B0087YK0CO/ref=oh_details_o02_s00_i01?ie=UTF8&psc=1
Three Vera-3 (Home, Seasonal 1 & 2) - Firmware: 1.5.622,   Zwave: 3.20 L:1
One Vera-Edge (Dependent) - Firmware: 1.7.1707, Zwave: 4.5 L:1