Does setting a pin to blink even with no LED use much power?

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

 

I have a test going and it uses a battery. This is a bare bones 328P-PU on a breadboard. I have a few LEDs attached to pins to show me when each part of my program runs. To save battery life I disconnect the LEDs when I am not around.

 

My question is :  I know having the LEDs removed will save power, but the program is still making the pin "blink" every 60 seconds... does this eat up a lot of power? Does a pin being put HIGH then LOW and back again every 60 seconds use up significant power (and if so just how much) ?

 

Thank you.

 

 

I am a new AVR programmer. I am learning alone out of books, the Internet, etc. Please excuse me if I ask simple questions. Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You need to learn a bit about the fundamentals of electronics, power is consumed when current flows. If there is no device drawing current it won't use energy.

 

Think about the power sockets in your home. If you switch the socket on but don't plug in a current consuming device like a TV or a vacuum cleaner it's not like voltage is pouring out of the socket! (wives and grandmothers can often be fooled into thinking they have to switch them all off in case it wastes electricity! ;-) 

 

Bottom line current/voltage sucks not blows. :-) 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson:  I do know the fundamentals.

 

I know the "socket" will draw no current if nothing is attached, but in this case is the process of switching the state of the pin consuming energy on its own?

I am a new AVR programmer. I am learning alone out of books, the Internet, etc. Please excuse me if I ask simple questions. Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, the change of logic state uses a bit of power. That is really the source of the internal power consumption. Inside there are many thousands of nodes that change logic state on every clock edge. The addition of a few more nodes on those GPIO pins adds to the power consumption but the change is so small that it would be REALLY hard to even measure it.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jim: thanks... so can i assume if I have a battery 100% charged and I change the state to blink every 60 seconds (even with nothing attached) and the battery runs down in say 1 month of continuous usage, this "unused" blinking on the pin will be less than 1/1000 th of the power consumption?   (just a ball park figure of course).

 

 

I am a new AVR programmer. I am learning alone out of books, the Internet, etc. Please excuse me if I ask simple questions. Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Depending on how accurate an ammeter you have you could surely test this? But it's likely going to be down in the nA's or something.

 

Surely if the ultimate goal here is that there'll be an LED the current consumption of that is going to be orders of magnitude greater.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK... that's what I am looking for, thanks clawson.

 

I will ignore this "consumption" since it will be below my "noise floor"

I am a new AVR programmer. I am learning alone out of books, the Internet, etc. Please excuse me if I ask simple questions. Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In the past I have measured power consumption with a capacitor.

Just see how long the thing runs with the power from a 4700uF cap (or measure how long it takes to drop from 5-3V).  

That give you the ballpark of the use, and an easy way to see if some program changes make it use less ;)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Changing IO pin state once a minute is genuinely "noise" in the power consumption department. It will depend, far, far, more on how you manage sleep.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jim, clawson and sparrow2: Thank you!

 

sparrow: that sounds like a good idea.. I will try it.   The TR value (to charge the cap with a resistor) should work too.. thanks for the tip

I am a new AVR programmer. I am learning alone out of books, the Internet, etc. Please excuse me if I ask simple questions. Thanks.