Color mixing implementation details
The firmware uses CIE 1931 color space to input color requests. A particular point in the CIE 1931 color space is represented with three values (x, y, Y). The point is defined by (x, y) where x and y value represent the color hue and saturation. Hue is one of the dimensions of CIE 1931 color space. Saturation is the second dimension of this color space. The third value of (x, y, Y) vector specifies the luminous flux, in lumens (lm). The firmware must have inputs in the (x, y, Y) vector that specifies its color and flux output at some rated current and junction temperature.
shows the block diagram of a color mixing algorithm built upon Cypress' PowerPSoC family of controllers built around an 8-bit microcontroller and combining up to four independent channels of constant current drivers which feature hysteretic controllers. It also contains configurable digital and analog peripherals, operates from 7V to 32V, and drives up to 1A of current using internal MOSFET switches.
Figure 5: Block diagram for the implementation of color mix algorithm using Cypress' PowerPSoC
The implementation of a four-channel color mix is based on a three-channel color mix. The first step in the algorithm is the creation of a matrix. Then, find the inverse of the matrix and multiply it with Ymix. Ymix is the number of lumens that the total mixed light output must produce. These steps are shown in Figure 6
Figure 6: Flowchart for three channel color mixing