Go Down

Topic: Simple solar charging a standalone ATMega device (Read 3905 times) previous topic - next topic


Nov 28, 2012, 12:28 am Last Edit: Nov 28, 2012, 12:30 am by asuryan Reason: 1

I would like to build an autonomous robot that charges itself
with solar panels. I attached a schematic.

Rechargeable batteries:
4x 1.2V, 700mAh, NiMH - fully charged approx. 5.5V
Two solar pannels:
2x 4V, 45mAh
I measured 5.5V in cloudy light conditions and 9.5V in direct

So my questions are:
- Does my circuit work in general?
- Is it save to charge the batteries that simple (explosions, fire etc. :smiley-eek: )?
- Is it correct that I need more voltage than the battery voltage to begin charging?
- I would  charge 45mA at maybe 6.5V in average. Is that ok for the batteries?
- I do need the 7805 because of the possibility of direct sunlight right?

Thanks in advance!
Visit my blog! http://electronics.scriblab.de


No ideas?!  :(
I dont want to bump but I just want to avoid burning my house down
if the batteries blow up because of my bad setup... :(

Thanks in advance!! :)
Visit my blog! http://electronics.scriblab.de


Nov 29, 2012, 12:46 pm Last Edit: Nov 29, 2012, 12:50 pm by Riva Reason: 1
I'm sure if you google this you will probably find some useful info. I have never done charging circuits but a glance at your schematic and two things come to mind.
1. How do you stop the batteries from over charging?
2. I wonder if the 7805 regulator will work being fed 4x 1.2V

Sorry I cannot be of more help.

EDIT: Googled this http://electroschematics.com/4746/solar-charger-circuit/ not exactly what your looking for as panels are 12V and cell is 6V
Don't PM me for help as I will ignore it.


Nov 29, 2012, 01:36 pm Last Edit: Nov 29, 2012, 01:39 pm by Graynomad Reason: 1
I wonder if the 7805 regulator will work being fed 4x 1.2V

Nope, not a chance. I think it will just pass the voltage through with a small drop when the panels aren't in the sun. It will regulate when they are in the sun though.

Also the 7805 is not an LDO regulator, it's a very old and power hungry (last time I looked anyway) design so not good here.

I also think you need to regulate the voltage to the batteries.

Apart from that I can't help much either but I think there must be many chips and/or circuits around to do this.

Rob Gray aka the GRAYnomad www.robgray.com


The simplest way to prevent overcharge is to use a zener diode. The charged voltage for an NiMH cell is 1.4V, so you want a zener voltage of (1.4V * 4) = 5.6V to prevent overcharge. You can use multiple zeners in series to get the total voltage you need.

Generally speaking batteries should not be charged at a rate of more than 1/10th their capacity. For your 700mah cells that's 70ma, and you're charging at 90ma max. I figure that's close enough, and in practice you won't get that much current anyway.

An ATMega running at 5V should be fine pulling power, unregulated, directly from your batteries. However, you should use an analog pin to read the battery voltage and "sleep" your bot when the batteries run low. The Narcoleptic library makes this pretty simple, but Google can help you find other examples.

Finally, like Rob mentions, there are certainly more efficient ways of doing all this (google "MPPT" for starters). I'm going from the assumption that you're trying to keep it simple/cheap and the value of the components you have at risk is low.


Thanks to all of you for your input!

I would use this zener diode for my setup:

As far as I understand it would be rated exactly 5.6V.

Just a few questions though for further learning purpose: ;)
1. How do I know the charging voltage of batteries?
2. Chagrin: In your schematic the zener diode grounds the positive voltage to ground when the
voltage exceeds 3V right? Why does the zener is after the batteries and not between the solar
cells and the batteries? Should there also be a resitor after the zener?

Visit my blog! http://electronics.scriblab.de


2. Chagrin: In your schematic the zener diode grounds the positive voltage to ground when the voltage exceeds 3V right?

Only the positive voltage in excess of 3v.


Why does the zener is after the batteries and not between the solar
cells and the batteries?

It makes no difference.


Should there also be a resitor after the zener?

For what purpose?


Dec 02, 2012, 08:29 pm Last Edit: Dec 02, 2012, 08:31 pm by Tumbleweed Reason: 1
Not knowing what kind of "stand alone project" you are designing, here are some thoughts off the top of my head. Since Arduinos aren't multitasking, making your charge circuit stop while eveything else runs won't work, so I would add maybe an ATTiny 85 running on the same regulated power supply, a voltage divider circuit on one of it's analog inputs to keep the battery voltage reading inside it's Aref, a transistor or mosfet circuit on a PWM output pin to regulate the amount of current going to the battery from the solar cells. Code very similar to the " vary an leds brightness with a potentiometer" examples everywhere are starting places for code, the higher the voltage gets to your (researched) fully charged voltage the less the mosfet is turned on, until it is finally off altogether when full. Don't forget a diode between the solar cell and the battery to prevent discharging at night.
Google AA Solar chargers for lots of examples.
Someone more experienced with Arduinos will probably know how to use a couple of the Arduino's pins.

Einstein once said you don't really understand anything until you can explain it to your Grandmother


Before you design a charging circuit for your robot, you need to know the robots power consumption.
If its well in excess of what the Solar cells can make , then its questionable whether the whole idea makes any sense.

Go Up