I am looking to use an ATtiny85 to regulate the charge for LiPos for a remote Arduino.
The 85 will control the amount of charge, depending on the amount of sunlight, by adjusting a LiPo charging chip.
I could run the 85 off the LiPo but i don't want to as the LiPo may get so discharged that its internal safety circuit cuts off the power so that the LiPo doesn't discharge to ruination. Therefore I would be in a Catch-22 where the 85 would never power up again as the battery is below cutout threshold and, with the charge controlling 85 unpowered, will never get to recharge.
Therefore I would power the 85 from the 12v solar panel that can put out up to 24 volts. The zenner/resistor network would regulate the voltage to the 85. I was thinking a 4.3v zenner.
However I have a couple of problems related to hysterisis that I need resolved. As the sun comes up there will be weak power from the solar panel. The voltage may be just enough to power the 85 into an unstable state but not enough to fire it up properly. To overcome this I would set the brown-out on the 85 to 4.1 volts. I would use powersaving settings on the 85 and would expect a current draw of, say, < 2ma. But still I am concerned that the solar panel will just get up enough voltage to exceed the 85 brownout; the 85 will power up and exceed the current available from the panel; the voltage will drop; brownout occur; 85 drops out; voltage rises... and so on. How do I get around this?
Also the 85 is measuring the voltage of the solar panel through a resistor divider connected to one of its AI pins.
This voltage will be measured relative to the supply voltage to the 85 (or that applied to AREF but the AREF pin doubles as MOSI which I use to communcate with the charge controller). Therefore, when the solar panel is providing just a few volts at the start and end of the day (and below the zenner voltage), the voltage reading (as seen by the ADC) will be incorrectly overstated and the 85 will tell the charging chip to pump current into the LiPo when it shouldn't be.
Any views on how I can fix this?