LED Blinking Control by Potentiometer

In this tutorial, we will learn how to control led blinking speed by potentiometer using Arduino.

In old televisions and stereo, you might have seen a knob rounded button for changing the channel and adjusting volume.

Mainly you had seen light strings in which this type of function is used. We control the delay time of LED blinking, we replace the value of the delay time from the potentiometer reading variable.

Arduino read Analog value by analogRead  Function. The voltage is adjusted by the potentiometer.


Components Needed

  • Potentiometer
  • Arduino Uno
  • LED
  • Resistor

Potentiometer Pinout

potentiometer pinout

Pin Connections

Potentiometer and LED PinsArduino Pins
5v or Vin5V
GNDGND
VoutA0
LED anodeD5
LED cathodeGND

Use of Resistor with LED is mandatory otherwise LED will burst.


Circuit Diagram of Arduino Potentiometer Interface

Connect the potentiometer and led with Arduino according to the below circuit diagram.

Circuit Diagram LED Blinking Control by Potentiometer

Code for Arduino potentiometer led blink

Upload the below code and adjust the potentiometer knob to see the change in the blinking rate of led.

Output

Output of LED Blinking Control by Potentiometer

If the voltage on pin decreases on increasing the rotation of the potentiometer, you can reverse the connections of the VCC and GND pins.


Here some more tutorials for you:

Scroll to Top