Circuit With One LED & Potentiometer

by tejbho305 in Circuits > Arduino

111 Views, 0 Favorites, 0 Comments

Circuit With One LED & Potentiometer

potentiometer.png

The LED will turn on when the potentiometer is between 2 values. It will turn off otherwise. The Serial monitor in the Arduino IDE app will continuously print the value of the potentiometer.

Supplies

The circuit uses:

  1. 1 LED
  2. 1 potentiometer
  3. 1 330 ohm resistor
  4. Elegoo UNO R3 microcontroller board
  5. Breadboard
  6. Laptop
  7. USB cord

Install Arduino IDE

download.jpg

Go to https://www.arduino.cc/en/software

Connect the Microcontroller Board to Laptop

IMG_2435.jpg

Use a USB cord to attach the Elegoo board to your device.

Attach the LED

IMG_2431.jpg

Connect one wire from pin 9 to the resistor, then connect the resistor to the LED. Then use another wire to connect the LED to ground.

Attach the Potentiometer

IMG_2432.jpg

Put the potentiometer on the breadboard. The left wire goes to power (5V). The right wire goes to ground.

Add the Knob to the Potentiometer

IMG_2433.jpg

Use another wire to connect the bottom of the potentiometer to A2. Finally, add the the knob to the potentiometer.

Write the Program

Screenshot 2025-01-09 at 8.08.31 PM.png

https://github.com/tejbho/ArduinoProjects/blob/main/potentiometer/potentiometer.ino

Downloads

Test the Circuit

FQO1MRUM5PPWGXZ.jpg
Circuit with LED and Potentiometer

Turn the knob on the potentiometer until the LED light turns on. The light should turn on when the value is between 2 and 3. Then turn the knob back to see that it turns off.