Pages: 1 [2]   Go Down
Author Topic: Simple Colour Change Lamp  (Read 2886 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Edison Member
*
Karma: 29
Posts: 2362
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I figured it's kinda pointless seeing it in daylight... so I just switched it on (it's 1am, plenty dark enough i suspect)



oh and just to explain... I'm using 2n2222's  smiley-grin   and no "current regulation"  each npn can deliver around 800ma, so I use a 68 ohm resistor to the base pin for each segment, this rougly supplies 120ma per color which is well within spec of the transistor... I purposely kept it low knowing that when the LED heats up, i expected the current to rise up to 200 maybe 300ma, in which case it's well within spec of the 800ma limit of the transistor AND within the 300ma per RGB channels from the 10 watt.

So, 120ma * 3 * 5 =  1.8amps or 21watts.

The multimeter reads 1.8 - 1.9 amps...

Now, because I have no current limiting resistor on the emitter/collector side of the LED, it relies just on the 68ohm resistor, I originally was going to use something like a 30-40ohm resistor and 1/4watt was not up to the job, so i stuck with the 68 ohm resistor and *hoped* that once the LED's warmed up, it would draw more current to get to the 300ma mark.

And (as I suspected) ... No.

The heatsink keeps the LED's cool and sadly (even in 45c / 100f+) heat, still no... maybe if i run it for a few hours instead of 30 - 40 minutes the current will slowly creep up? - good because I like bright.

next time i'll use 1/2watt resistors and push the 50watt boundy, as it is 21watts is bright enough.

Logged

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

Using 1.5 ohm instead of 2.2 did the job!  

Also I changed the script lines for Arduino Uno:
#define RedPin 3
#define GreenPin 5
#define BluePin 6

Now I'm focusing on scripting.  Can anyone give me simple example - how to get e.g., Violet color light (whitout fading and extra stuff). Just as simple as possible script.

Please note that I'm creating disco ball lamp. I need focused light so will try this http://www.ebay.com/itm/2-X-Glass-Lens-Reflector-Collimator-4-90-Degree-for-10W-LED-Light-Lamp-Bulb-/221277747689?ssPageName=ADME:L:OU:US:3160

Thank you Riva!
Here is the light -
« Last Edit: February 13, 2014, 10:03:37 am by UniFly » Logged

Norfolk UK
Offline Offline
Edison Member
*
Karma: 66
Posts: 2479
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Now I'm focusing on scripting.  Can anyone give me simple example - how to get e.g., Violet color light (whitout fading and extra stuff). Just as simple as possible script.
If you want just a single colour then use a paint programs colour wheel or an online version to select the required colour and read off the RGB values. Then change loop() to just these three lines
Code:
            analogWrite(RedPin,0x9F);
            analogWrite(GreenPin,0x00);
            analogWrite(BluePin,0xFF);
and replace the 0xXX parts with the R,G & B values you want. You may need to tweak the values to get the exact colour you want.
Logged

There is no such thing as a stupid question but there are a lot of inquisitive idiots.

Pages: 1 [2]   Go Up
Jump to: