Sort of quick explanation on what I’m trying to accomplish.
I made a solar panel and solar tracking stand. I have the sun tracking portion working fine in Arduino and working on the charging portion of the program.
“Deba168” created a nice instructable on building a charging system controlled by Arduino and I followed his schematic and program “attached” then modified his program to work for my setup.
There is one problem I’m trying to solve i’m not sure Deba168 accounted for.
If you look in the schematic you will notice voltage check is done through resistor net work for battery and solar voltage with a circuit disconnect between the two via mosfet to start/stop charge.
As long as the mosfet is not turned on “set HIGH” the battery and solar voltage readings are correct. Once the battery goes below full charge set point and solar panel output is above battery voltage, the mosfet turns on and charging begins.
The program constantly samples battery charge and solar voltages for charge status or if solar is no longer charging. “sun down”
The problem is… the reading for battery and solar are the same as the highest voltage in the circuit as long as the mosfet is turned on.
So… monitoring the “actual” battery voltage in the current program is useless while charging.
My thought was to suspend the battery check for a few minutes at a time, then turn the mosfet off for half a sec to check the battery then return to charge mode if needed.
Can anyone think of a programmable way to turn the mosfet off every few minutes to check the battery with out interrupting the main program?
I’m not advanced enough in programing to come up with it, if you could point me to example I could read, I would be happy to work this out by learning.
Thank you in advance.
F2SBFVUI8SLPCIY.pdf (18.6 KB)
Solar_charge_controller-v2.ino (16 KB)