datasheets.com EBN.com EDN.com EETimes.com Embedded.com PlanetAnalog.com TechOnline.com
Events
UBM Tech
UBM Tech

Design Article

# Science behind color mixing

## 6/1/2012 9:01 AM EDT

Page 3
The resultant Y values of the product are the lumen output of each respective LED that is necessary to create the requested color and flux. At this point, all math operations give rise to two benefits of doing the math this way. If any of the final product's Y values are negative, it signifies that the color coordinate that was requested is invalid. In other words, the requested color was outside the color gamut. Also, check if any of the product's Y values are larger than the maximum lumen output of any of the three LEDs. This means that the Ymix input was too large. In this case, the firmware scales back the values so that they produce the maximum possible flux at the requested (x, y) coordinate.

The flowchart in Figure 7 describes the steps required for four-channel color mixing algorithm. If the color points of four LEDs are mapped onto the chart, it forms four triangles. These triangles are made up of the following LED triplets: (R,G,B), (R,A,B), (R,G,A), and (G,A,B). These triangles are referred to as TRI1, TRI2, TRI3, and TRI4 in the flowchart. The three-channel algorithm is implemented to solve dimming values for each of these triangles. Each triangle is solved to calculate TRx. If any of the three dimming values obtained from this process are negative, then the solution is invalid. If the solution is valid, the three dimming values are saved. When two sets of three valid dimming values are obtained, there is no need to proceed with the other triangles. The operation flow skips down to the “Add Two Sets of Dim Values” process as shown in Figure 7. The six saved dimming values are added together so that there are four values: one for each of the four LEDs in the system. These four values are scaled to the appropriate dimming resolution and the dimming value solution is complete.

Lastly, these four dimming values are given as inputs to the external or internal drivers which control the brightness of LEDs by modulating the current flowing through each channel. If any three of four solutions are invalid that means the desired color is not present in the color gamut. The user can implement this error condition. It may be done by continuing to retain the old color, turning off the LED, and so on. These three-channel and four-channel color mix algorithms can be extended to more LEDs, as well as to a variety of lighting applications.

Figure 7: Flowchart for four channel color mixing

Anshul Gulati holds a Bachelors degree in Electrical and Electronics from BITS – Pilani, India. She has 8 years of experience in embedded systems design. Her interests include firmware development, digital design, and firmware/hardware co-design. She has worked on 8-bit, 16-bit and 32-bit controllers from different semiconductor companies likes Cypress, Motorola, Microchip and STMicroelectronics. She is currently working in CSBU R&D team developing solutions based on Cypress' PSoC products.

Visit Cypress website.

Courtesy of EETimes Europe

------------------------
If you found this article to be of interest, visit SmartEnergy Designline where you will find the latest and greatest design, technology, product, and news articles with regard to all aspects of clean technologies. And, to register to our weekly newsletter, click here.

EREBUS

6/1/2012 5:00 PM EDT

I can see the benefit of the four value color mixing over the three value. It reminds me of the differences between the Kodak film and the Agfa film I used in photography. The Agfa film was like the four value mixing and gave you a warmer picture in almost all cases. The Kodak film often left you with very sharp color effects that distracted from the scene. Especially in the blue spectrum. Often left you with a harsher rendition.

anne-francoise.pele

7/16/2012 11:25 AM EDT

Click on the link below to check out the collection of Design Articles, Case Studies, Product How-To articles, Teardowns, etc... that have been published on Smart Energy Designline.

Check back frequently. The list will be updated as new articles arrive.

http://www.eetimes.com/design/smart-energy-design/4371743/LED-Focus