Solar powering an Attiny or Arduino with a capacitor, or just use AA? Part 1

If you have a processor in a remote location that you cannot or will not bring a psu cable to, you have several options of supplying it with energy.
Batteries come to mind and these could be rechargeable or not, or one can use a capacitor. After all, those store energy as well. To make a capacitor a viable option, obviously it needs to be a big one (in capacity, not especially in size), and one has the option of adding a solar cell to it.
As I wanted to feed an attiny that is somewhere in my garden and that is asleep most of the time and as I had some idle solar panels  (9 Volts, 2 Volts) those seemed  suitable to use, but as they do not provide much energy during the night, I needed to store that energy as well. As storage Nicads or even a LiPo came to mind. A Lipo I discarded as it takes some extra circuitry to do any decent charging. A nicad obviously needs some consideration in charging and discharging  as well, but they are more tolerant albeit that a deep discharge is usually not appreciated by them, nor is a constant charge.
Therefore I also considered using a “supercapacitor” I have a capacitor of 10.000uF but one can hardly call that a supercapacitor, but nowadays supercapacitors are readily available at modest prices. They would be easy to use in a charging circuit (basically a resistor would be enough) and they don’t mind frequent  charge and discharge. As their charge is  limited, obviously I would need a solar-cell, so the only thing I needed to see is if they would carry my application ‘through the night’

The Charge of a capacitor is expressed in Coulomb (symbol C).
this can be expressed as:

C=F * V  (where of course ‘F’ stands for the capacity in Farad)
Energy in Joule is expressed as:
J=C*V
Which is:
F*V*V  of F.V²
However, at a given voltage and capacity only half of the energy is available to charge the capacitor hence the energy in the capacitor will be:
J=½ * F *V²
and Joules can also be expressed as ‘Wattseconds’:
J=W *s

So if we calculate the number of Joules in the capacitor at 5.1 Volt:
J=0.5 * 1.5 * 5.1² = 19.5 J
Now obviously we will not all use those as the attiny kinda stops working at 1.8 Volt. If we calculate the number of Joules still left then we come to
J=0.5 * 1.5 * 1.8² = 2.43 J
So the amount of usable energy comes to 19.5-2.43= 17J (rounded down)

From an earlier project on  an attiny13 that was put to sleep only to awake every so many seconds, I found out that the current consumption was 5.5 uA at 5 Volt. Now obviously it will consume a bit less when the voltage drops, so lets assume 4uA at an average of 3.45 Volt (The average voltage being (5.1+1.8)/2=3.45 Volt).
We can calculate the average power consumption as V*I:
3.45 * 4*10⁻⁶ = 13.8 uWatt
as we have 17 Joules available and 17 joules being 17 Ws (Wattseconds) we can calculate the time:
J=W*s
s=J/W
s=17/(13.8 *10⁻⁶)
s=17/13.8  *10⁶
s=1.23 *10⁶
s=1230 000 sec (1,23 million seconds)
that is:
20.531 min, is
342 hrs is
14 days
Now this is just an approximation as there might be some current leakage. The processor will need to do something when awake, like flash a  led or send something, so it will probably not make the full 14 days, but that is not important as it is obviously enough to carry us through the night and probably an overcast day as well.

So how would this be if I used normal AA batteries or NiCad batteries?
As example for regular alkaline batteries  I will take the ubiquitous Philips  LR6. Fortunately someone else already calculated the energie stored in these batteries  at  1986 mAh at a discharge of 100mA. As the performance of these batteries is increasing when the discharge decreases, I will use 2000mAh for my calculations.
If one uses 3 of those to get to 4.5 Volts that will be a total of 9000mWh or 9 Wh.
Again, we will not be able to use this all as we have 1.8 Volt as lower limit, so we will be stuck with 3.6 Wh that we cant use, leaving  5.4 Watthour usable energy.
The average Voltage on the  processor will be:
(4.5+1.8)/2=3.15 Volts.
the average power consumption thus is:
3.15* 4*10⁻⁶ = 12.6uW
as we have 5.4 Wh available we can again calculate the time:
h=5.4/12.6 * 10⁶
h=0.428571 *10⁶
h=428571 hr
=17857 days
=592 months
=50 years
Wow. Why would anybody want to use anything else but LR6 batteries ?
Well for several reasons: 3 of those batteries take more space and eventhough they tend to perform well at low temperatures and low discharge rate, we all have experienced that Alkaline batteries left in a hardly used device tend to leak, even destroying that device by its corrosive leaking. Advantages and disadvantages of alkaline batteries are discussed here.
Nevertheless using alkaline batteries can be a good choice, but don’t forget to change them.

Using NiCad batteries gives a somewhat similar calculation. Suppose we use 3 cells of 1.2 Volt 2000mAh (or 2Ah).
Total energy will be 3.6*2= 7.2 Wh
useable energy will be (3.6-1.8)* 2=3.6 Wh
the average voltage we set at (3.6+1.8)/2=2.70 Volt
The average power consumption will be:
2.7* 4*10⁻⁶ = 10.8uW  (V*I)
The time will thus be:
h=(3.6/10.8) * 10⁶
=333333 hr
=38 yrs
Now if that only was true. My experience with  for instance solar garden lights (that often only have an 800mAh cell)  is that they usually dont last through the winter… and mind you, those are being recharged (which could contribute to their demise).
Nevertheless they may be a good choice.

In a following article I will discuss some practical examples

 

Advertisements

9 thoughts on “Solar powering an Attiny or Arduino with a capacitor, or just use AA? Part 1

  1. Hi there
    I am very interested in your calculations – but had no idea about them prior to your post.
    I have some questions about your calculations if you don’t mind?
    I had marked them up in a word doc with colours but don’t know how to post them here?
    Here we go:- My questions and comments are marked in an edited summary of your article with ###

    From an earlier project on an attiny13 lets assume 4uA at an average of 3.45 Volt (The average voltage being (5.1+1.8)/2=3.45 Volt).
    14 days For the Capacitor

    So how would this be if I used normal AA batteries or NiCad batteries?
    As example for regular alkaline batteries I will take the ubiquitous Philips LR6. Fortunately someone else already calculated the energy stored in these batteries at 1986 mAh at a discharge of 100mA. As the performance of these batteries is increasing when the discharge decreases, I will use 2000mAh for my calculations.
    If one uses 3 of those to get to 4.5 Volts that will be a total of 9000mWh or 9 Wh.
    ### 2000mAh * 4.5 = 9000mWh
    Again, we will not be able to use this all as we have 1.8 Volt as lower limit, so we will be stuck with 3.6 Wh that we cant use, leaving 6.4 Watthour usable energy.
    ### 6.4WH USABLE ENERGY
    The average Voltage on the processor will be:
    (4.5+1.8)/2=3.15 Volts.
    the average power consumption thus is:
    3.15* 4*10⁻⁶ = 12.6uW
    as we have 3.6Wh available we can again calculate the time:
    ### I thought we had 6.4 usable energy, thus the calculation below should be h=6.4/12.6*10⁶
    h=3.6/12.6 * 10⁶
    h=0.2857 *10⁶
    h=285714 hr
    =11764 days
    =392 months
    =32 years

    Using NiCad batteries gives a somewhat similar calculation. Suppose we use 3 cells of 1.2 Volt 2000mAh (or 2Ah).
    Total energy will be 3.6*2= 7.2 Wh
    ### 3.6V * 2000mAh
    useable energy will be (3.6-1.8)* 2=1.8Wh
    ### (3.6V-1.8V)*2000mAh = 1.8Wh
    the average voltage we set at (3.6+1.8)/2=2.70 Volt
    The average power consumption will be:
    2.7* 4*10⁻⁶ = 10.8uW
    The time will thus be:
    h=(2.7/10.8) * 10⁶
    ### should this not be (1.8Wh/10.8uW) * 10⁶ – where did your 2.7 come from?
    =250000 hr
    =28.5 yrs

    ### Can you do the same calculation for a 3.7v Lipo battery?
    I look forward to your next article
    Thanks
    Clive

    1. Clive, indeed, a first time poster needs approval
      I am not always sure where your problem is or what exactly you are asking:
      ###2000mAh * 4.5 = 9000mWh
      what exactly is your question here? 2000*4.5=9000
      ### 6.4WH USABLE ENERGY
      Yes here i made a mistake 9-3.6=5.4 Wh, not 6.4
      ### I thought we had 6.4 usable energy,
      Yes, i am afraid that at a certain moment with so much numbers in my head i picked the wrong one, albeit this needs to be 5.4
      ### 3.6V * 2000mAh
      3.6*2000=7200mWh=7.2Wh
      ### (3.6V-1.8V)*2000mAh = 1.8Wh
      3.6-1.8=1.8
      1.8*2000=3.6Wh
      I must have had a black-out
      ### should this not be (1.8Wh/10.8uW) * 10⁶ – where did your 2.7 come
      Yes you are right 2.7 is the average voltage as mentioned a few lines higher, but should have used the Wattage. I really shldnt do late night calculations anymore
      ### Can you do the same calculation for a 3.7v Lipo battery?
      If youknow the the capacity of the Lipo yes, can do just as well.
      I already have part 2 and 3 largely ready but still doing some measuring.
      I will check and redo the numbers in the article, thanks for pointing out my mistakes

  2. i dont see this post – maybe you need to authorise it before it displays – in which case sorry for double posting.

    Hi there
    I am very interested in your calculations – but had no idea about them prior to your post.
    I have some questions about your calculations if you don’t mind?
    I had marked them up in a word doc with colours but don’t know how to post them here?
    Here we go:- My questions and comments are marked in an edited summary of your article with ###

    From an earlier project on an attiny13 lets assume 4uA at an average of 3.45 Volt (The average voltage being (5.1+1.8)/2=3.45 Volt).
    14 days For the Capacitor

    So how would this be if I used normal AA batteries or NiCad batteries?
    As example for regular alkaline batteries I will take the ubiquitous Philips LR6. Fortunately someone else already calculated the energy stored in these batteries at 1986 mAh at a discharge of 100mA. As the performance of these batteries is increasing when the discharge decreases, I will use 2000mAh for my calculations.
    If one uses 3 of those to get to 4.5 Volts that will be a total of 9000mWh or 9 Wh.
    ### 2000mAh * 4.5 = 9000mWh
    Again, we will not be able to use this all as we have 1.8 Volt as lower limit, so we will be stuck with 3.6 Wh that we cant use, leaving 6.4 Watthour usable energy.
    ### 6.4WH USABLE ENERGY
    The average Voltage on the processor will be:
    (4.5+1.8)/2=3.15 Volts.
    the average power consumption thus is:
    3.15* 4*10⁻⁶ = 12.6uW
    as we have 3.6Wh available we can again calculate the time:
    ### I thought we had 6.4 usable energy, thus the calculation below should be h=6.4/12.6*10⁶
    h=3.6/12.6 * 10⁶
    h=0.2857 *10⁶
    h=285714 hr
    =11764 days
    =392 months
    =32 years

    Using NiCad batteries gives a somewhat similar calculation. Suppose we use 3 cells of 1.2 Volt 2000mAh (or 2Ah).
    Total energy will be 3.6*2= 7.2 Wh
    ### 3.6V * 2000mAh
    useable energy will be (3.6-1.8)* 2=1.8Wh
    ### (3.6V-1.8V)*2000mAh = 1.8Wh
    the average voltage we set at (3.6+1.8)/2=2.70 Volt
    The average power consumption will be:
    2.7* 4*10⁻⁶ = 10.8uW
    The time will thus be:
    h=(2.7/10.8) * 10⁶
    ### should this not be (1.8Wh/10.8uW) * 10⁶ – where did your 2.7 come from?
    =250000 hr
    =28.5 yrs

    ### Can you do the same calculation for a 3.7v Lipo battery?
    I look forward to your next article
    Thanks
    Clive

  3. thanks – some of my ### were just stating facts, not all were questions.

    Much clearer – but still confused with the Nicad

    See @@@

    you state
    Total energy will be 3.6*2= 7.2 Wh
    useable energy will be (3.6-1.8)* 2=1.8Wh
    the average voltage we set at (3.6+1.8)/2=2.70 Volt
    The average power consumption will be:
    2.7* 4*10⁻⁶ = 10.8uW
    @@@ you use the 2.7v for this calculation.
    @@@ then surely the time is 1.8Wh/10.8uW not the VOLTS/10.8uW – where else are you using the 1.8Wh in your calculations?
    The time will thus be:
    h=(2.7/10.8) * 10⁶
    @@@ no it should be (1.8Wh/10.8uW) * 10⁶

    thanks again.

    1. I already addressed that in my reply, the 2.7 volts is the average voltage… but i should not have used that in the calculation but the wattage and i already changed that
      the time is not 1.8Wh/10.8uW but 3.6/10.8*10^6
      the voltage is 3.6, the minumum voltage is 1.8 thus we can use 1.8volt range (3.6-1.8) with 2000mAh=3.6Watt.hr

  4. Thanks – very helpful article. I stumbled on to your site when searching for some solutions to PC boards using ESP8266s and ATtiny’s. Funny part is that I wound up doing a similar “what if” but did not take the math as far as you have. Nicely done. I got to the point of things looking ridiculously large for the time vale and said ok time to see where the rubber meets the road or crap, I forgot to carry the one…. Any way, nicely done, please keep these coming. They are educational, well done and very timely. Just wanted you to know people are still benefiting from your experiences, wisdom and words.

    1. I appreciate your kind words. You may have noticed that my ‘part 3’ hasnt been written yet. That is mainly because lately I have been focussing more on Low Power control with the ESP8266 than with the Arduino. Nevertheless, the theory is much the same. As summer is coming up, I will still see if a super capacitor with a solar panel would be sufficient to help a microcontroller through the night. My practical problem currently is that my low drop regulators have a max of 6 volt, which might be a bit risky with decent sunshine.
      Having said that, it has become a bit academic for me as I do have power all through my garden, but it is still interesting to find out

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s