RGB LEDs: Onstar Characterization…

Though incorrectly marked as common cathode, these common anode high power tri-color LEDs are standard fare across most discount parts websites, eBay included. They are sold with a 3W designation, each color drawing 350mA for a three watt total. Mounted on a star, they should be heatsinked with proper thermal paste if running for any extended period at normal operating levels.

Characterization at 350mA yields the following results:

Color Voltage Wavelength Lumens
Red 2.70 volts 625 nm 32 lm
Green 3.45 volts 530 nm 35 lm
Blue 3.30 volts 470 nm 12 lm

Running them in voltage mode with PWM will require careful attention to the maximum duty cycle value. Using PWM we calculate the maximum duty cycle with the equation (LED Voltage x Bits / Supply Voltage). The chart below indicates the maximum PWM value at some common bit resolutions when running from a 5 volt supply:

Color 8 bit (255) 9 bit (511) 10 bit (1023)
Red 138 276 552
Green 176 353 706
Blue 168 337 675

Staying under these maximum values on Arduino is greatly assisted by the Modulo operation and/or the map command:

// sets the redledpin as output
pinMode(redledPin, OUTPUT);

// Scale PWMoutput to achieve full range 0-183
// Using map(value, fromLow, fromHigh, toLow, toHigh)
PWMoutput = map (PWMoutput, 0, 255, 0, 183);

// Use Modulo to limit output
PWMoutput= PWMoutput % 183;

// Set output using analogWrite
analogWrite(redledPin, PWMoutput);

And finally a macro shot of all three chips, check out those awesome miniature crop circles:

Leave a Reply

Your email address will not be published. Required fields are marked *