omG8HI9LSKFW6lhCj8prTs0Z6lUhdOT9Jhi1Sf4m

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel

Blinking LED : How to Make Blinking LED With 4 Cool Methods

Blinking LED circuit is a simple circuit which is made for flashing LED lights in spesific pattern like digital screen to make an image or text. It also be made with random blinking pattern for Christmas decoration lamp. Its main purpose is to made some LEDs blinking.

Four Methods to Make Blinking LED Circuit

LED stands for Light Emitting Diode. It is one-of-many diode types in power electronic. It can act as diode to hold current from flowing in opposite direction and allows current flowing from desired direction.
blinking led
Fig.1 Light Emitting Diode
Unlike common diode, LED emits light when forward current is passing through until the forward current stop flowing. LED has minimum current to be operated depends on its size, and it also has current treshold before it broke when the forward current is too high.

There are several ways to flash LED lights such as using simple relay, Schmitt Trigger Inverter, various logic gate, microcontroller, transistor, or even transistor combined with microcontroller. For this time, we will focus on most common and most effective methods, including : relay, transistor, microcontroller, and microcontroller with transistor.

Control Blinking LED with Simple Relay

Relay is a basic electromagnetic device mainly used for automatic swithing. Relay can turn on or off large current with only small current. Its primary parts are the electromagnetic part (the wire coil as temporary magnet) and a contact which looks like a lever with spring to pull it back.

The simplest explanation is, when the coil is energized by small portion of current, it acts like a magnet and pulling the contact to it. When the coil is not energized anymore, the magnetic force disappear and the spring pulls back the contact.

The use of simple relay can be seen in Fig.2 where we use a relay, a resistor, a dc source battery, and a LED.
blinking led
Fig.2 LED is turned off and coil is energized
Circuit above is the initial condition where the coil has not been energized by the battery.
blinking led
Fig.3 LED is turned ON and coil is not energized
Circuit above is the condition where the coil has been energized and pulling the contact then delivers the current to a single LED. 
After the contact moves the current to the LED, the coil does not get energized and the circuit's condition is coming back to initial condition in Fig.2 and the cycle keeps looping shown in Fig.4.
blinking led
Fig.4 Blinking LED simple circuit with relay
If the LED transition is too fast, you can use time delay consisting a resistor and a capacitor to delay the transition with charging capacitor principle as shown in Fig.5.
blinking led
Fig.5 Blinking LED with time-delay relay

Transistor for Blinking LED

We can utilitize transistor as a switch when we operate it on its active and cut-off region. This time we will use npn transistor to make LED flashing in sequence. Before we move on to the example, make sure you already understand how transistor work.

For the simplest example, let us see Fig.6 where we use single resistor, a LED, a resistor, and a dc voltage source.
blinking led
Fig.6 Simple example of LED controlled transistor
When the current flowing to base terminal of transistor, current from collector side will flow to emitter side and lighting the LED. The base current needs to be higher than its minimum requirement, and the voltage will drop by approximately 0.7 V across LED. The LED will emit its light as drawn in Fig.7.
blinking led
Fig.7 LED emits light
Now let us try to use two LED flashing in sequence using two capacitor and two LEDs in Fig.8.
blinking led
Fig.8 Blinking LED with transistor
Circuit in Fig.9 below shows us the first part of the cycle. At first, the transistor Q1 (the left side transistor) will run first and lighting the LED1 with full current supplied by voltage source. The current will flow through LED1, resistor R1 (most left resistor), and collector-emitter terminal of transistor Q1.
blinking led
Fig.9 The LED1 flashed
The next part is shown in Fig.10 below, there will be flowing current through LED2, resistor R4 (top right resistor), and charges the capacitor C2 (right side capacitor) until full. This occurs at a time slightly after first LED flashed.
blinking led
Fig.10 Capacitor C2 is charged
For some quite time, the base-emitter voltage VBE will be lower than 0.7 V, as a result LED1 goes out after the Q1 turns off.

The next part is Q2 start turning ON and the LED2 become brighter like in Fig.11.
blinking led
Fig.11 The LED2 grows brighter
Like LED1 cycle, at the same time LED2 grows brighter, C1 will be charged until full until Q2 turns off and LED2 goes out when VBE is lower than 0.7 V.
blinking led
Fig.12 Capacitor C1 is charged
And the cycle repeats from Fig.9
We can observer the full cycle in Fig.13 below.
blinking led
Fig.13 Blinking LED with transistors

Blinking LED Circuit with Microcontroller

Microcontroller may be the easiest and most effective way to control LED blinking. It provides some unique patterns you can imagine along with controlling its switching blinking pattern interval time. For this time, we will use the basic ATMEGA8535 to blink 8 LED in some pattern with easiest method.
Below in Fig.14 we provide an example with simple ATMEGA8535 with 8 LEDs along with their resistors.
blinking led
Fig.14 ATMEGA8535 and blinking LED
For most right to most left, we give the LEDs name D0 to D7 respectively. We will use PORT.A as output to deliver voltage at 5 V to the desired LEDs to make them flashing. In order to control the LED, we will need basic idea about biner number for programming.

PORT.A has 8 ports as output, so the biner code will be :
PORT.A = 0bxxxxxxxx;
where the x can be changed to 0 or 1.
Change x to 1 results the connected LED flashing.
Change x to 0 results the connected LED goes out.
In order to track which ports we need to program, let us see Fig.15 below.
blinking led
Fig.15 Microcontroller and LED
From Fig.14 we realize that PORTA.0 (PA0) is connected with LED1 (D0), PORTA.1 (PA1) is connected with LED2(D1), and so on.
The biner code PORTA = 0bxxxxxxxx represents ports A7, A6, .... and A0 respectively.
Assume we want to light LED D0 which connected to A0 then we make a program line such as :
PORTA=0b00000001;
where we turn off D1 up to D7 and only turn on D0.

If we want to make LED flashing in on-off pattern like in Fig.16,
blinking led
Fig.16 Flashing LED in order
we write the biner code
PORTA=0b01010101;
In opposite pattern like in Fig.17,
blinking led
Fig.17 Flashing LED in opposite pattern
 we can rewrite the code becomes :
PORTA=0b10101010;
For the last example, let us combine those two patterns into 1 continuous pattern like in Fig.18.
blinking led
Fig.18 Blinking LED with microcontroller
 And the code will be :
while(1){
PORTA=0b01010101;
delay_ms(100);
PORTA=0b10101010;
delay_ms(100);}
where we add 'delay_ms(100)' as pattern switching interval time 100 milisecond. We also use 'while(1)' for loop command.

Microcontroller Blinking LED with Transistor

Sometimes we use this method for special case such as bigger LED which requires bigger current. As we know already, most of microcontroller only provides 5 V output voltage. In order to flash a bigger LED, we need bigger output voltage. In this case we can use npn transistor connected with external voltage source and LED as shown in Fig.19 below,
blinking led
Fig.19 Blinking LED with transistor-controlled microcontroller
The program sequence will be same with the previous example of microcontroller, we only need to add transistor and external voltage source.

Untuk Bahasa Indonesia baca LED Berkedip Sederhana : Lakukan Dengan 4 Cara Keren Ini!.
Related Posts
SHARE

Related Posts

Subscribe to get free updates

Post a Comment

Language