Since it doesn't look as though this will make me a million dollars, I'll post my battery charger project here, free.
I constructed a real version of this to charge a 24V battery bank from PV panels. I found that it works.
It makes use of hysteresis using an op amp.
I adjusted this simulation so it will charge a 4-cell battery pack until it reaches 5.6V, then let it drop to 5.2V, then resume charging, etc.
In this way each cell should be maintained between 1.3 and 1.4 V. That's the range I usually find my batteries are at, if they were charged recently.
The batteries will self-discharge a bit over a period of weeks. At some point the charger will come on, and take an hour to bring them back up. This should be appropriate for long-term battery usage.
I can only get this to work under certain conditions. Example, it will not work if the voltage coming from your charger is above a certain level.
It may or may not suit your purpose.