atmega328-pu power consumption

hello
i just made the circuit on

wich is the minimum u need to run the atmega (arduino chip)

i have uploaded the simple blink program, and connected 1 led(se picture nothing else.)

when i measure the circuit it uses 30mA when the LED is off and 40mA when the led is on.
i use 8x varta high energy AAA batteries that can deliver 2900mA each
the batteries are connected in series.

so my question is, how long can i run this circuit on battery?

is there a way to lower the power consumption of the chip?

i am makeing a word clock with some leds and stuff that im gonna power from battery, and i dont want to keep changing batteries everyday.

mikki1211:
hello
i just made the circuit on
https://www.youtube.com/watch?v=ufQZnAAxZ7A
wich is the minimum u need to run the atmega (arduino chip)

i have uploaded the simple blink program, and connected 1 led(se picture nothing else.)

when i measure the circuit it uses 30mA when the LED is off and 40mA when the led is on.
i use 8x varta high energy AAA batteries that can deliver 2900mA each
the batteries are connected in series.

so my question is, how long can i run this circuit on battery?

is there a way to lower the power consumption of the chip?

i am makeing a word clock with some leds and stuff that im gonna power from battery, and i dont want to keep changing batteries everyday.

Looking at the photo... I see a 3 terminal regulator. Don't see why you need that with a battery powered circuit, and a regulator draws "quiescent current" (that is, it draws current even while doing nothing). This is added on top of any current that your circuit uses, and the rest (input minus output times current) is wasted as heat.

For minimal power consumption, try the following:

  • run your LED's at the minimum current needed to get the brightness you want.
  • run the 328p on it's internal oscillator (i.e. get rid of the crystal).
  • don't use series resistors with the LED's. Adjust their brightness via PWM.
  • try to use sleep mode between internal CPU activity. since you are making a clock, I assume you are going to use an external RTC chip. Setup the chip to issue an interrupt to wake up the 328p at the intervals you need, otherwise sleep.

Hope this helps.

i use 8x varta high energy AAA batteries that can deliver 2900mA each
the batteries are connected in series.

So 8 times 1.5V is 12V. You need 5V to run an Arduino so you are wasting over half the power from your battery in heating up the voltage regulator.

You need to know the batteries capacity in milli amps per hour mA/H. If those batteries were 2900mA/H then 40mA would give you 72 hours. But you never get all the rating from a battery. Lucky if you get half.

Krupski:

  • don't use series resistors with the LED's. Adjust their brightness via PWM.

That will not do. You need a current limiting circuit of some sort. Using no resistor does not change the peak current which will exceed the current capability of the Arduino pin.

Grumpy_Mike:
That will not do. You need a current limiting circuit of some sort. Using no resistor does not change the peak current which will exceed the current capability of the Arduino pin.

Well, I see it done all the time. As far as an LED, what kills them is heat. An LED will withstand 10 times or more current than it's rated maximum in short pulses. A typical example is an IR remote emitter. The Vishay TSAL6400, for example, has an absolute maximum forward current rating of 100 mA, but the max PULSE current rating is 1.5 amperes.

In use as an IR remote emitter, the code data is burst out as millisecond length pulses at 50% duty cycle (i.e. the 40 kHz carrier freq). The pulses are only sent for a fraction of a second, then there is a long period (seconds to days) of time where the LED draws no current. Obviously, this isn't hurting the LED die... it's made to work that way.

As far as the AVR (or any other MCU) outputs are concerned, they are typically "totem pole" mosfets setup to both source and sink current. A mosfet appears as a resistor when it's turned on, and like the LED, the mosfet can be killed by heat (simply I squared R where I is the current and R is the on resistance of the mosfet).

The mosfet can be "grossly" overloaded for small pulse periods and suffer no ill effects, As long as the total power dissipation integrated over time NEVER exceeds what the mosfet can withstand, it will be fine.

Not only is it commonplace and perfectly fine to use an LED direct connected to an output pin, it's also done to make the LED seem to be brighter than it is.

(edit to add): Newer cars do this with their tail lights. The LED's are pulsed on and off at different duty cycles for "running" brightness and "brake light" brightness. And unfortunately, I can see flicker up to about 80 Hz. Old CRT computer monitors gave me headaches because they have a clearly visible (to me) flicker. Same with sodium street lamps. I can see the flicker. I can usually see a digital alarm clock scanning the individual digits. Looking out of the corner of my eye makes it even worse.

An LED at 100% duty cycle at "X" current will not appear as bright as an LED at 50% duty cycle at "2X" current.

Notice in the sentence above that the average power dissipated by the LED is exactly the same.

It may bother the sensibilities of a purist engineer not to use the series resistors, but in reality they are not needed.

Well, I see it done all the time.

Yes you do and it is very wrong.

As far as an LED, what kills them is heat.

Rubbish. Heat can kill them but excess current depletes the carriers in the semiconductor and reduces the brightness.

An LED will withstand 10 times or more current than it's rated maximum in short pulses.

Only some LEDs can do this and non of the ones I have seen can withstand the duty cycle that you would give it with normal PWM.

The Vishay TSAL6400, for example, has an absolute maximum forward current rating of 100 mA, but the max PULSE current rating is 1.5 amperes.

Totally irrelevant to this discussion.

It may bother the sensibilities of a purist engineer not to use the series resistors, but in reality they are not needed.

In reality they are needed if you want to avoid damage to the Arduino.
Any one who ignores the limits in the data sheet of any chip is a complete idiot and is doing a disservice by advocating this for any beginner.

I thought you knew better.

thank for the replays guys.

i did a quick test with the leds and everything and the whole circuit draw 180mA stable.
(quick test...)

and i did some calculation
i got 8x2700 in series = 23200
then take 120Hx180mA=21600

so my circuit should run for abit over 120hours at best.
if my calculations are correct?

anyway i was hopeing for months without battery changing so i definetly need some rethinking of my circuit.
so more tips on how to reduce power consumption is welcome =)

I see a 3 terminal regulator.

?

run the 328p on it's internal oscillator (i.e. get rid of the crystal).

so the crystal is not needed? what is it used for?

mikki1211:
thank for the replays guys.

i did a quick test with the leds and everything and the whole circuit draw 180mA stable.
(quick test...)

and i did some calculation
i got 8x2700 in series = 23200
then take 120Hx180mA=21600

so my circuit should run for abit over 120hours at best.
if my calculations are correct?

nope !
putting batteries in series increases the voltage, nothing else
2x3.7V 1000mAh in series gives you 1x7.4V 1000mAh
if you put the same batteries in // , then each will source half the current, then yes, you get 2000mAh

8x1.5V in series gives you 12V ..... but still 2700mAh

ah yeah ofcourse,
if i connect the batteries in parallel i get more 2xmA and jsut 1x volts.

i think its time to quite for tonight and continue tomorrow hehe.

if i connect the batteries in parallel i get more 2xmA and jsut 1x volts.

If you connect batteries in parallel they cross charge which is not good.

Krupski:
In use as an IR remote emitter, the code data is burst out as millisecond length pulses at 50% duty cycle (i.e. the 40 kHz carrier freq). The pulses are only sent for a fraction of a second, then there is a long period (seconds to days) of time where the LED draws no current. Obviously, this isn't hurting the LED die... it's made to work that way.

You ignore the reason the current is naturally limited in such an application then claim something unrelated is why the LED does not fry. I wonder which fallacy that is? Oooh. Looks like it may be more than one. Good for you @Krupski!

mikki1211:
i am makeing a word clock

mikki1211:
?so the crystal is not needed? what is it used for?

The crystal provides a clock for the processor. The processor has an internal oscillator that can be used for the same purpose. The internal oscillator is limited to 8 MHz, uses less power, but is not very accurate. For building a clock, it is perfect. You will need an external real-time clock anyway so the fact that the internal oscillator is not very accurate is irrelevant.