overview and Video
In this project you will create a dimmer switch by adding a potentiometer to control the brightness of an LED. You will learn how a potentiometer functions and interacts with the Arduino — effectively “translating” analog signals into digital and back.
Unlike general use single board computers like the Raspberry Pi, the Arduino – like other microcontrollers – lacks a simple human-machine interface. By programming your Arduino to respond to a potentiometer, you begin to harness the power of this microcontroller.
This is project 2 from the Arduino Project Handbook, V1 by Mark Geddes.
We built this project on a WorkBench Project Development Kit from Phase Dock.
you will need
One 400 pin breadboard
“Always-on” battery (optional; this project can be powered from your computer)
Potentiometer (50 ohms)
One resistor (330 ohm)
WorkBench 1007 Project Development Kit (PDK)
Two 2x3 Clicks
One Arduino Slide
Optional: one 2x3 or 1x3 Click depending on the size of your battery
Optional: 1007 Cover
Arduino Project Handbook, Volume 1, by Mark Geddes; this is Project 2
You can purchase the book (we recommend supporting Mark’s work).
You can download the sketches and libraries (code) for these projects.
Links are provided for your convenience; as an Amazon Associate Phase Dock Inc. earns from qualifying purchases. These products may be available from other sources.
1. If the LED doesn’t light…you may have it in backwards. (LEDs are directional and they only work one way.)
2. If the LED still doesn’t light up… and your wiring is correct…it may be a faulty LED or a resistor with too high a resistance.
Check the LED first to make sure it is working. If the LED is good, then change the resistor to a lower numerical value until the LED responds as expected. We used a 330 ohm resistor… that was the level needed to match the LED we used. Depending on where you get your LEDs, they may require different voltages, which will impact the size resistor you need to use.