# What battery and solar panel voltage for Arduino Uno weather station?

I'm trying to design a weather station with an Arduino Uno using rechargeable batteries and a solar panel. I'm unsure about the specifications of the batteries and solar panel: do I need a 9V battery and a 9V solar panel or 2 x 4.5V batteries, etc? What would be the most efficient setup so that the unit is self sustainable?

In the country I live in there isn't a whole lot of sun each day, does this change the kind of panels I need?

• You need to add more detail to your specification. how much current does your system draw, how long do you want the system to go without any sunlight before it dies?? How many hours of sun is there available in average?? Are planning to use a solar charge controller?? What chemistry of rechargeable battery you want to use?? Your budget?? etc – Kvegaoro Aug 11 '15 at 17:32
• I have this website lying around in my notes for ages, it should help you in finding how much sun light on average you get. Just find your own town. – jippie Aug 11 '15 at 17:43
• I'm not really sure about these specifications. I'm looking for whatever that works. – gilianzz Aug 11 '15 at 19:24

I also ended up with the solar/supercap combo; here are a few more details.

Basically it is the classic arduino breadboard design, because the UNO board wastes a LOT of energy for the regulator. Any sleep library will allow very low current usage while waiting.

Supercaps + solar cell is a great way to power this, since :

• Charge control is very simple for supercaps (just check voltage),
• They have an almost infinite number of charge/discharge cycles,
• Unlike batteries, they work fine in cold weather

but this only works if you don't need a lot of power for something else. I used much smaller supercaps than Aedazan: two 10F (2.7V max) supercaps in series are more than enough for a long winter night (or even a few days). The solar cell is 6V, 6x6cm.

Now you should make sure that you don't overvoltage the capacitors. Since they are in series, you should make sure that both the middle voltage and the total voltage are where they shoud be.

For the middle voltage, the control is done with a single pin like this :

simulate this circuit – Schematic created using CircuitLab

You use that pin both as input to measure the middle voltage, and as output to discharge the capacitors if necessary. Just allow some time for the caps to recover before measuring again :

boolean discharging = false;
loop() {
// The caps should get some time to recover after some discharging
//   before voltage can be read reliably.
if (discharging) {
pinMode(A1, INPUT) ;
discharging = true ;
}
else {
int mid = analogRead(A1) ;   // Read voltage between caps
if (mid<492){                // If C1 is too charged
pinMode(A1, OUTPUT) ;      //   Set the pin as output
digitalWrite(A1, HIGH) ;   //   Connect it to VCC to discharge C1 through R1
discharging = true ;
}
if (mid>522){                // If C2 is too charged
pinMode(A1, OUTPUT) ;      //   Set the pin as output
digitalWrite(A1, LOW) ;    //   Connect it to Gnd to discharge C2 through R1
discharging = true ;
}
}
// Sleep some time...
}


For the total voltage, you have 2 options :

1. Cheap option (basically free) : use the pin above to discharge alternatively the capacitors when they are full. That works fine if the solar panel max current at the max voltage (about 5V) is less than what the pin can handle (20mA) divided by four (since the pin is in input mode half the time, and discharges only one cap at a time).
2. Reliable option (still cheap) : use a simple 431 shunt regulator and two resistors (sorry I didn't find the correct symbol for 431) :

simulate this circuit

The 431 starts swallowing lots of current when the control voltage (taken between resistors) is about 2.5V, ie when the digital pin is above 5V. You could directly connect the above resistor to vcc, but then the 431 would draw some leakage current even when Vcc is only 4V : this would deplete capacitors at night. If you connect it to a digital pin, you can enable the 431 only when Vcc (measured by arduino, no pin needed, google for details) is above, say, 4.8V. In other words, the 431 eats lots of current (up to 100mA) when the pin is HIGH and Vcc is above 5V, a little current (100-400µA) when the pin is HIGH and Vcc is below 5V, and almost no current (about 0.1µA) whenever the pin is LOW.

This may all seem complicated, but it really isn't unless you try to improve the design. The main limitation is the size of available supercaps if you need to power something heavy ; above a few tens of F they get awfully big and expensive...

I have done something very similar in the past. I used the UNO bootloader on a breadboard design.

I used the jeelib sleepy to power down my chip in between data gathering cycles (30 seconds in my case).

Instead of batteries I eventually settled on x2 2.7V recycled 100F pseudocapacitors and some cheap solar cells from ebay. I stored the data to an SD shield that I also bought from ebay.

The whole setup cost around \$20 and has been in operation for over a year.

If you make sure your input voltage is not too high (The datasheet says 5.5v max but mine get up to 6v at times) and your oscillator low enough the whole setup ends up using only a few milliamps on average and will have a wide voltage range. Mine usually dies at around 2.7V clocked a little under 4MHz. The solar cells are wired in sets directly to the capacitors with a blocking diode to slow self discharge during the night.

My design was a little short sighted and if I ever redesign it I will go with smaller solar cells, I did not realise just how efficient the Atmega328p chips actually were so the capacitors reached full charge very quickly and end up over their rating for most of the day. The biggest user of power ended up being the self discharge of my capacitors.

I did some early testing with x2 5.5V 1F capacitors and they were able to get the thing running 24/7 (not running the SD module) in Tasmania. I settled on pseudocapacitors due to their large number of cycles, their cheap price when bought from ebay recycled and the ability to run the SD card module. My original test design used x2 3V 1W solar panels in series from ebay. I did not test their actual power other than in the actual running of the device. When my pseudocapacitors arrived I rewired them into the configuration stated above, put it all in a sistema cookware box and positioned it for full solar coverage from the morning sun. To access the data I simply needed to copy the text file from the SD card to my laptop and then connect+disconnect the reset pin on the barebones board to reset it for gathering more data (The SD library would crash when the card was taken out).