I started working on the Arduino software that measures the voltages and controls the PWM duty cycle. Two functions have to be implemented: Limiting the charging when the battery is full, and setting the PWM to the maximum power of the solar panel during charging. Protecting the battery is priority, so I started on that first. For a first approach, I set the charging PWM to fixed 210 which means 210/255 = 82% which I found from previous testing to be very close to the actual maximum power point in full sun light.
In a first attempt, I told the software to charge at full 210 PWM when the battery voltage is below 8.4 Volts, and 0 PWM when the battery voltage is above or at 8.4 Volts. Not a good idea-the abrupt switching from 210 to 0 and back destroyed the Arduino Pro Mini.
The marked area got very hot, probably the voltage regulator. Fortunately, I paid only $2.80 per Arduino.
To fix the problem, I introduced a hysteresis function such that the software computes a target PWM value, based on the battery voltage, and changes the current PWM only by one in each pass through the loop (loop delay at about 0.5 seconds).
Software at
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.