Why did the solar light stop charging?

After a winter outside, the solar light wouldn't light at night.  I replaced the rechargeable batteries and it worked for one night.  This is a tiki torch style with a flickering yellow light and I like the effect.  Time to take it apart and figure out what was going on.

Solar Tiki Light

Solar Tiki Light

So I popped it open and was surprised to see discrete components instead of a single chip covered with a black blob.

Top side of PCB

Bottom side of PCB

Time to do a little reverse engineering.  The transistors were all marked with "J6". A quick search found that they were NPN S9014 transistors.  I traced out the rest of the circuit and grouped it into solar charger, day/night detector, flasher enable and flasher circuits.  

Solar light schematic (note that C3 should be 10UF.  The polarities of C3, C1 and C2 look reversed, but reflect how the caps are installed in the PCB)

The solar charger circuit passes current through the diode an into the battery when the sun is up.  Once the sun goes down and the solar cell voltage drops below the battery voltage, the diode prevents current from flowing back into the solar cell,  No current regulation is required because the solar cell can only produce a few tens of mill-amps which is well within the trickle charge limits for the battery.

Day/Night detection is based on the output of the solar cell.  When the sun is up the solar cell  voltage pulls up the base to Q5 turning it on and grounding the input to the enable circuit disabling the flasher. Once the solar cell voltage drops due to darkness, Q5 turns off which lets R1 pull up the input to the enable circuit.

The flasher is enabled when Q1 turns on providing a "ground" path for the flasher circuit.  When the power switch is closed, positive voltage is applied to the flasher circuit (and also the pull up resistor for Q1).  When Q1 conducts, it provides the return path from the flasher circuit to the negative battery terminal.  Interestingly, the switch does not affect the charger, only the flasher.

The flasher circuit is is set up in three stages with each stage feeding the next stage causing the LED's to turn on and off in sequence.

Poorly animated GIF showing how the LEDs flicker,

(The following refers to the schematic above) When Q5 conducts it pulls down the base of Q1 keeping it turned off.  Since C1, C2 and C3 are all discharged to start, I'm not sure which LEDs will light 1st.  After start up the circuits act as a 3 stage delay line with an LED for each stage.  Initial conditions when Q1 turns on are a little tricky since all eth caps should be discharged.  After a couple of cycles though, it's straight forward to see what is going on.  I'll start with Q4 turning on and and lighting D4.  This pulls C3 down and disables Q2 while C3 is charging up. When C3 voltage rises high enough, Q2 will turn on and light D2. While C2 charges up Q3 is disabled.  Once the voltage on C2 rises enough, Q3 will conduct turning off Q4/D4 and turning on D3.  Then the cycle repeats with one LED turning on as another turns off.

Current flickering through the three LEDs

To test my theory I simulated the circuit with LTSpice (a free circuit simulator available from Linear technologies).  The green trace is current through D1, Blue D2 and Red D3.  While D1 is lit, D3 turns off and D2 turns on.  The 10UF caps act as delays between the stages (Note that the reference designations in the LTSpice schematic don't match the schematic above).

To test the accuracy of the model (I did very little to make the model reflect reality) I compared the simulator to some actual scope traces. I hooked the scope to the cathode of D2 (LTSpice schematic) and wound up with something very similar to  the simulation.  The peak voltages were close.  The low voltage on the scope was 0.47 volts while the sim predicted about a volt.  The scope showed a period of 113 ms while the sim predicted 212 ms.  All in all the sim shows pretty well how the circuit works considering I used the standard NPN ideal model.  I did add significant series resistance to the battery (10 Ohms) in the sim.

Scope shot of LED Cathode Voltage

Simulation of LED Cathode Voltage

Of course, none of this led me to the root cause of why the light was not charging.  I checked the solar cell open circuit voltage under a light and I got  about 3.3 Volts. When I put the batteries in adding load to the solar cell it read 0 Volts at 0 ma.  I've ordered a couple of solar cells guessing at the open circuit voltage and short circuit current.  Hopefully, I guessed right.