This is a lighting project, and of course it is also to verify the 4056 charging circuit (rechargeable protection). However, after the design was completed, it was found that the lithium battery can not be directly reduced to 3.3V by 1117. When the battery voltage difference is insufficient, it may not be able to supply power...
I have made a mistake. At present, the lithium battery is fully charged at 4.21V, which can power the system. If friends do not want to directly reduce the voltage by 1117, you can use a DC direct reduction circuit drawn outside the schematic diagram. I have verified this circuit, and it can input 6-3V voltage. The current of 800ms is enough to light up.
The lighting here is driven by 3 HC595 serial-to-parallel conversions. I originally wanted to draw 5, but the free board cannot hold so many. Currently, three is the limit of my placement. If there are local tyrants who need more research, they can lengthen it by themselves. Hahahaha, I am lazy. PCtoLCD2002 is used for modeling, and the configuration format is as shown below:

The original intention of the design is mainly to verify the lithium battery circuit and use up the extra STM8S9 chips on hand. It is an entertainment project. Please watch and play. The code will be open source and can be burned directly.
GitHub open source address: https://github.com/Listenerto/STM8S9K3
Oh, by the way, the USB power supply of the circuit board is designed wrong, using USB power supply to block the hand... I also found it after using it. If you are interested, you can change it yourself, or re-draw it yourself. I am not very good at it. Of course, you can also look at the code to understand the general logic without making a physical object. The code written by me is not difficult to understand, as long as you have a basic understanding. Comments are welcome.