Keep constant LED intensity using 3 leds (RGB) with different duty cycles (for different colours)

I am using three LEDs (red, green, blue) to display some colors. In particular I am using the following colors and RGB values:

* red:          4f 00 00
* orange:       40 14 00
* yellow:       50 50 0
* light green:  10 2f 10
* green:        00 4f 00


Each value is in hexadecimal, from 00 to ff. They configure the duty cycle of each of the leds.

I would like to keep a constant intensity no matter the color, but for that I need to somehow 'normalize' the intensities of the 3 leds, so that when using multiple leds I don't get a higher intensity.

How can I properly scale all those vectors of RGB values so that they give the same intensity? I don't know how the intensitiy of several LEDs adds together...

• You need some sort of tranducer (maybe photodiode) so that you can measure the intensity. – Long Pham Jun 14 '18 at 15:06
• There are many NIST formulae and correction factors for CIE1931 Which standard do you want to follow? What specifications and tolerances for Luminence and Chroma error do you want? Show all LED dominant wavelengths you chose? Show Iv vs If and viewing angle with tolerances. Show how you will calibrate these parts with a RGB photodiode or colour/intensity detector then decide how accurate you want in your question. You only have 7 bit resolution? If you use the detector, then you can adjust in a digital servo loop. – Sunnyskyguy EE75 Jun 14 '18 at 15:11
• – Dampmaskin Jun 14 '18 at 15:15
• @LongPham I think that's not going to work well. Measuring light is neither engineering nor science. It is arts. Even a pricey irradiance meter for 2000 € will produce errors in the region of 2 digit percentages considering this problem. I recommend not to fiddle with any measurements here. Except you are very rich. – Ariser Jun 14 '18 at 15:34
• As we are arguing over the appropriate effort to make your LEDs look good (see below), I now think we should know a little bit more about the purpose of your circuitry. If you let us know your application we might end up with our skulls not smashed before your problem is answered :) – Ariser Jun 14 '18 at 15:55

update

How can I properly scale all those vectors of RGB values so that they give the same intensity?

Assume the average or mean intensity of all 3.

This also assumes a reliable repeatable measurement tool is available to you.

Free tools: camera, photo tools, image viewer with relative readings on RGB and Luminance (grey scale)

Cheap sensors: Best bet: PNJ4K01F Ambient Light Sensor \$0.98 (1) analog SMD, color-corrected lens, current buffered, choose gain load R

This assumes you have calibrated Current vs Intensity for each LED or array and that you are familiar with all sources of error, including; LED intensity slight nonlinearity with current, colour shift with temperature rise ( read specs), detector error ( human perception, CIE filtered detector, Camera settings, photo spectrometer calibration )

.

To roughly calibrate your RGB LEDs , you can use a camera photo in default settings and edit in software custom settings to display the RGB values of a test pattern.

This is similar to calibrating my TV for

• contrast (gain),
• brightness (offset)
• gamma ( non-linear gain)
• for each colour RGB ( thus 9 correction factors )

I use DPT.exe (OS=Windows) to display standard display TV patterns on any monitor from my PC since that is my 56" TV uses the computer as the source.

Then use the graphics chip software (Intel) to adjust the GPU for Desktop and Video ( video players have seperate calibrations).

If you have an LG phone or similar there are apps to use the camera and display RGB vector values and calibrate with grey scale images. I use gradient grey scale to calibrate gamma.

I also use Irfanview.exe for histograms and quick colour photo editing and measure rendered RGB values.

You can make a simple assumption that grey level is the average of RGB LEDs that are equal intensity with true Green and True Red and True Blue LEDs.

I also have the NIST spreadsheet with formulae, Standards and correction factors for many light sources, but this is a little overkill.