I'm working on my graduation project recently and haven't done any new projects, but I can't waste the two free coupons every month! It just so happens that I have some components left from making snowflake lamps before, so I thought of using them to make a simple TNT lamp~ (it can even be used as a storage box)
1. Effect display


2. Hardware
components can be purchased according to the BOM table or schematic diagram. Silicone rubber, double-sided tape, EVA sponge tape, etc. are also required. If you need the wire head to be able to emit light, you can buy a small LED lamp bead. The automatically generated ones that do not need to be purchased, such as wires, short contacts, and 5V input and output modules and LED lamps that usually need to be purchased separately, have been specially marked.

2.1 The touch chip circuit

uses the SGL8022w touch chip. According to the instructions in the data sheet in the figure below, in this project, OTP1=1, OPT2=0 is set to the brightness memory stepless dimming mode. Pay special attention to the positive and negative directions when soldering tantalum capacitors.
2.2 Charge and discharge module

Because the overall effect will not be ideal if the USB cable is used for power supply, it is still used to charge and discharge 18650 lithium batteries for power supply. The lithium battery charge and discharge module is used directly. The module picture and link are shown below. The advantage is that it is relatively small and has the same port 5V input and output. The disadvantage is that it is a bit expensive.

Type-c5V charge and discharge integrated module 3.7V 4.2V18650 lithium battery charging boost power board protection
is the PDD connection above, which needs to be turned on by the mobile phone. If you search the name below directly, you should be able to search it out. The same model is fine, but not necessarily from the same store.
In order to avoid opening holes on the board, the 18650 battery holder of the patch is used. There is a small protrusion on the battery holder for positioning. It is not used here and needs to be polished off. Because it is a patch, the battery box is not installed very firmly. You still need to pay attention when removing the battery. Considering the weight balance during design, two battery holders are designed. The two battery holders are connected in parallel. In fact, you only need to use one, or you can use other shapes of 3.7V lithium batteries instead of 18650 batteries. Just connect the positive and negative poles.
2.3LED lamp beads and touch wiresThe




light strip needs to be powered by a 5V USB or battery through the pad, and the corresponding current limiting resistor needs to be matched. The schematic diagram uses 5V, corresponding to a 20R resistor. The light strip can be selected in length of 26mm or 38mm. The positive pads of the two lamp beads are the same. The middle pad is required for 26mm. As shown in the figure above. If the lead head does not need to light up, you only need to solder the touch wire. The above figure adds a piece of tin-absorbing tape to the end of the touch wire to increase the contact area. If the lead head needs to light up, you can add the LED to the wire, and then use a heat shrink tube to wrap the touch wire and the LED wire together (note to leave the touch part of the touch wire), and finally beautify and fix it. For example, double-sided tape and straw rope are used here to create a lead effect, and the gap is filled with silicone rubber and fixed.
3. Assembly
3.1 The bottom and side
need to be proofed with the following two PCB boards. There are two pads for connection on each of the four sides of the side panel and the top/bottom panel. The size of the side panel is 10*10cm and the thickness is 0.6mm. For ease of installation, the top/bottom panels are slightly smaller than the side panels.


Considering the thickness of the side panels, it is recommended that the side panels be connected as shown in the figure below.

After the side panels are welded, weld the bottom panel. After welding, you will get a small TNT box without a top cover. In order to avoid light leakage, the edges of the seams can be filled with silicone rubber or pasted with opaque tape.


Paste EVA sponge tape about 1mm away from the edge of the box to support the top panel and avoid light leakage, as shown below:
3.2 Top surface
After the top surface components are welded, it is shown as follows:

3.3 Assembly and effect display