This is a mini UPS battery backup based on Linear Technology’s LT3652HV. The HV is a high voltage version that can charge upto 4 cell Li-Ion batteries. Other chemistries are also supported. This one supports charging using a solar panel but this is not implemented here. To charge using a solar panel see this post. This particular project is configured to charge 18650 Li-Ion batteries.
A regular version (LT3652) is also available that can charge single cell Li-Ion batteries. The schematic is based on the reference design provided by Linear. I needed an always-ON system and hence the load switch LTC4353. This is essentially an ideal diode OR. It switches between the battery and a mains power source giving it a UPS functionality. If you just need the charger, you can omit the load section all together. Separate outputs are provided for both sections.
The LT3652HV also supports the maximum power point tracking (MPPT) when used in conjunction with a solar panel. You can read more about MPPT here. The LT3652HV employs an input voltage regulation loop, which reduces charge current if the input voltage falls below a programmed level, set with a resistor divider. When the LT3652HV is powered by a solar panel, the input regulation loop is used to maintain the panel at peak output power.
Note: This design is untested.