Go Down

### Topic: Power consumption (Read 4227 times)previous topic - next topic

#### bogey

##### Aug 21, 2013, 12:28 am
I am using an Ardunio Uno and Xbee Series connected to a breadboard with 10 led's.

How would one go about calculating the power consumption of the device? Is there a way to calculate this?

I intend on powering this all through a 5V battery connected to the 2.1mm power jack.

Thanks.

#### Grumpy_Mike

#1
##### Aug 21, 2013, 12:34 am
You just add up the currents. You know what an led takes because you design the resistor value. The Xbee consumption will be in the data sheet and the arduino is about 30mA.

#### bogey

#2
##### Aug 21, 2013, 12:49 am
OK sorry, How do I correctly design my resistor value for the leds?

#### polymorph

#3
##### Aug 21, 2013, 04:16 am
No need to apologize.

How much current do you wish to flow in the LEDs? If more than 20mA per LED, or if they add up to close to 200mA at a time, you'll need to use driver transistors.

What is the rated voltage drop across the LEDs you are using?

If no more than 20mA per LED and you never plan on having all 10 on at a time, use Ohm's Law and the difference between Vcc and the LED rated forward voltage to calculate the resistor value.

R = (Vcc - Vled)/I

I have some Green LEDs here that drop about 2V at 20mA. That would be:
R = (5V - 2V)/0.020A
R = 150 ohms

As for the Arduino power draw, it is greater than what just the microcontroller draws because of the support circuitry. I'm sure Grumpy_Mike is right about that, and as he says look to the Datasheet for the XBee module.

What 5V battery are you using? I don't know of any batteries putting out 5V. However, I have successfully powered a few Arduinos from 4 AA NiMH cells, which together add up to 5V fully charged and about 4.8V for most of the charge.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8

#### E40racer

#4
##### Aug 21, 2013, 09:31 am
Feeding 5V to the barrel jack is not going to work. Recommended input voltage is 7-12V.
www.bajdi.com

#### pbrouwer

#5
##### Aug 21, 2013, 09:52 am
If you are going to power the arduino from a battery, you can use a boost (step-up/down) converter to supply 5V to the arduino. They are a bit more efficient than the voltage regulator on the arduino and can work with a supply voltage that is lower/higher than 5 V (depending on the type). That way the batteries will last a bit longer. I've had mine run off a set of 6 AA NiMH batteries for about four days (using the standard voltage regulator), using things like a servo (sparsely), lcd screen, a few sensors and a bluetooth module.
For some types of batteries a cut-off is recommended to prevent excessive drain.
Also, most arduino's will run fine on a supply voltage as low as 6 volts, but this depends on the regulator used, results may vary.

#### DouX_X

#6
##### Aug 21, 2013, 04:01 pm

No need to apologize.

How much current do you wish to flow in the LEDs? If more than 20mA per LED, or if they add up to close to 200mA at a time, you'll need to use driver transistors.

What is the rated voltage drop across the LEDs you are using?

If no more than 20mA per LED and you never plan on having all 10 on at a time, use Ohm's Law and the difference between Vcc and the LED rated forward voltage to calculate the resistor value.

R = (Vcc - Vled)/I

I have some Green LEDs here that drop about 2V at 20mA. That would be:
R = (5V - 2V)/0.020A
R = 150 ohms

As for the Arduino power draw, it is greater than what just the microcontroller draws because of the support circuitry. I'm sure Grumpy_Mike is right about that, and as he says look to the Datasheet for the XBee module.

What 5V battery are you using? I don't know of any batteries putting out 5V. However, I have successfully powered a few Arduinos from 4 AA NiMH cells, which together add up to 5V fully charged and about 4.8V for most of the charge.

You can also refer back to the Arduino cookbook Chapter 7, it shows you how to design and choose the correct resistors for powering LEDs.

#### bogey

#7
##### Aug 21, 2013, 04:02 pm

Ok so I am using a 9V battery connected to the barrel jack and suing a 3.3V supply from the ardunio to the leds.

The led's are fairly standard so can I assume they have an operating voltage of approx 2V at 20mA.
This means that for 1 led, R = (3.3 -2V)/0.02 = 65 Ohms. So these are the resistor values I need for my leds. Thanks.

Even though I have 10 led's, I will only ever have a maximum of 3 led's on at the same time. So this means that my power consumption is for the device is:
Ardunio Current + Zigbee Current + Led Current x 3 = 30mA + 45mA(from Zigbee data sheet) + 60mA = 135mA total??

Does this sound correct? Is it then possible to calculate how long my 9V battery will last?

#### bogey

#8
##### Aug 21, 2013, 04:04 pm
Quote
You can also refer back to the Arduino cookbook Chapter 7, it shows you how to design and choose the correct resistors for powering LEDs
.

Didn't see this. I will have a look at this thanks.

#### polymorph

#9
##### Aug 21, 2013, 04:06 pm
You can't assume anything, there is no such thing as a "standard LED". Different colors require different voltages.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8

#### polymorph

#10
##### Aug 21, 2013, 04:18 pm
The 3.3V output pins is only rated for 50mA on the Uno.

http://arduino.cc/en/Main/arduinoBoardUno
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8

#### Grumpy_Mike

#11
##### Aug 21, 2013, 08:13 pm
Quote
Is it then possible to calculate how long my 9V battery will last?

Only if you know the capacity of the battery.
This is quoted in mA per hour.
So with 135mA total and a 300mA hour battery that would last ( in simple theory ) 300 / 135 = 2.2 Hours.
In fact this is the absolute top and you are best to half the time.
And the capacity for 9V batteries very much depends on the type of battery.

Generally these 9V batteries are considered rubbish.

#### polymorph

#12
##### Aug 21, 2013, 08:35 pm
mAHr is normally rated at 10hr discharge times, and the number goes -way- down when you draw more than that. As Grumpy Mike says, 1/2 at best.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8

#13
##### Aug 22, 2013, 12:12 am
Do you have a multimeter?  Hook up your ammeter between the power supply and the circuit and measure it directly.  Watch it change as the LEDs go on and off, and as you transmit data and such.

#### bogey

#14
##### Aug 22, 2013, 07:44 pm
So I've looked up the spec of the battery I'm using at its capacity is 550mAh.

So that means that the battery will last only 550/135 = 4.07 Hours max.

That's pretty abysmal? Is this a common problem and how do people overcome it? Just say for something like a walkie talkie?  Unfortunately, I do need the Zigbee to be transmitting signals regularly.

Go Up