Pages: [1] 2   Go Down
Author Topic: Simple Colour Change Lamp  (Read 3193 times)
0 Members and 1 Guest are viewing this topic.
Norfolk UK
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2584
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just for the fun of it I made a very simple colour change/mood lamp.
It uses a single 10W RGB LED like this http://www.ebay.co.uk/itm/10W-Watt-RGB-Red-Green-Blue-HIGH-POWER-LED-Light-Lamp-DIY-UK-STOCK-/271028515764?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item3f1a8ef3b4
attached to a heatsink http://www.ebay.co.uk/itm/10W-LED-Aluminum-Heat-Sink-Heatsink-110x18mm-UK-Stock-/280935964629?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item4169169fd5
I built a triple constant current power supply to power the RGB LED and a ATtiny85. I bought a cheap  lamp from Lidl and removed it's wiring and lamp and replaced with the LED. It's powered of a 12V wall wart. I may add a IR led in the future and make it remote control the colour & intensity.
Attached are a couple of pictures, the schematic & the sketch.

* ATtiny-RGB Moodlamp.pdf (8.88 KB - downloaded 117 times.)

* Moodlamp LED.JPG (1730.35 KB, 3264x2448 - viewed 160 times.)

* Moodlamp PSU.JPG (1678.92 KB, 3264x2448 - viewed 158 times.)
* ATtiny_10W_LED_Moodlamp_v01.ino (3.46 KB - downloaded 55 times.)
Logged


Norfolk UK
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2584
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The obligatory videos...
Testing the LED and constant current PSU

The money shot
Logged


Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 150
Posts: 5666
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Nice LED. I might have to get a couple!

One thing...do the MOSFETS/resistors in the power supply get very hot?

2W seems a little on the low side for the resistors. I'm thinking the resistors in the photos are more than 2W.



« Last Edit: November 29, 2012, 04:33:33 pm by fungus » Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2584
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Nice LED. I might have to get a couple!
I'm certainly impressed with it. Might be tempted to try this http://www.ebay.co.uk/itm/30W-30-Watt-High-Power-RGB-Full-Color-Rainbow-LED-Light-DIY-/230767996419?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item35bad82e03 next time.

One thing...do the MOSFETS/resistors in the power supply get very hot?
Red MOSFET gets warm enough for a heatsink due to greater voltage drop but blue and green hardly get warm at all though I have put heatsinks on all of them as the electronics are in a plastic box with little air flow and will be on for hours at a time.

2W seems a little on the low side for the resistors. I'm thinking the resistors in the photos are more than 2W.
Without ordering online and paying P&P I could not get a small 2W 2.2ohm resistor so got the 3W wirewound ones from Maplin
The details on the constant current driver circuit came from here http://laserpointerforums.com/f51/simple-linear-mosfet-dimming-circuit-pwm-70812.html
Logged


Offline Offline
Full Member
***
Karma: 0
Posts: 100
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the difference between the circuit you linked and this one?: http://www.tbideas.com/blog/build-an-arduino-shield-to-drive-high-power-rgb-led/
Yours has extra parts for beeing PWM friendly as it says on the page, but I really don't understand the explanation.
I did mine and I noticed that when PWM level is low the led blinks a little, I really don't know if it will bother with the other colors turned on, need to test that.
Do you think adding those extra parts will solve that?

Thanks
Logged

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2584
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the difference between the circuit you linked and this one?: http://www.tbideas.com/blog/build-an-arduino-shield-to-drive-high-power-rgb-led/
Apart from using different MOSFET and resistor values the circuits are the same, the schematic I attached to the first post has 3x of these circuits to separately drive the RGB colours in the LED it also has a voltage regulator to give a 5V supply for the ATtiny85 that does the PWM colour changes.

Yours has extra parts for beeing PWM friendly as it says on the page, but I really don't understand the explanation.
I did mine and I noticed that when PWM level is low the led blinks a little, I really don't know if it will bother with the other colors turned on, need to test that.
I use no extra parts to make the thing more "PWM friendly". I don't notice any flicker at low levels but that might be because at lease one other colour is always bright so may mask the flicker effect.

Do you think adding those extra parts will solve that?
See above
Logged


Offline Offline
Full Member
***
Karma: 0
Posts: 100
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Apart from using different MOSFET and resistor values the circuits are the same
I mean the shaded parts, it says on the webpage that those parts are for "adding PWM input support", I built it without those parts and still works (even if it blinks a little when PWM is low)


Logged

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2584
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When I look at your linked page I only see the below schematic.

It also works for me without the extra circuit bits, I also removed R1 from my version. Maybe that's the cause of your flicker.
« Last Edit: May 05, 2013, 11:11:05 am by Riva » Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How should I change your .ino script if I need this on Arduino?
I have all the components of ATtiny-RGB Moodlamp.pdf but instead of Tiny I have Arduino.
« Last Edit: February 08, 2014, 10:23:02 am by UniFly » Logged

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2584
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How should I change your .ino script if I need this on Arduino?
I have all the components of ATtiny-RGB Moodlamp.pdf but instead of Tiny I have Arduino.
Just make sure redPin, greenPin & bluePin are PWM pins on your arduino and wire to them pins.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks a lot for your shared project. Can I use irf540 instead of irf520? Is it risky to test irf540?
« Last Edit: February 08, 2014, 07:58:31 pm by UniFly » Logged

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2584
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks a lot for your shared project. Can I use irf540 instead of irf520? Is it risky to test irf540?
A quick compare of the data sheets and it looks like the main values match or are better so yes it should work.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tested this on Arduino.  There are two things that are not ok. It works but the led is cold and not bright as it can be (I have http://www.ebay.com/itm/1pc-10W-10-watt-rgb-High-Power-LED-Light-Lamp-Chip-Lamp-Light-/131112967487?pt=LH_DefaultDomain_0&hash=item1e86f11d3f ). Secondly, colors are switching that means not fading.
Should I use 0,1,4 PWM pins on Arduino? Any comments what should I change?

Please note that I have checked irf540 and irf520.

The script I used ATtiny_10W_LED_Moodlamp_v01.ino
« Last Edit: February 10, 2014, 09:04:13 am by UniFly » Logged

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2584
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tested this on Arduino.  There are two things that are not ok. It works but the led is cold and not bright as it can be (I have http://www.ebay.com/itm/1pc-10W-10-watt-rgb-High-Power-LED-Light-Lamp-Chip-Lamp-Light-/131112967487?pt=LH_DefaultDomain_0&hash=item1e86f11d3f ).
If you use different LED, MOSFET & transistor values then you may need to calculate different resistor values for R2, R4 & R6.
See this article and the component data sheets to work out the correct resistance and wattage values needed.


Secondly, colors are switching that means not fading.
Should I use 0,1,4 PWM pins on Arduino? Any comments what should I change?
You need to use PWM compatible pins. On the UNO they are pins 3,5,6,9,10 & 11 (the pin number on the board has a ~ in front of PWM pin numbers)
Logged


Offline Offline
Edison Member
*
Karma: 30
Posts: 2494
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Over the weekend, I finally got around to finishing a similar thing, except i used 5 of them... potentially it can supply over 50 watts of light but I decided to limit the current, it pulls around 2amps at 12v (or 24watts) and decided that's bright enough.



But i also did what you did using an attiny85 for the bedroom, they certainly beat 5mm LED mood lights you get from shops..
Logged

Pages: [1] 2   Go Up
Jump to: