Type Here to Get Search Results !

Sequential Led blinking circuit using arduino

What is Led blinking circuit?

Led blinking circuit is a basic electronic project which is usually done by the beginners. By using a led blinking circuit we can continuously on and off the led. This circuit will continuously turned on and off the led in a periodic manner. We can use multiple led to blink in a same circuit. This led blinking circuit can be made by using arduino or without using arduino. We can also customize the circuit according to the project requirement.

How do Led blink?

The word “Led blink” suggest the continuous flash on and flash off of a led. When we provide a positive supply in the led, it will start glowing. Again, when we remove the supply the led will turned off. If this two operations are done continuously in a periodic manner, the led blinking circuit will be formed. To achieve this two operations, we have to design a circuit. This circuit will automatically repeat the above two steps to make the led blink.

Led blinking circuit application –

Led blinking circuit is used in many household objects to make it more attractive. This circuit is mainly used for decoration purpose in homes and offices or during the festivals.

How to make a sequential led blinking circuit using arduino?

Sequential led blinking circuit is an advance form of led blinking circuit. In a sequential led blinking circuit the LEDs are blinking in a sequence from start to the end. We can use multiple number of LEDs to blink in a sequence. Here I will demonstrate the circuit using 10 LEDs. Also I will use the arduino uno to control the sequential blinking of LEDs.

Sequential Led blinking Circuit Components –

To make a sequential led blinking circuit I used 10 Led, Arduino uno and jumper wire. Also I used a breadboard to design the circuit and a Lipo battery to provide the supply in the circuit.

As we are using the breadboard in this project, so it is very important to learn how to use breadboard in the projects.

How to use breadboard?

The breadboard has two types of connection. The top and the bottom section of the breadboard has a series connection, where the middle section of the breadboard has a parallel connection. When you want to connect some components in series, then you have to connect the components either in the top section or the bottom section of the breadboard. Likewise when you want the parallel connection between the components, you have to connect the components in the middle section of the breadboard. In general the VCC and Ground connections are done in the top and bottom section and the remaining circuit is built up in the middle section.

Sequential Led blinking Circuit Connection –

At first take the LEDs and identify the positive and negative terminal of led. Then take the breadboard and connect all the Led in the breadboard. Here I connected the negative terminal of the Led in the upper side of the breadboard. Then I connected the positive terminal of the led in the middle portion of the breadboard. Now take look to the picture for better understanding.

Here I used 10 LEDs to demonstrate the working of the circuit. Now you have to do the connections between the arduino and the LEDs. Take the arduino uno and connect the jumper wires in the digital pins of arduino. Now connect the jumper wires with the LEDs as per the instruction given below.

Connection between Arduino and Led –

(1) LED 1 – D4 pin of Arduino Uno

(2) LED 2 – D5 pin of Arduino Uno

(3) LED 3 – D6 pin of Arduino Uno

(4) LED 4 – D7 pin of Arduino Uno

(5) LED 5 – D8 pin of Arduino Uno

(6) LED 6 – D9 pin of Arduino Uno

(7) LED 7 – D10 pin of Arduino Uno

(8) LED 8 – D11 pin of Arduino Uno

(9) LED 9 – D12 pin of Arduino Uno

(10) LED 10 – D13 pin of Arduino Uno

These are the connection which you have to do between arduino and positive terminal of Led. Then connect the negative terminal of Led with the ground supply. The circuit connection is almost completed. Now you have to do the coding in arduino uno.

Sequential Led blinking circuit Arduino Code –

To make the LEDs blink in a sequential manner, you have to do the coding in arduino. At first you have to connect the arduino uno with your computer and then you have to open the Arduino IDE software. Here you have to write the code for your project. Basically you have to use three main commands which are “Digital Write (LED, HIGH)”, “Delay (100)”, “Digital Write (LED, LOW)”. At first you have to declare the pins of Led in the pin declaration section. Then you have to set the Led as output in the void setup section. At last in the void loop section you have to write the digital commands to make the LEDs on and off. You can also add the delay commands to introduce some delay in the circuit. The sample code is given below.

// Sequential Led Blinking Circuit
 
int LED1 = 13;
int LED2 = 12;
int LED3 = 11;
int LED4 = 10;
int LED5 = 9;
int LED6 = 8;
int LED7 = 7;
int LED8 = 6;
int LED9 = 5;
int LED10 = 4;
void setup() {
   pinMode(LED1, OUTPUT);
   pinMode(LED2, OUTPUT);
   pinMode(LED3, OUTPUT);
   pinMode(LED4, OUTPUT);
   pinMode(LED5, OUTPUT);
   pinMode(LED6, OUTPUT);
   pinMode(LED7, OUTPUT);
   pinMode(LED8, OUTPUT);
   pinMode(LED9, OUTPUT);
   pinMode(LED10, OUTPUT);
}
void loop() {
  digitalWrite(LED1, HIGH);    // turn on LED1
  delay(100);                  // wait for 100ms
  digitalWrite(LED2, HIGH);    // turn on LED2
  delay(100);                  // wait for 100ms       
  digitalWrite(LED3, HIGH);    // turn on LED3
  delay(100);                  // wait for 100ms
  digitalWrite(LED4, HIGH);    // turn on LED4
  delay(100);                  // wait for 100ms
  digitalWrite(LED5, HIGH);    // turn on LED5
  delay(100);                  // wait for 100ms
  digitalWrite(LED6, HIGH);    // turn on LED6
  delay(100);                  // wait for 100ms
  digitalWrite(LED7, HIGH);    // turn on LED7
  delay(100);                  // wait for 100ms
  digitalWrite(LED8, HIGH);    // turn on LED8
  delay(100);                  // wait for 100ms
  digitalWrite(LED9, HIGH);    // turn on LED9
  delay(100);                  // wait for 100ms
  digitalWrite(LED10, HIGH);    // turn on LED10
  delay(100);                  // wait for 100ms
  digitalWrite(LED1, LOW);     // turn off LED1
  delay(100);                  // wait for 100ms
  digitalWrite(LED2, LOW);     // turn off LED2
  delay(100);                  // wait for 100ms
  digitalWrite(LED3, LOW);     // turn off LED3
  delay(100);                  // wait for 100ms
  digitalWrite(LED4, LOW);     // turn off LED4
  delay(100);                  // wait for 100ms
  digitalWrite(LED5, LOW);     // turn off LED5
  delay(100);                  // wait for 100ms
  digitalWrite(LED6, LOW);     // turn off LED6
  delay(100);                  // wait for 100ms
  digitalWrite(LED7, LOW);     // turn off LED7
  delay(100);                  // wait for 100ms
  digitalWrite(LED8, LOW);     // turn off LED8
  delay(100);                  // wait for 100ms
  digitalWrite(LED9, LOW);     // turn off LED9
  delay(100);                  // wait for 100ms
  digitalWrite(LED10, LOW);     // turn off LED10
  delay(100);                  // wait for 100ms
}

Save the code and then compile it. After compiling, you have to upload the code in arduino uno. Go to the tools and select the correct port and arduino type. Then click on the upload button to upload the code in arduino.

After uploading the code, all the LEDs will start blinking in a sequential manner. You can also provide a separate power supply in the arduino. For this you have to customize the circuit once again. If you are using a 9 volt battery, then you can directly connect the battery in the given port of arduino uno. But, if you are using a 12 volt battery, the connections will be different. You have to connect the 12 volt battery between the VIN pin and Ground pin of arduino uno. To limit the current you can use some resistors in series with the Led. Now the LEDs will continuously turned on and turned off in a sequence. This will continue until the supply is cut off.