Ohm's law related question

Hi
I'm sorry if my question is too elementary, because this is not my field, but here it goes.
In this example (http://arduino.cc/en/Tutorial/Blink) a 220 ohm resistor is used.
Assuming that we will get approximately a 4,8V tension in the circuit we have about 22mA current intensity. Right?

The questions are:
1 - In any of tis circuits, what are the limits suported for the electric current intensity?
2 - Where should i check this values?
3 - The choice of a 220 ohm resistor had the purpose to maximize the led brightness?

Thanks

No.

The resistor gets the supply voltage minus the forward voltage of the LED.

Say the LED has a 2.2V forward voltage, the resistor in your case would get 4.8 - 2.2 = 2.6V. I=V/R, so I = 2.6 / 220 = 12mA.

The choice of resistor is to keep the current below both ~20mA for the IO pin, and 100mA in total for the power pin on the chip.

Check the data sheet for both the chip (ATMega328P) and the LED for details on all the figures you could need, including maximum current draws / sinks, maximum voltages, required currents, voltages, etc.

Thanks majenko.

I better do some reading on diodes and leds first!

By the way, in the case of Arduino Uno, in this page (http://arduino.cc/en/Main/ArduinoBoardUno), we can read:

DC Current per I/O Pin 40 mA

Is this the value you were pointing before (20mA)?

40mA is the absolute maximum on a pin. Atmel doesn't guarantee this level of current under continuous load, and instead recommends a limit of 20mA. Any more than that can cause the pin to malfunction.

ATMega328P Data Sheet:
Although each I/O port can source more than the test conditions (20 mA at VCC = 5V, 10 mA at VCC = 3V) under steady state
conditions (non-transient), the following must be observed:
ATmega48PA/88PA/168PA/328P:
1] The sum of all IOH, for ports C0 - C5, D0- D4, ADC7, RESET should not exceed 150 mA.
2] The sum of all IOH, for ports B0 - B5, D5 - D7, ADC6, XTAL1, XTAL2 should not exceed 150 mA.
If IIOH exceeds the test condition, VOH may exceed the related specification. Pins are not guaranteed to source current
greater than the listed test condition.

When dealing with LEDs connected to a chip, for indication purposes, I always doing the calculation in following way:

  1. I choose a LED I want to use
  2. I connect the LED into a circuit - power source - resistor - led.
  3. I set the current with the resistor such the LED lits fine, not too much brightness, not too low brightness
  4. I measure the current (Ipleasant) at that pleasant setting, I measure the voltage at the LED's pins (Vf) with that pleasant current flowing
  5. I calculate the resistor for my practical application:
R = (Voutput_arduino_pin_max - Vf) / Ipleasant

For example I measured Ipleasant=1mA and Vf=1.8V - the LED lits fine, it does indicate, it does not illuminate my room.. Am going to connect it to Arduino UNO:

R = ( 5 - 1.8) / 0.001 = 3200 ohm

Have fun!

PS: there is an urban myth LEDs need 20mA current in order to lit. That was 35y ago. Today's LEDs need 0.2-1mA to lit fine, when you just want to indicate something..

Thanks ... learned a lot in this thread.
I just donĀ“t like to connect things without understanding the basics and the WHY's :slight_smile:

pito:
PS: there is an urban myth LEDs need 20mA current in order to lit. That was 35y ago. Today's LEDs need 0.2-1mA to lit fine, when you just want to indicate something..

LEDs are often quoted with a rated "brightness" in "mcd" or "millicandelas". This brightness is at a specific current, often at or close to the absolute maximum. They usually try and quote these figures as high as possible to make the LED seem more competative.

Some LEDs I work with are blinding at 20mA - you can't look at them (1300mcd at 20mA), and three of them makes a nice bedside lamp.

Some LEDs I work with are blinding at 20mA - you can't look at them (1300mcd at 20mA), and three of them makes a nice bedside lamp.

At 10A current you may cut a steel sheet with your LED then .. :slight_smile: