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

Return to Previous Lesson: Ohm's Law

Lesson Overview:

Now we'll build a dimmer switch!

Step 1: Project Overview

In the previous lessons you learned about the role that resistors play in controlling current.

Now we'll use a special component called a potentiometer (used as a variable resistor) which allows you to change resistance with a knob. This knob will be a dimmer switch for an LED lamp!

The circuit diagram for the project is shown below. For this project you will need the following components:


9V battery

345 ohm resistor, to protect the LED

Potentiometer, to control LED brightness

Button, to turn the lamp on and off

  1. Look around your classroom or home to find a dimmer switch. Sometimes it will look like a knob, or it might look like a slider.
  2. If you don't see an example of dimming lights, find another device that has a knob. What about a radio? The volume knob also uses a potentiometer.
  3. Continue to the next step.

Step 2: Potentiometer (pot)

The potentiometer component (also known as a pot, for short) is in the Workplane. The component has three prongs, but we'll only use two of them in this lesson. When it's used this way, it's also called a variable resistor.

The diagram below shows the symbol for a variable resistor. The zig-zag lines of the resistor should look familiar - it's the same as the resistor component. The arrow through the symbol indicates that the value changes with YOUR input.

In this step, you'll use the multimeter to see how that resistance changes as you turn the knob!

  1. You can open the Components + menu "All Components" tab to find another definition of the potentiometer.
  2. Drag a multimeter into the Workplane and place it above the potentiometer. Extend wires from the multimeter terminals to the middle pin of the pot (wiper) and to the right pin (terminal 3). Change the mode to "Resistance."
  3. Simulate the circuit!
  4. Try turning the potentiometer by clicking on the dial and rotating it left and right. How does the value of resistance change You should see resistance change from a high number, all the way to zero as you move the dial to the right.
  5. Next try changing the resistance value of the pot with the dropdown menu. This will adjust the MAXIMUM resistance of the pot. If you change it to 10 k-ohms, the values will range from 0 to 10,000 ohms.
  6. Finally, try orienting the dial straight up in the center. The value should be exactly 1/2 of the potentiometer's maximum.
  7. This is all you need to know for the dimmer switch project! If the knob is turned all the way to the left, the resistance is highest (and light is dimmest). If the knob is turned all the way to the right, the resistance is lowest (and the light is brightest).
  8. Continue to the next step to set up the circuit!

Step 3: Add the Battery, Button, and LED

The first part of the circuit you will set up are are the main functional components - the power source, button, and light.

  1. Drag a 9V battery into the Workplane. Rotate the battery and connect it to the bottom voltage rails, aligning the black and red terminals with the corresponding breadboard rows.
  2. Next place a button component across the center gap in the breadboard.
  3. Place an LED near the center of the breadboard in row J. You can customize the LED color by highlighting it and using the dropdown menu.
  4. Finally, connect these component in series: -Red voltage rail to right terminal of button -Left terminal of button to right terminal of LED
  5. Continue to the next step.

Step 4: Add the Resistor and Pot

Next, you will add the resistor and potentiometer, which control current flow in the circuit.

As you learned in Lesson 2, a 345 ohm resistor should be used with the LED to limit the current to a maximum of 20 mA. In this circuit, the potentiometerwill be used as well to control the LED brightness with a knob.

  1. Drag a resistor into the Workplane and change its value to 345 ohms using the dropdown menu.
  2. Rotate the resistor and place it on the breadboard so it is connected to the left-hand terminal of the LED. Remember to always protect an LED with a resistor in series!
  3. Next drag the potentiometer into the Workplane and place it in row E of the breadboard. Change its value to 10 kohm using the dropdown menu.
  4. Finally, complete the circuit with two wires. Connect a wire from the left terminal of the LED and the right terminal of the potentiometer. Connect another wire from the center terminal of the potentiometer to the ground rail (black) of the breadboard.
  5. Simulate the circuit! Press the button to turn on the lamp, then adjust the knob to change its brightness. You can try adjusting the brightness that you want, then turning the lamp on and off using the button.
  6. Continue to the next step.

Step 5: Understanding the Circuit

We chose a 10 k-ohm potentiometer because this value allows the LED to remain illuminated very dimly when the dial is turned all the way to the left. Under this condition, the forward bias of the LED is at the low end of its range: 1.8 V.

The circuit diagram below outlines the resistance and voltage levels in the circuit. Here is what we know:

Voltage across the LED is 1.8 V

Battery voltage is 9 V

The two resistors have value 345 ohms and 10 k-ohms

Can you figure out how much current is flowing through the LED using Ohm's Law?

  1. First let's fill in some missing information, shown in red on the diagram. It's helpful to consider the resistor and potentiometer to be a single resistor. With resistors in series, you can simply add their two values together. R = 345 + 10,000 = 10,345 ohms
  2. Now that you've grouped the resistor and potentiometer into a single component, you can easily find the voltage over it. Subtract the LED's forward bias from the battery voltage. V = 9 - 1.8 = 7.2 V
  3. Now you have enough information to calculate current! Use the equation: I = V / R (see hint for result)
  4. Continue to the next step.
  5. Stuck? HINT: I = V / R = 7.2 / 10345 = 0.000695 amps = 695 microamps. This is a very low current -- 695 millionths of an Amp!

Step 6: Verify Current and Voltage

Finally, you can check your answer to step 4 using multimeters! Bring two multimeters into the Workplane, and use one to measure the current running through the circuit and the other to measure the voltage across the LED.

  1. Connect one multimeter across the terminals of the LED. Use the dropdown menu to We changed the wire color to blue for clarity.
  2. Delete the wire connecting the pot to the ground rail of the breadboard. Replace it with a multimeter that measures current (Amperage mode).
  3. Simulate the circuit! Watch what happens to the current through the circuit and the voltage across the LED. Current will range from 965 micro-amps to 20 mA. Voltage will range from 1.8 to 2.1 V. You will also see the light get brighter and dimmer!
  4. Continue to the next step.

Step 7: Review

Congratulations on completing the Dimmer Switch project! You will continue to use Ohm's Law, in all of its forms, in future lessons. As you embark on more complex circuit projects, keep a few guidelines in mind:

Ohm's Law applies to single components.

If you have multiple resistors, consider grouping them together and finding the total resistance.

Pay attention to units! Convert values to ohms, amps, and volts before doing any calculations.

With enough practice, you will remember how current, voltage, and resistance are related. You can always refer to the triangle diagrams if you need to!

Congratulations, you have completed this project!

Check out other great projects here.

About This Instructable




More by circuits:Introduction Arduino Project 15: Hacking Buttons Arduino Project 14: Tweak the Arduino Logo 
Add instructable to: