Solarpanel+Battery+Arduino

Is it possible to charge a battery with a solar panel and at the same time power an Arduino with that battery?
This is my idea so far:

[Solar Panel]->[USB LiPo Charging Board]->[LiPo] and at the same time: [LiPo]->[3.3v Arduino]

These are all parts that I have lying around here.

My questions are:

  • Would that work at all? If so, how well would it work?
  • Is there room for improvement?
  • Are there (potential) problems?

Yes, there are potential problems. LiPo batteries have serious limitations and are destroyed by overcharging or overdischarging.

The charger was not intended for use with a solar panel, which has large current and voltage swings, and may not work correctly when loaded by your circuit.

Consider a different approach entirely, using a super cap as described here.

Thank you for your reply, jremington.
But could that capacitor even remotely compete with a 4000mah battery? I usually only get very few hours of sun where I want to put my solar panel and sometimes it's very cloudy for weeks here. I would really like to have a big buffer here, as I'd like it to be reliable and also because I may add more stuff to it (maybe an lcd or wifi capibilities, ...).
Overcharging shouldn't be possible because of the charging board. The solar panel doesn't have large voltage swings (according to the product description anyways) it should always be 5v. I assume they put a dc converter in those panels or something like that. But even if it isn't consistent, I don't seehow it would harm the charging board. I mean, sure it might pause the charging process when dropping below a certain threshold, but why would that be bad for the board? Also I don't understand how current swings would be a problem here. I mean there can't be too much current and if there isn't enough current the board will simply stop charging, right? Am I missing something?

The solar panel doesn't have large voltage swings (according to the product description anyways) it should always be 5v.

That is simply wrong. PV panels are current sources and the current is proportional to light intensity. For that reason, they work very poorly with DC converters that are not designed specifically for solar panels.

Consider the Sparkfun Sunny Buddy, which is designed for this purpose.

You will need to do quite a bit more research before deciding what parts will work. For example, you will need much larger panels to charge a 4 Ah battery, with so little sunlight.

For beginners, LiPo batteries are not recommended. Lead-acid or NiMH batteries take much more abuse and are much easier, safer and cheaper to use.

Hm, okay. Do you think this would work for my solar panels: https://www.aliexpress.com/item/1-cell-lithium-battery-3-7-V-4-2V-lithium-battery-CN3791-MPPT-solar-controller/32801728840.html
The one that you linked is really expensive imo.

Do you know how long the capacitor would last compared to the battery?

The reason for my choice of LiPo batteries is that I already have a lot of them. I also have a ton of Li-Ion 18650 cells, would that make any difference?

Edit:
Or what about this board: https://www.aliexpress.com/item/5V-Solar-Charger-Receiver-Module-Solar-Controller-3-7V-Lithium-Battery-Charger-H02/32797057240.html

Sorry, I don't know anything about cheap Chinese junk. Consult the data sheets for the chips used, and hope for the best.

In order to select the required capacitor size or battery capacity, you need to measure the current draw of your setup and estimate the average.

Approximate battery life in hours = (battery capacity in mAh)/(average draw in mA)

For safety, divide the result by two to take into battery account aging, and battery manufacturer exaggerations.

To select solar panel size, estimate the number of hours of full sunlight over the period of unattended operation, and multiply that by the current output in Amperes under full sun. That should be more than the battery capacity in Ah.

Define "Chinese junk" please. I'm sure the board you linked is produced in a Chinese factory as well. I don't really see why I would spend $25 + shipping on something that is worth less than 5 bucks.

Anyway, the 4000mah battery that I have had around 3800mah last time I charged it if I recall correctly. That would make 3.7V*3.8Ah=14Wh
I'd be surprised if the capacitor could even provide 1/10th of that tbh. But I don't really know anything about capacitors...

Just about anything sold on aliexpress can generally be viewed as junk, and unlike Sparkfun, there is no product support.

Good luck with your project!

You are funny. :smiley:
First of all, whenever I needed help with a product the sellers on aliexpress always helped me out a lot. And besides that Sparkfun imports the exact same "junk" that you can buy on Aliexpress. I bet bet it's even the exact same factories.
But if you know better, I'd love to look at your evidence.

From what I can tell, on Sparkfun you pay for a better structured website, nicer descriptions, direct links to the data sheets and all the costs that come from proxying everything through the US like US taxes, additional shipping costs and payment of a bunch of US employees.

felic:
Is it possible to charge a battery with a solar panel and at the same time power an Arduino with that battery?
This is my idea so far:

[Solar Panel]->[USB LiPo Charging Board]->[LiPo] and at the same time: [LiPo]->[3.3v Arduino]

These are all parts that I have lying around here.

My questions are:

  • Would that work at all? If so, how well would it work?
  • Is there room for improvement?
  • Are there (potential) problems?

Technically yes this is possible, it is how every off grid solar system works, however i don't think your proposed set up will work.

Consider:
Your Solar Panels are rated to 5vdc
Your Battery Charger is rated 5.5VDC Input
Charger output is rated to 4.VDC
Battery is rated to 3.7VDC
Arduino is rated 3.3VDC
There is no voltage regulator anywhere in your equipment list

So in a perfect world the Solar Panel will output over 5VDC to the charger, the Charger will charge the 3.7VDC battery to 4.2VDC AND will run the Arduino at 4.2VDC which may lead to a failure.

As there is also no battery controller in the circuit the battery will over charge and POSSIBLY fail in a "non passive manner" (read explode/catch fire/melt etc).

Alternatively the "standing load" (the Arduino and associated components) will discharge the battery faster than the Panel(s) can recover the charge, the battery will fail and everything will stop working.

Now consider a better way to design this solution:
Start with the total load * the number hours per day to get AH required, then multiply by the number of days back up required (the sun doesn't shine everyday) then multiply by two to get the battery ah required.

Determine the MINIMUM hours usable Solar "Pressure" per day (this will be less than you would expect!!) Google P.V. hours for your area.

Now calculate recharge current required to FULLY recharge your battery bank, typically this will be ma removed * hours run * 1.15 (certainly for SLA check LiPo Data for recharge details)
As an example if your constant load is 100ma for 24 hours then 100ma * 24 = 2400ma *1.15 = 2760ma required to recharge battery.

Next divide required recharge current by WORST CASE P.V. hours and add constant load to determine minimum Solar Panel required.

So for Auckland New Zealand the figures based on a constant 100ma 5VDC load 24 hours per day are:

Battery: 100ma x 24 hours = 2,400maH * 3 Days without Solar = 7,200maH minimum battery * 2 (to get a decent life out of the battery do not discharge below 50%) = 14,400maH Battery

To size the Solar system:
2,400ma - minimum available Solar hours worst month = 2,400 - 2 hours =2,200ma per day * 3 days without Solar = 6,600 *1.15 (minimum amount to replace used charge)
=6,600ma * 1.15 = 7,590ma current required to recharge battery.

7,590ma / 2 hours P.V. = 3,795ma + Load =3,895ma Solar required.

So 3,895ma /1000 =3.895 amps @ 5VDC required recharge the battery 3.895 * 5VDC = 19.475 watts minimum Solar Panels at 5VDC

Simple really!!!
:confused:

Hi,

Kiwi_Bloke:
So for Auckland New Zealand the figures based on a constant 100ma 5VDC load 24 hours per day are:

Battery: 100ma x 24 hours = 2,400maH * 3 Days without Solar = 7,200maH minimum battery * 2 (to get a decent life out of the battery do not discharge below 50%) = 14,400maH Battery

To size the Solar system:
2,400ma - minimum available Solar hours worst month = 2,400 - 2 hours =2,200ma per day * 3 days without Solar = 6,600 *1.15 (minimum amount to replace used charge)
=6,600ma * 1.15 = 7,590ma current required to recharge battery.

7,590ma / 2 hours P.V. = 3,795ma + Load =3,895ma Solar required.

So 3,895ma /1000 =3.895 amps @ 5VDC required recharge the battery 3.895 * 5VDC = 19.475 watts minimum Solar Panels at 5VDC

Simple really!!!
:confused:

You will need more than 20W, there is charge and discharge losses to consider.
Tom... :slight_smile:

TomGeorge:
Hi,You will need more than 20W, there is charge and discharge losses to consider.
Tom... :slight_smile:

Well I did say minimum....

@Kiwi_Bloke

You got a few things wrong here.

The charging board is not rated at 5.5V. It is rated at 4.5V-5.5V. The output is not 4V, it is highly dependent on the battery voltage itself and switches between constant current and constant voltage as needed. And the 3.3V Arduino can even handle 5V. I think the max rating was 12V if I recall correctly.
And the charging board simply stops charging when the battery is full.
Only discharging to 50% would not increase the battery life (assuming that 0% would be around 3V). There are a lot of myths about this kind of stuff out there. The only actual evidence that I have seen for significant battery capacity degradation is charging at 2C or more, but also the standard constant voltage charging which happens at somewhere around 90%.

But I think I'll go with one of the boards linked in this post.

Thanks for the calculations, though. :slight_smile:

I like the look of those new boards better, the initial board does say "Full charge voltage- 4.2V." which would be too high for you 3.7LiPo battery.
The calcs are based on SLA but the principle remains the same, what is your total load likely to be anyway?

20W worth of solar panels to run a 0.5W appliance?
I'm used to scale solar panels to 10x required draw, and here we get an average of about 4 hours of sunshine a day.
My 20W panels (placed in a far from optimal position - there's a wall shading them in the morning) could power a 2W air pump 24/7 backed up by a 7.2 Ah battery.
Simple home solar system, no MPPT or so to optimise charging.

@Kiwi_Bloke All LiPo batteries (or cells to be more precise) say they are 3.7V. In reality they all operate between around 3V and 4.2V depending on how much charge is left.

It's hard to say for me what the total load is going to be. I'll probably make it as high as possible. Meaning, if there will only be enough power to run the Arduino, then I'll just run the Arduino. If there is enough power to also run a small oled display and a wifi connection, then I'll do that, too.
The Arduino draws around 4 mA and the oled display draws around 20mA and the wifi chip around 15mA if I put it in deep sleep while I don't need it.

An ESP8266 (can replace Arduino + WiFi shield) draws a few microamps when in deep sleep.

True, but only to a certain degree. On the ESP you only have 1 analog pin.

True. For most (not all) projects that'll do just fine. There are more differences.
For a great deal of projects that need WiFi connectivity they're an excellent choice, even if many inputs and outputs are needed - that's what port extenders come in handy.

wvmarle:
20W worth of solar panels to run a 0.5W appliance?
I'm used to scale solar panels to 10x required draw, and here we get an average of about 4 hours of sunshine a day.
My 20W panels (placed in a far from optimal position - there's a wall shading them in the morning) could power a 2W air pump 24/7 backed up by a 7.2 Ah battery.
Simple home solar system, no MPPT or so to optimise charging.

where is here?
you are lucky to not have to allow for rain days and winter rates, but down here in Godzone we have this thing called weather and to allow for that we have to aim a little higher.
How many 20 watt panels do you have?