LED Color Mixing

Electricity & Magnetism | Week 3 of 3 Last Updated: October 5, 2026 Download PDF

1 Overview

You will use variable resistors to control the light output of a multicolor LED. This will allow you to produce custom colors of your choosing.

2 Learning Goals

After completing this week’s lab, you should be able to:

  • Calibrate an LED/photodetector system to produce any specific color

3 Explore: LED and Detector

This week, you will be working with a circuit setup containing a compound, three-color light emitting diode (LED). This LED is similar to the pixels in an LED screen, just larger. It can emit three colors of light: red, green, and blue, or a combination thereof. The operation of the LED is controlled by three potentiometers, which are adjustable resistors. Each potentiometer has a corresponding knob that changes its resistance. The knobs turn 10 times to cover the full range of the potentiometer. See Figure 1 for a photo of the setup, including the potentiometer knobs.

Photo of the LED and detector experimental setup showing the three-color LED, potentiometer knobs, and photodetector.
Figure 1: Photo of the LED / detector setup with potentiometer knobs.

Play around with the circuit to familiarize yourself with its operation.

Record your initial observations in your notebook: What happens when you adjust the potentiometers? What happens when more than one of the LED colors is on at the same time?

To measure the light emitted by the LED, you will use a photodetector — the same detector you used in Lab 2 (Solar Cell Powered Motor). The detector produces a current that is proportional to the power of light on the active area of the detector. This current is converted into a voltage in the detector based on the gain as described in Section 11. This voltage can then be measured with a digital multimeter (DMM).

Make some initial observations about how the detector voltage changes as the light from the LED varies, and record them in your lab notebook.

4 Discuss and Predict: Calibration Strategy

Your ultimate goal is to precisely control the color output of the LED by adjusting the relative amounts of red, green, and blue emitted light. For example, you should be able to produce a specified purple color by adjusting the intensity of the red, green, and blue components. To have this kind of control, you need to know how the brightness of each color corresponds to the settings on the potentiometers. With your partner, brainstorm a data-taking procedure you could use to determine this relationship.

Record your ideas for a data-taking procedure in your lab notebook.

You probably noticed that for low knob positions, the LED does not emit any light at all. That is because an LED needs a minimum voltage to be applied, called the “forward voltage” or the “voltage drop,” before current starts to flow and produce light.1 Above that value, larger voltages result in more current flowing and more light produced. These are the knob positions we care about for this activity: the ones when current is flowing and light is being produced. Predict how a graph of detector voltage vs knob position would look.

Make a qualitative sketch of such a graph in your lab notebook. Label the “voltage drop” value on your graph.

5 Gather and Analyze Data: Calibration Curves

First, you will calibrate your system; you will determine how much light is produced based on the position of the potentiometer knob. Since the output of the detector depends on the brightness of the LED, you can quantify the behavior of the potentiometers by determining how the detector voltage relates to the potentiometer positions. With only one color on at a time, vary the position of the potentiometer and measure the corresponding photodiode voltage. Ideally you should try to span the entire range of the LED’s brightness, from when it first registers on the detector to when it reaches its maximum brightness.

How you record your data is up to you — write it directly in your notebook, or embed an Excel spreadsheet (Insert > Spreadsheet > New Excel Spreadsheet) and record it there, which lets you bring it straight into the app with Import from Excel. Either way, your data must be recorded in your lab notebook.

Take at least a half dozen data points, well-spaced, starting and ending at sensible voltages, and record your data in your lab notebook. Perform these measurements for all three LED colors.

For each color, enter your data into the Lab 09 page in the lab app. It has separate Red, Green, and Blue tabs, each with its own data table. Enter your knob-position and detector-voltage pairs for a color — typing them in or using Import from Excel — and the app performs a linear fit, giving an equation for that color’s detector voltage as a function of potentiometer position. This is called a “calibration curve.” Only include the datapoints above the voltage drop, since those are the ones that vary with knob position.

Record your equation for each color.

6 Discuss: Power vs. Voltage

Because what we ultimately want to control is how much power each color is emitting, we need to know how the real power shining on the detector is related to the voltage that we can measure. This relationship is given by

\[ \boxed{P = \frac{V}{gR_{\lambda}}} \]

Here, \(P\) is the power shining on the detector, and \(V\) is the measured voltage. The power depends on \(R_{\lambda}\), the “responsivity” of the detector when exposed to light of a wavelength \(\lambda\). This describes how much current the detector produces in response to the light. It also depends on \(g\), the “gain ratio”, which determines how much voltage is produced in response to the current. The responsivity curve for this particular detector and gain settings can be found in Section 11, along with a brief derivation of this relationship.

For each of the three colors used in the LED, look up the responsivity of the detector and the gain ratio corresponding to the gain setting on your detector (the gain ratio will be the same for all three colors). Note that the detector will saturate for these light sources above 20 dB.

Rewrite the power equation by plugging in the values of \(R_{\lambda}\) and \(g\) for each of the three LED colors.

This will give you three equations, one for each color, to compute the power of the LEDs from the voltages you measured. With your partner, discuss how to combine these with the equations from the previous section to produce equations describing the power of the light hitting the detector as a function of the potentiometer position.

Record your ideas in your lab notebook.

7 Analyze Data: Combined Power Equations

Once you have figured out how to modify your equations to give the true power output, perform the calculations.

Record the new equations, one for each color, in your lab notebook.

8 Explore: Generating a Custom Color

Now you have calibration equations that describe power output of each color in terms of the positions of the potentiometers. This means that if you wanted to generate a specific color based on a specific combination of power outputs, you could solve these three equations to determine the correct positions of the potentiometers needed to generate this color! You’ve built a multicolor LED you can precisely control to generate any color you want. Now’s your chance to try this out.

Pick a favorite color and look up online the “RGB” values of that color. Google has a nice widget for doing this, which you can find by searching Google for “color picker.”

RGB values are given as a triplet of numbers corresponding to red, green, and blue respectively. Each number ranges from 0 to 255. Determine the needed power output corresponding to these RGB values using the following formula

\[ P = \frac{X}{255}P_{limit} \]

where \(X\) is an individual value from an RGB triplet. \(P_{limit}\) is the maximum power output of the dimmest color LED – in other words, to determine this, you should look at the maximum power of each of the three colors, and then use whichever of these maxima is the smallest.

Use this equation for each of the three colors to determine the power output for each color, and then use your equations to determine the potentiometer settings.

Record your calculated potentiometer settings in your lab notebook. Set the potentiometers to produce your chosen color. Do you feel that the resulting color resembles your target color? If not, try reducing the intensity by a factor of two.2 If you had to reduce the intensity, is the color now approximately the color you designed for?

9 Draw Conclusions: Uncertainty in Calibration

Answer the following questions in your lab notebook:

  • Can you think of sources of uncertainty that we might want to include in further analysis of the measurements?
  • If you were designing this LED control system for a professional lighting company, why might it be important to share with them the uncertainties in your calibration equations?
  • What might be some other real-world applications for a compound LED control system like this?

10 Reflect

Think through everything you did this class period.

Briefly, record responses to the following:

  • Describe a challenge you encountered doing the lab.
  • How did you respond to this challenge?

11 Appendix: Detector Responsivity

This Appendix contains information from the specifications or “data sheet” of the detector and tricolor LED. The wavelengths of the light produced by the tricolor LED are plotted in Figure 2. The responsivity of the detector is shown in Figure 3. The gain values, used to convert detector current to measured voltage, are shown in Table 1.

Graph showing the relative intensity vs wavelength for the three LED colors, with peaks at approximately 460 nm (blue), 515 nm (green), and 645 nm (red).
Figure 2: Wavelength output of the tricolor LED. From p. 3 of the specification sheet, Kingbright WP154A4SUREQBFZGW. LED peak wavelengths are 460, 515, and 645 nm.
Graph showing the responsivity in A/W as a function of wavelength for the Thorlabs PDA100A photodetector.
Figure 3: Responsivity curve of the detector. From p. 10 of the specification sheet, Thorlabs PDA100A.
Table 1: Amplifier gain of detector. From p. 8 of the specification sheet, Thorlabs PDA100A.
Gain setting (dB) Amplifier gain (V/A)
0 1510
10 4750
20 15000
30 47500
40 151000
50 475000
60 1500000
70 4750000

If the light hitting the detector has a power \(P\), then the amount of current generated by the detector’s photodiode is given by

\[ I = R_{\lambda}P \]

where \(R_{\lambda}\) is the detector’s responsivity for the particular wavelength \(\lambda\), as given above in Figure 3.

The current generated is then converted to a voltage by an amplifier inside the detector. The resulting voltage is determined by the current, and the amplifier’s gain ratio \(g\) from Table 1. Specifically, the voltage is proportional to the current:

\[ V = gI \]

This is the resulting voltage that you measure with the DMM.

Putting these two equations together tells us the voltage measured as a function of the power of the light shining on the photodiode:

\[ V = gR_{\lambda}P \]

Solving for the power gives us the power equation from earlier:

\[ P = \frac{V}{gR_{\lambda}} \]


  1. The value of the voltage drop is related to the energy of the photons that are created, so it changes based on the color of the LED’s light.↩︎

  2. Note this does NOT mean to simply divide each knob setting by 2! (Why not?)↩︎