# Arduino Forum

## Using Arduino => General Electronics => Topic started by: DiegoTc on Apr 19, 2013, 12:36 am

Title: I will like to know how many watts are consumed in a led
Post by: DiegoTc on Apr 19, 2013, 12:36 am
Hi
I will like to know if it is possible to know how many watts are consumed in a led when it is turn on.

Lets said I have a led connected to PIN 13 in my arduino. For 3 hours with the following code
Code: [Select]
`int LED=13;void setup() {  pinMode(LED, OUTPUT); }void loop(){ digitalWrite(LED, HIGH);}`

Is there a way to know how many watts where consumed?
Title: Re: I will like to know how many watts are consumed in a led
Post by: DVDdoug on Apr 19, 2013, 01:55 am
...Your are confusing Power (Watts) and energy (Watt-hours).    For example, small batteries are rated in milliamp-hours (mA-hr), and from that you can calculate mW-hours.   You can "pull" a lot of milliwatts (maybe a few Watts) from a battery for a short time, or the battery will run longer if you pull less power out of it.

Power is calculated as Voltage X Current.   If you have 2 Volts across an LED and 20milliamps flowing through it, that's 40mW.   Over 3 Hours, that's 120mW-hours.

If you don't know how much current is flowing through the LED you can calculate (or estimate) it if you know the series resistance and the applied voltage.

Let's say you have an LED rated for 2V @ 20mA.    Unlike resistors, LEDs have (approximately) constant voltage drop (when they are on and operating normally).  In a series circuit, the same current flows through all components, but the applied voltage is divided among the components. (That's Kirckhoff's Laws (http://en.wikipedia.org/wiki/Kirckhoffs_law).)

Let's say we have a 200 Ohm resistor.   With 5V from the Arduino and 2V across the LED, that leaves 3V across the resistor.  Using Ohm's Law (http://en.wikipedia.org/wiki/Ohm's_law), we can calculate the current.   3V/200 Ohms = 0.015 Amps (15mA).  The same 15mA is flowing through the LED with 2V across it, so we have 30mW of power dissipated in the LED (2V x 15mA).    Plus 45mW wasted in the resistor (3V x 15mA).  Or if you want the total power coming out of the Arduino, 5V x 15mW = 75mW, which is the same as 30mW + 45mW.

If you have a multimeter, you can measure the voltage across the resistor and LED to make a better calculation.  (The LED voltage rating is not always exact.)    In order to measure current you have to break the connection and insert the multimeter in series.  So, it's usually best to measure the voltage across the known resistance and calculate the current through it.
Title: Re: I will like to know how many watts are consumed in a led
Post by: fungus on Apr 19, 2013, 02:22 am

Hi
I will like to know if it is possible to know how many watts are consumed in a led when it is turn on.

Watts = Volts * Amps

Title: Re: I will like to know how many watts are consumed in a led
Post by: Henry_Best on Apr 19, 2013, 06:25 am

If you have a multimeter, you can measure the voltage across the resistor and LED to make a better calculation.  (The LED voltage rating is not always exact.)    In order to measure current you have to break the connection and insert the multimeter in series.  So, it's usually best to measure the voltage across the known resistance and calculate the current through it.

However, that only tells him how much power is consumed by the LED and its associated resistor. The Arduino is also consuming power, probably more than the LED and resistor.
Title: Re: I will like to know how many watts are consumed in a led
Post by: DiegoTc on Apr 19, 2013, 05:14 pm