Site icon Circuit Ideas for You

Simple Arduino-Powered Running LED Circle Circuit

Making nice looking projects help learning and fun in electronics.

Simple Arduino-Powered Running LED Circle Circuit is one easy project.

It uses Arduino to control LEDs in a circle.

This project is simple and it teaches coding, circuit making and LED control.

A 10k pot changes LED speed makes it fun to use.

Code:

Arduino Pin 2  ----|120Ω|----|>| LED1
Arduino Pin 3  ----|120Ω|----|>| LED2
...
Arduino Pin 9  ----|120Ω|----|>| LED8

A0 ------|------- Potentiometer -------|--- 5V
                 |--- GND (other pin)
                 
                 |---- 7809 ---- Power rail for LEDs
const int ledPins[] = {2, 3, 4, 5, 6, 7, 8, 9}; // Define LED pins
const int potPin = A0; // Define potentiometer pin
int potValue; // Variable to store potentiometer value
int delayTime; // Variable to control delay based on pot value

void setup() {
  // Initialize LED pins as outputs
  for (int i = 0; i < 8; i++) {
    pinMode(ledPins[i], OUTPUT);
  }
}

void loop() {
  potValue = analogRead(potPin); // Read the potentiometer value (0-1023)
  delayTime = map(potValue, 0, 1023, 50, 500); // Map it to a delay range (50ms to 500ms)
  
  for (int i = 0; i < 8; i++) {
    digitalWrite(ledPins[i], HIGH); // Turn on the current LED
    delay(delayTime); // Wait for a duration based on potentiometer
    digitalWrite(ledPins[i], LOW); // Turn off the current LED
  }
}

Code Explanation:

Circuit Working:

We can arrange the above LEDs in circle as shown below:

Parts List:

ComponentQuantity
Resistors
1/4 watt 120Ω8
10k Potentiometer1
Semiconductors
Arduino UNO Board1
IC 7809 Voltage Regulator1
LEDs Red any color8

This project connects IC 7809 input to Arduino 5V and output to breadboard rail for LEDs.

We should check the ground pins are connected right.

This circuit is easy to build and needs few parts.

A 10k potentiometer controls LED speed, its middle pin goes to Arduino A0.

Arduino reads pot value when power is ON and it changes delay between LED lights.

Turning pot can change LED speed and through this LEDs light in circle and looks nice.

This simple project teaches basic code, electronics and circuit making.

How to Build:

To build a Simple Arduino-Powered Running LED Circle Circuit follow the below mentioned connections steps:

Conclusion:

Simple Arduino-Powered Running LED Circle Circuit is great to start learning Arduino and electronics.

It shows how to use simple parts like pot, LEDs and regulator to make fun and changeable display.

It is good for beginners or anyone who wants to refresh skills.

References:

How to control two RGB LED Neopixel Rings (16x pixels each) with Arduino UNO

Exit mobile version