loading

The following information is a single lesson in a larger project. Find more great projects here.

Return to Previous Lesson: Control Current Flow with Buttons

Lesson Overview:

In this lesson you will learn to create custom colors with an RGB LED!

Step 1: Seeing Colors

In this lesson, you will get acquainted with one of the funnier looking components in library, the RGB (red-green-blue) LED.

The RGB LED is the same size as the regular LED, but it is actually 3 colored LEDs packaged together. You can light up the different colors at the same time in order to produce new colors.

  1. Continue to the next step.

Step 2: Using the RGB LED

The RGB LED is a special case of LEDs in parallel. Take a closer look by opening the Components + menu and dragging one onto the Workplane.

The component has 4 terminals on it. Hover your mouse over every terminal: red, cathode, blue, and green.

All three LEDs share a negative (cathode) terminal. That means that all LEDs automatically share one terminal!

That means we need to get the other terminals - the positive terminals or “anodes” of the red green and blue LEDs, to share a connection. We'll do this in the next step

  1. Open the Components + tab and bring an RGB LED into the Workplane.
  2. Press the “next” button below to continue.

Step 3: Connecting Three LEDs in a Row

In this step, you will connect the RGB LED to the breadboard and use wires to selectively turn on each color.

  1. Place the RGB LED in the breadboard, in row F, near the middle of the board.
  2. Use a 500 ohm resistor to connect the 2nd (cathode) terminal with the blue ground rail. Since the LEDs all share the negative terminal (cathode), this resistor will limit the current through all of the LEDs!
  3. Try connecting the red terminal to the red rail. Simulate the circuit. What color is the LED?
  4. Stop the simulation and delete the wire. Connect the blue terminal instead. Simulate the circuit, and observe the color of the LED.
  5. Stop the simulation, and try connecting up different positive terminals (anodes) at the same time, like the image above. How does combining each color produce a new one? Can you predict which colors will be produced? (see hint)
  6. Press the next button below to continue.
  7. Stuck? HINT: 1) red + green = yellow 2) red + blue = purple 3) blue + green = turquoise 4) reg + green + blue = white

Step 4: Making a Custom Color Mixer (part 1)

Now practice using the breadboard by adding three buttons to operate the LEDs. Start by deleting any wires. Next add 3 buttons to the breadboard, spaced apart by a few sockets.

Can you figure out how to wire up the RGB LED and buttons so each color is operated by its own button?

Now you can make your own custom colors! (A suggested layout is in the next step)

  1. Delete any wires that are on the breadboard already.
  2. Add three buttons to the breadboard, with a few sockets in between each.
  3. Try adding wires to the circuit to operate each LED with its own button.
  4. Press the “next” button below to continue.

Step 5: Making a Custom Color Mixer (part 2)

Below are some circuit design tips for creating a button-controlled RGB color mixer.

  1. Place all three buttons along the center strip of the breadboard, so the bottom leads are on row F.
  2. Connect one button, then simulate the circuit to see if it works. It's a good idea to test one button at a time because it's harder to fix a mistake with a lot of connections on the board!
  3. Remember to hold the shift key down while pressing the button, if you want it to stay on.
  4. Press the “next” button below to continue.

Step 6: What Color Will You Make?

Congratulations! You’ve completed your first RGB LED circuit. In future projects you can wire up the RGB LED instead of a single one if you want to incorporate your own custom color, like light purple!

In the time that you have remaining, try adding resistors in series with the red, green, or blue LEDs to see how this changes the color.

You might have a chance to use an RGB LED in your final project – The Secret Code Keypad.

Next Lesson:Final Project: Secret Code Keypad

About This Instructable

199views

4favorites

License:

More by circuits:Move Circuit Assembly Glow Circuit Assembly Introduction 
Add instructable to: