Go Down

Topic: solar -> battery -> arduino (Read 3 times) previous topic - next topic


Dec 15, 2011, 06:01 am Last Edit: Dec 15, 2011, 09:33 am by magnethead794 Reason: 1
battery -> http://www.pololu.com/catalog/product/2226

If I have a solar panel array delivering 9 volts and 260mA nominal, and my project only pulls 70-90mA, would the remaining 170 or so mA get wasted, or charge the battery?

The cells are rated 9V @ 130mA nominal, I'm expecting closer to 8.5@85 out of them, thus why I'm paralleling them.

FWIW, the regulators have a 15V max input.

How would I set this up? I know I'll need a diode between the solar panels so one doesn't backfeed the other, and another diode before the array so the battery doesn't backfeed the panels.

I've seen solar battery/load tenders for 3V3 Li-ions, but nothing for 9V NiMH's.

edit: found this -> http://ghurd.info/dc.html

I've emailed the designer to ask how to modify for 9V.


I realize this is an old topic but I will just give my input as others might be working on a similar project.
Yes depending on your configuration, the battery would be charged. If you can not find a 9V solar charger you might want to choose a LM317 voltage regulator that you adjust to exactly 9V. That way there is no risk of overcharging your battery. Do not adjust the voltage to exceeding 9V as NiMH batteries are sensitive to overcharging and require a low current trickle charge. By staying at 9V you should be ok.

Like you mention you will have to insert a diode (1N4004 will do fine) to prevent backflow into your solar panel

This technique will only work for SLA, NiMH and NiCd batteries.
Li-ion, Li-po and other Lithium variaties require controlled charging
Nederlands, Svenska, English


Don't you need a higher charging voltage than the battery delivers?
I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.


Mar 02, 2012, 04:53 pm Last Edit: Mar 02, 2012, 04:56 pm by sebswed Reason: 1
No that is not required. Taking a car battery as an example. When charged to the max it will be around 13.5V and schould not be discharged under 10.8. Charging to the max requires a controlled charger. Having a constant voltage exceeding 12V will eventually damage the battery.

When charging permanently at 12V, your battery would measure 12V instead of 13.5 and you will reach the 10.8 faster but you don't have the risk of overcharing.

By taking the project 9V as an example where the project only consumes 90mA it would have acording to the poster a permanent overcapacity of 170mAh which can be safely stored when charging at 9V exactly. In that way you can have the charger (solar panel) permanent connected witout damaging the battery.

Nederlands, Svenska, English


I've just started looking into solar-powering one of my Arduino devices. The description on this thread sounds rather simple (that's good!) ;-)

Is it really as easy as in the attached schematic? Assuming matching voltages of battery and solar panel...

Location: Berkshire, UK
My Astro and DIY projects website: http://yesyes.info/


Mar 09, 2012, 06:10 pm Last Edit: Mar 09, 2012, 06:31 pm by sebswed Reason: 1
No, you need a voltage regulator (between your diode and battery in your diagram). If its a small panel (less than 1.5A) than the LM317T will do fine:
If the voltage is a lot higher than the matching battery than you need to cool your regulator (which is not a bad thing to do anyways).
Nederlands, Svenska, English


to maximise the efficiency of the system you should not use a linear regulator like the  of that LM317.  When it regulates the voltage down, it sloughs off the extra energy as heat, losing a lot of you collected energy. By using a switch mode regulator such those by Recom and other manufacturers you get around 90% efficiency rather than around 65% with the 317.

Various batteries have been discussed for the project but I have had problems with batteries other than LiPos. The lead acid ones can be ruined if they drop below ~10.8 volts. Like I did, you will probably say this is not a problem as the it will be recharged every day. I went through a couple of batteries when bird poo on the solar panel  severely limited the output while the arduino kept on draining the battery.

I found that the daily "top-up" charges to  Nicads and NiMh decreased the output of these batteries through the memory effect. Unless you take the batteries out periodically and fully cycle them a few times then this can be a problem not to mention cell balancing.

I ran with these units from sparkfun for a while as they are quite efficient and dual voltage.


Put a switched mode regulator on the input to make sure you dont cook it. (go for the lower end of the input range to maintain efficiency).

I have moved on to a custom made MCP73213 based power module for remote arduinos to further improve efficiency and cost but the ones above are a simple, ready made solution.


Thanks sebswed. So something like the attached circuit? Then I'd adjust the output voltage of the LM317 to the rated voltage of the battery?

Location: Berkshire, UK
My Astro and DIY projects website: http://yesyes.info/


Thank Lemming. The whole thing will be rather low current. The solar panel / battery only needs to power an Arduino Mini, a DHT22 sensor and a low power 433MHz RF module. So we're talking about 100, maybe 200mA. This will be the outdoor wireless sensor for a weather station.

I haven't decided on a solar panel yet, or a battery. I've just started thinking about this and wanted to see what electronics I would need for the sensor to be solar powered with rechargeable battery for the night and cloudy days. What I had in mind was a small solar panel and maybe a battery from a mobile phone I no longer use. Or a camera battery maybe.

Location: Berkshire, UK
My Astro and DIY projects website: http://yesyes.info/


I can appreciate the cost savings by skipping the system that I have outlined above.

Just be mindful that the output stated on the datasheet of the solar panel is a best case scenario. This will only be achieved on sunny days and even then only for ~5 hours. With the Arduino pulling 100-200 ma it is only the excess that is left to charge the battery. i.e. you may be looking at only 5 hours of charging per day at best. You should go for overkill on the solar panel.

Also phone and camera batteries typically have capacities of 1300-1500 maH. This isn't much to power the Arduino for up to, say 16 hours a day. 


Some thoughts:

Arduino running at reduced clock saves power, can the task run at 1 MHz?
Using power-saving modes can stretch the battery life out more just stealing millis here and there.
If you need to run 100 - 200 mA all the time then get a bigger solar panel and more battery.
If the sun is not so strong where you are then why not use reflective panels to gather more light, like a face tanner?

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.


Be aware that solar panels are rated for full on sunshine, they tend to generate a small fraction of their peak (or even nothing at all) in  overcast conditions.  In the UK or similar climate, its up the power by a factor of at least 10 and a big battery.........


I would not recommend a 1N400x for the backflow prevention -- the losses are significant, and with solar, you want to use all you can get.
Use a low-loss Schottky diode of some sort. The lower drop, the better!
Also, "providing 9V" into a 9V battery that's at low charge is somewhat misleading. A voltmeter across the battery will not read 9V -- it will read whatever the battery charge is. Depending on the current source, the difference between what you "want" to provide (9V, say) and what the battery actually measures, is what drives current into the battery. With a low-impedance source, this can easily be many Amperes of current, which will likely kill the battery. The main current limiting factor here will likely be the Schottky diode and the regulator itself which has built-in protection. To be kinder to the battery, I think you want to put in some kind of switch (like a MOSFET,) parallel a capacitor, and drive it with PWM from the Arduino.
At least, that's what I figured out I should do for my own battery charger application :-)


Mar 11, 2012, 06:27 pm Last Edit: Mar 11, 2012, 06:45 pm by sebswed Reason: 1
Yes this circuit will work fine for your purpose. Compare it with a solar garden lamp or solar driven water pump/fan and other gadgets. No advanced charger required.
It is true that an 1N400x will reduce the voltage by 0,6V where a silicon diode, germanium is about 0,3V.
If you feel your battery is running out faster than expected you only need to increase your battery capacity. NiMH batteries are not affected by memory effect as much as NiCd. A full chrage/discharge once every 3 months will prevent this. While the Li-ion/polymer are not affected by memory, they are sensitive to over discharge + they age fast in heat (permanent non-reversible capacity loss) and they cost more. A couple of 2700mAh AA NiMH batteries are less expensive and give you twice the amount of a typical mobile phone battery.

I just noticed your text
What I had in mind was a small solar panel and maybe a battery from a mobile phone I no longer use. Or a camera battery maybe.

This circuit will not work for camera and mobile phone batteries, these batteries are usually Li-ion/Li-poly and these batteries require a controlled charger. Trying to charge them with your circuit will most likely make your battery burst in flames (no joke).

Another note on the Lithium varieties. You will not be able to increase the capacity by simply connecting multiple Li-ion/poly in parallel as this requires matching cells (the internal resistance) carefully. Connecting them in series requires a safety circuit.

My advice (I work with batteries daily and have a battery analyzer from Cadex) is that if you decide to go for Li-ion/poly you buy the sparkfun charger circuit. However, if you require more capacity, would like to solder and design things yourself at a lower cost, I would stick to the last circuit you uploaded.
Nederlands, Svenska, English


Thanks for all the replies! ;)

Update on the project. I've set this all up on a bread board (Arduino Mini 5V 168, DHT22 sensor and RF1100-232 module) and measured the current it draws (with a standard multi meter). It turns out it only draws 42mA (I should have know the answer was 42 :D ).

So if I got this solar panel (8V 260mA max)
it should work? Even if the panel only delivers half that max current, it should still be enough to keep the batteries charged on an average UK day?

I also changed my mind about batteries now. I think I'll just use 4x AA 2500mAh rechargeables in series. That's 4.8V and should be enough to power the 5V Arduino. Fully charged these batteries should have enough capacity to run the unit for almost 60 hours. Maybe a bit less as there might be current spikes when the unit is transmitting data that my multi meter doesn't pick up.

Also, I just realised that I have sort of hijacked this thread. Sorry about that. I hope this discussion answers some of the original poster's questions...

Location: Berkshire, UK
My Astro and DIY projects website: http://yesyes.info/

Go Up