Pages: [1]   Go Down
Author Topic: New to LED control, requesting some reading material.  (Read 665 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there, I've recently acquired an arduino and have been diddling with it left and right.  I am interested in making an LED board, however not a grid (if it is easiest to learn through first creating a grid, I would not be apposed to it).  I have searched a while for a tutorial that covers the basics of LED control... and have found nothing with any depth.  I don't want to be shown how to do it, I wish to be taught.  If any of you can point me in the direction of some reading, videos, or otherwise that would shed some light on controlling LEDs with the arduino, it would be much appreciated.  My greatest concern is that of the hardware, as programming the arduino, by and large, is pretty straight forward.

1. How does an IC fit into the scheme of controlling LEDs? 
              2. Is it the simplest method?
              3. the most efficient?
              4. Is there a limit to the control and IC, or other devices, provide? (number of LEDs, voltage output, etc)
              5. pros of certain control devices?
              6. cons of said devices?

In short:  I am new to the arduino and am in need of some guidance.

Logged

Dubuque, Iowa, USA
Offline Offline
Edison Member
*
Karma: 30
Posts: 2246
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You need to be more precise in what you're trying to accomplish, notably in the type of LEDs you're planning on using and what type of pattern you intend to configure them.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I highly recommend studying All About Circuits. Volume 1 covers DC electricity and will REALLY REALLY help you understand the fundamentals of electricity.
http://www.allaboutcircuits.com/vol_1/index.html

If you already know about all that, then Volume 4 covers logic chips and integrated circuits.
http://www.allaboutcircuits.com/vol_4/index.html

Earthshine Electronics put out a great beginning Arduino e-book that contains progressively complex tutorials. I found it to be a valuable resource when I was first learning how the Arduino worked.
http://www.earthshineelectronics.com/files/ASKManualRev5.pdf


Quote
1. How does an IC fit into the scheme of controlling LEDs? 
              2. Is it the simplest method?
              3. the most efficient?
              4. Is there a limit to the control and IC, or other devices, provide? (number of LEDs, voltage output, etc)
              5. pros of certain control devices?
              6. cons of said devices?

In short:  I am new to the arduino and am in need of some guidance.

These questions are really broad and a bit hard to answer. But, I understand where you're coming from. I had the same questions when I was first starting. I think that if you keep at it and keep learning and researching the answers will reveal themselves to you and you will also gain valuable knowledge. Keep at it and you'll get there!
« Last Edit: April 27, 2012, 12:47:30 am by carbine000 » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 509
Posts: 31472
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Try these:-
http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

http://www.thebox.myzen.co.uk/Tutorial/PWM.html

http://www.thebox.myzen.co.uk/Workshop/LED_Matrix.html
Logged

Wisconsin
Offline Offline
Edison Member
*
Karma: 4
Posts: 1000
I LOVE THIS STUFF!!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sparkfun has just released a learning website: http://learn.sparkfun.com/
I don't know how developed it is at it just launched two or three days ago

They also have some good tutorials on their main site
http://www.sparkfun.com/tutorials/329
Logged

Accelerate to 88 miles per hour.

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 439
Posts: 23769
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Controlling LEDs is pretty straightforward.
Its just a fancy diode, yes?
So you apply a higher voltage to the anode, a lower voltage to cathode. If the difference is big enough (~1.8-2V for a Red LED, and up to ~3.2-3.6V  for a green or blue LED, shown as Vforward onthe datasheets), the diode will conduct current and light up.
When it turns on, it will pass all the current the 'supply' (be it direct connection to a regulator, or from the pin of an IC), and burn up if the current is not limited.
That is usually done by means of a current limit resistor.
This is where ohms law comes in.
The Voltage from the supply is dissipated across the resistor and the LED.
So you have a 5V supply, a Vforward of 2V, and you want to limit the current to 20mA to keep the LED from burning up, you do a little math.
Voltage (V) = Current (I) x Resistance (R), or V=IR.  Re-arrange a little: V/I = R, voltage/current = resistance
You know the voltage across the LED, the remaining voltage is dissipated by the resistor.
So (Vsource - Vforward) is the voltage across the resistor.  You know the current you want. Solve for resistance.
(Vs - Vf)/I = R
(5V-2V)/0.02A = R = 150 ohm.

Everything after this assumes you will have a current limit resistor.

The LED doesn't care how that Vf is created. You can have the source be the power supply to cathode, and an IC (which is just transistors) pin going low to make the cathode low.
You can have an IC making the anode go high, with the cathode connected to ground.
You can have both - an IC/transistor making the anode go high, and another IC/transistor making the cathode go low - that is the heart of multiplexing, by the way.

If you have a bunch of LEDs you want to turn all at once, they can be connected in parallel (with a resistor each) and a lower voltage level used to power all of them.
If you have a higher voltage level available, the LEDs can be connected in series with just a single current limit resistor.
Say 12V was available, and you had four 2V LEDs, then (12V - 2V -2V -2V -2V)/0.02A = 200 ohm.

efficiency? - often it is more a matter of convenience.
A single transistor is all that is needed to control current flow thru LED.
However, if you're trying to control 8 LEDs, than 8 transistors all bundled up nice & neat in a 16 pin IC is a lot more convenient to deal with. 8 input pins, 8 output pins, common ground pin, and 8 current limit resistors.  Vs 8 resistors to control the base pin of the transistor, 8 collector pins connected to 8 current limit resistors, 8 emitter pins connected to ground. You can see how the space & parts build up pretty quick.

Clear as mud now?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: