Introduction
In this project, we are going to learn how to reduce or increase the brightness of an LED using a potentiometer. You will need:
- 1 Single Colored LED (color of your choice)
- 1 220 ohm resistor
- Jumper wires
- Breadboarding jumper wires
- Potentiometer
- Unda Xplora Kit
Let’s build the Light Dimming Project
Place one LED and one 220ohm resistor on the breadboard. Ensure you place the LED is such a manner that the positive pin is adjacent to one of the pins of the resistor.
Connect breadboarding jumper wire between the resistor and positive pin of the LED. Connect a jumper wire from digital pin D3 to one side of the resistor.
Place the potentiometer on the breadboard.
Connect jumper wires from analog pin A7 to middle pin of the potentiometer and from the 5V pin to the third pin of the potentiometer.
Connect a jumper wire from the GND pin to the top breadboard negative rail. Using breadboarding jumper wires connect from breadboard negative rail to first pin of the potentiometer and also connect to the negative pin of the LED.
Once you have completed building the circuit, return to the main project window and run the project. Once the project has been uploaded, go to Play Section. Now turn the knob gradually in the clockwise and observe both the LED and the Play section window. Turn the knob gradually in anticlockwise and observe both the LED and the Play section window.
What did you observe?
When the knob is turned in a anti-clockwise direction, we observe that the value displayed in the screen increases gradually from 0 to a maximum value of 100. Consequently, the LED also gradually increases in brightness.
When the knob is turned in a clockwise direction, we observe that the value displayed in the screen reduces gradually from 100 to 0. consequently, the LED also gradually decreases in brightness until a point where it completely turns off.
Feedback is closed.