Introduction
In This Project, we are going to make a Dual LED Chaser Arduino Circuit Project for Beginners. Basically, The Dual LED Chaser Arduino Project is an exciting electronics project that involves creating a circuit that flashes 12 LEDs in a chaser pattern. This project is an excellent way for beginners to learn about Arduino programming, electronics, and circuit design.
The circuit consists of an Arduino board, 12 LEDs, and 12 resistors with values between 220 ohms and 470 ohms. The LEDs are arranged in two rows, with each row containing six LEDs. The LEDs flash alternately, creating a dual-chaser effect.
Hardware Required
Components | # | Buy From Amazon |
---|---|---|
Arduino UNO | 1 | Buy Now |
LED 5mm | 12 | Buy Now |
Resistors 220Ω to 470Ω | 12 | Buy Now |
Jumper Wires | Few | Buy Now |
Breadboard | 1 | Buy Now |
Circuit Diagram
Circuit Connections
Arduino | LED |
---|---|
GND | -Ve of All LED |
D2 | +Ve of Led1 Through R1 |
D3 | +Ve of Led2 Through R2 |
D4 | +Ve of Led3 Through R3 |
D5 | +Ve of Led4 Through R4 |
D6 | +Ve of Led5 Through R5 |
D7 | +Ve of Led6 Through R6 |
D8 | +Ve of Led7 Through R7 |
D9 | +Ve of Led8 Through R8 |
D10 | +Ve of Led9 Through R9 |
D11 | +Ve of Led10 Through R10 |
D12 | +Ve of Led11 Through R11 |
D13 | +Ve of Led12 Through R12 |
Working Explanations
The circuit uses an Arduino board to control the flashing of the LEDs. The board is programmed to output a signal to the LEDs in a specific pattern, creating the chaser effect. Each LED is connected in series with a resistor, which limits the current flowing through the LED and protects it from damage.
The Arduino board sends signals to each LED in turn, turning it on and off in a specific sequence. The LEDs are arranged in two rows, with each row containing six LEDs. The first LED in each row is turned on, followed by the second, third, and so on until all six LEDs in the row are turned on. Then, the first LED in the second row is turned on, followed by the second, third, and so on, until all six LEDs in the second row are turned on. The process then repeats, creating the dual chaser effect.
Installing Arduino IDE Software
First, you will require to Download the updated version of Arduino IDE Software and Install it on your PC or laptop. if you Learn How to install the Arduino step-by-step guide then click on how to install Arduino Button given Blow
Code
//For more Projects: www.arduinocircuit.com
// change speed of display here
#define SPEED_MS 100
void setup() {
// set up pins 2 to 13 as outputs
for (int i = 2; i <= 13; i++) {
pinMode(i, OUTPUT);
}
}
uint16_t chase2 = 13; // keeps track of second LED movement
void loop() {
// move first LED from left to right and second from right to left
for (int i = 2; i < 13; i++) {
allLEDsOff();
digitalWrite(i, HIGH); // chaser 1
digitalWrite(chase2, HIGH); // chaser 2
chase2--;
// stop LEDs from appearing to stand still in the middle
if (chase2 != 7) {
delay(SPEED_MS);
}
}
// move first LED from right to left and second LED from left to right
for (int i = 13; i > 2; i--) {
allLEDsOff();
digitalWrite(i, HIGH); // chaser 1
digitalWrite(chase2, HIGH); // chaser 2
chase2++;
// stop LEDs from appearing to stand still in the middle
if (chase2 != 8) {
delay(SPEED_MS);
}
}
}
// function to switch all LEDs off
void allLEDsOff(void)
{
for (int i = 2; i <= 13; i++) {
digitalWrite(i, LOW);
}
}
Applications
- The Dual LED Chaser Arduino Project has several practical applications.
- It can be used as a decorative lighting display for parties or events.
- It can also be used as a safety light for bicycles or other outdoor activities,
- The flashing pattern can increase visibility and attract attention.
- Additionally, the circuit can be modified and expanded to control other electronic devices, such as motors, servos, or sensors, making it a versatile tool for electronics enthusiasts.
Conclusion
The Dual LED Chaser Arduino Project is an excellent way to learn about electronics, programming, and circuit design. The project is easy to build and requires only a few components, making it an ideal project for beginners. With its dual chaser effect and practical applications, the project is a fun and useful addition to any electronics enthusiast’s toolkit.
See Also