Introduction: LED Sequential Control

Once you've blinked a few LED's on and off a few times, you might think, what next ? In this tutorial we will look at using a few LED's to blink in a programmable sequence which can look quite dramatic.

The ATmega328's pins are able to source enough current to drive a single LED, but we still need to limit the current to the LED so as not to damage it. The different color LED's available all have different voltage requirements so a simple LED driver circuit will need to be used, which is simply a single resistor which we will calculate further down the article.

Below is a video that shows the process of creating a sequential LED control using three color LED's.

Step 1: Simple LED Driver Circuit

The simplest LED driver circuit is a current limiting resistor in series with the LED you are powering up.

To calculate the resistor value we need to know the supply voltage, LED voltage and the LED current required.. In our case we are using a +5V supply.

The Formula we use is Ohm's law, V=IR, which is voltage equals current multiplied by resistance.

As we want to know the resistance, we rearrange the formula to R = V/I, resistance equals voltage divided by current.

The complete formula is:

resistance (R) = (supply voltage - LED voltage)/ LED current

Step 2: LED Resistor Values (Red and Yellow)

The above diagram shows the resistor values and LED colors and what pins need to be connected to the arduino board.

RED and YELLOW LED's

The Red and Yellow LED's both require 2V and 15mA.

So we put those values into the formula:

R = (5V – 2V) / 0.015 A

R = 200 ohm’s

We choose the closest resistor value of 220 Ohm’s. 220 Ohm’s drops the current slightly to 13.6 mA which will still work.

Step 3: LED Resistor Values (Blue LED)

BLUE LED

The Blue LED's requires 3.3V and 15mA. So we put those values into the formula:

R = (5V – 3.3V) / 0.015

R = 113 ohm’s

We'll use the closest resistor value of 100 ohms.

LED Polarity

Remember the LED can only be wired in one way. The longest pin is the positive (+) and the shortest pin is the negative(-). If it is wired the wrong way it will not operate.

Step 4: Arduino Coding of the LED Sequence

In this tutorial we blink the LEDs on and off in sequence once, then each LED intern blinks 4 quick blinks then the program starts over in a never ending loop.

Click Here to Get the Code

I hope this Tutorial has been useful to you. If you liked it please share it with a friend.


Also, I'd really appreciate it for you to join my email subscriber list where we'll keep you up to date with our latest videos, tutorials and articles relating to microcontrollers, Arduino and other electronics information. You'll also receive our free newsletter which is exclusive to our email subscribers only !

Click Here to Subscriber Now !

Thanks for spending your time to read this Instructable.

I really appreciate it !


Comments

author
DIY Hacks and How Tos (author)2016-11-25

Good first Instructable. You should enter this into the First Time Author contest. It would also fit for the Make It Glow Contest.

author

Thank you for your encouragement, it's much appreciated !

About This Instructable

1,960views

42favorites

License:

Bio: As and electronics engineer I am amazed at how gadets work. Having experience in PIC programming using low level assembly language, I am very impressed ... More »
More by smcontroller:Make an NRF24L01 Wireless Adapter BoardUse NRF24L01 Wireless in Your ProjectsDigital Rain Fall Monitor
Add instructable to: