# Solar Panel Charging with Arduino

I built a solar panel charge controller from instructables with an easy to read schematic and for some reason my battery charges up to a certain point and then loses charge again. That leads me to ask a couple of questions given that i am very new to this.

My Setup: 10W solar panel, 12v7A Lead Acid Battery, Arduino Nano and all components from above schematic except for the load at this point.

More details on solar panel specs: Solar Panel 10W • Vmax P = 17.2V • Imax P = 0.57A • Voc = 21.6V • Isc = 0.83A • 396x348x25mm

1. Before I connect my solar panel my panel's voltage sits around 20volts (with volt meter) but straight after I connect it to the circuit, the voltage drops. Is this because there is now current and that reduces the voltage?
2. At a certain point (around 12.4 volts) my battery stops charging and actually starts losing voltage. Could this be because the current supplied from the solar panel is not enough to charge the battery? If not, any other ideas?
3. Does it make sense that the Arduino, solar panel, batteries and output voltage ground are all connected together?
4. At what voltage would I actually charge my batteries when in bulk charging mode (99% pwm)? Does it have to be more than the current voltage of the battery and by what margin?

Thank you very much for the assistance and please bear with me, I am new to this.

## 2 Answers

1. It's common for a voltage source to drop in voltage when current is drawn. This is down to the source resistance inside the voltage source. When you measure the output voltage of the panel without it connected, then you a measuring the voltage of the panel without any current passing through its internal source resistance. When current flows, it passes through that source resitance and there is a voltage drop across it, so the output voltage now drops.

How much the voltage drops when under load depends on how much current you are trying to draw and the internal source resistance of the panel.

a) It could be natural and a function of the solar panel itself. b) You could be drawing too much current from the panel and the voltage drops greatly.

1. Battery discharging: it could be that the battery is pushing power back into the panel. You can stop this by putting in series a suitable diode. You'd have to measure voltages and currents to work out what it is going on, measure the battery voltage with the panel disconnected at this point. An ammeter in series will tell you which way the current is flowing and hence which voltage is greater than the other and this will help you work out what is going on.

2. Answer: Yes.

3. I can't answer, I don't actually know what's defined by 'bulk charging'.

• Thanks, I will wait a while and if no one else answer's I will mark you answer as accepted. Question 4 could be simplified by asking what voltage should I charge a 12v battery at? Commented May 16, 2015 at 12:30

I actually believe that your panel is too small. It only gives under 1 Ampere at best. In sunshine. What about cloudy winter? Or rainy summer? Your battery may have such low resistance that this will be insufficient. Double it!

1 Yes, "12V" panels have a triangular "specific power curve" where they have the best output when loaded to 16V. (You can compare this to a torque curve on a car motor) This means that your panel will give more power the nearer you get your battery's charge limit, when charging actually should ease down. A dilemma. Hopefully your PWM pulsing will cope for this.

2 Are you sure your PWM setting is sufficient? Maybe your Arduino eases down too much at 12.4V and the result is back current. And another thing: I have read that "PWM chargers never make full charge". Since you have the software, you can cut down on the pulsing, especially as your panel is likely too small, as I boldly stated above.

3 Common ground is OK. It's even necessary when you want to read a voltage.

You must have a larger charging voltage than the current battery voltage. This is not a capacitor you can slowly fill up with a trickle current, this is a chemistry that must be forced to change. If you use too low a voltage difference (e.g. weak charger/panel) you will achieve "undercharging" that will ruin the battery by sulphatizing etc. I know, I have done it. A 12V AGM with a "1,2W" shoe size panel. Voltage reading went up and down with the weather, never above 13.4V, but the voltage trend went slowly and straight down from April to October. You can look up the word "undercharging AGM".

Read what's printed on the side of the battery Is it a gel battery or AGM or sloshy acid battery? An AGM is often supposed to be charged up to 14.8V ("max 15V") and when released, at rest with no load it will stabilize at 13.2V. And sloshy acid should be charged to maybe 14.4V.

Instead of "blindly" measuring the voltage and hope for the best you should measure the current. How? In chinese devices there is often a steel wire as a low-ohm resistor to measure across. Take for example a 2m thin steel wire, measure its resistance end-to-end and cut a suitable length that corresponds to, say, 0.1 ohm. Curl it up, put it in series between panel and battery and measure the voltage drop first with a multimeter, then with your Arduino. (And don't use flimsy little test cables like mine. Every milliohm counts.) This will give you maximum control, and you will even be able to detect overcurrent / boiling battery. And you will be able to better match the charge current curve to your battery specs. And match charge current with volt as you asked for.

4 As to your "bulk charge" I think 2A up to 12.5V, then less. (We use 12V 9Ah AGM.) And I don't know what charge voltage that exactly corresponds to - it depends on internal resistance and how willing your battery is to take charging. But maybe 1V diff? And remember that this charging voltage will increase as the battery is filled. So you cannot set just a specific voltage, except the start and end voltages.

So i.m.o. your charge cycle should go between 11.5 and 14.8V. "Bulk" first, more relaxed above say 12.5V. Your manufacturer may have more exact numbers. And read the "Max initial current" on your battery label!

And watch the temperature, the negative charge/temp coefficient! Allegedly car batteries should be charged to only 12.0V in Dubai (+50C) but to 15V in -30C (Arvidsjaur Testcenter).