Finished product:

Onboard resources:
1 MAX7219 8-bit digital tube (0.56-inch common cathode * 1, 0.4-inch common cathode * 1)
DIN GPIO13
CLK GPIO14
CS GPIO15
1 WS2812 5050 colored lights
DAT GPIO5
1 TMB12A05 buzzer
TRIG GPIO4
1 photoresistor with built-in voltage divider (A0 can be read directly)
OUT A0
1 AMS1117 3.3V voltage regulator
1 18650 lithium battery holder
1 ETA9740 charging and discharging chip (in parallel with MicroUSB, no need to solder)
Design analysis:
1. Adopts ETA9740 charging and discharging chip, which has high power (switch charging instead of linear charging) and has the same input and output port, supporting charging and discharging at the same time.
2. There are 8 M2 copper pillars around (can be unwelded) to support the entire PCB to prevent the bottom circuit from touching the metal surface and short-circuiting (all copper pillars are grounded).
3. Two SS12D10G5 high-current switches are used as power switches, and all power lines are thickened to reduce line resistance.
4. The data pins use jumpers for easy use (jumper caps or DuPont wires can be used for short-circuiting).
5. MAX7219 is used to drive 8-bit digital tubes, and the program is simple (a lot of libraries in Arduino IDE).
6. Compatible with wide version NodeMCU with CH340 serial port chip and narrow version NodeMCU with CH9102X or CP2102 serial port chip.
Notes: 1.
The filter capacitor C13 of MAX7219 must be welded.
2. The two 15-pin female headers at the bottom of NodeMCU can be welded in one of two ways, depending on the width of NodeMCU.
3. Jumper description:
Area A:

See the table below for the definition of
jumper name and corresponding ESP8266 pins
Jumper cap connects to the left 2 pin function
Jumper cap connects to the right 2 pin function
DATA (GPIO13)
Enable pin output, disable MAX7219
(GPIO13 of ESP8266 is connected to pin 13 of the upper right 10-pin pin header)
Enable DIN pin of MAX7219, disable pin header
(GPIO13 of ESP8266 is connected to DIN pin of MAX7219 chip)
SCLK (GPIO14)
Enable pin output, disable MAX7219
(GPIO14 of ESP8266 is connected to pin 14 of the upper right 10-pin pin header)
Enable CLK pin of MAX7219, disable pin header
(GPIO14 of ESP8266 is connected to CLK pin of MAX7219 chip)
CS (GPIO15)
Enable pin output, disable MAX7219
(GPIO15 of ESP8266 is connected to pin 15 of the 10-pin header on the upper right)
Enable the CS pin of MAX7219 and disable the header
(GPIO15 of ESP8266 is connected to the CS pin of the MAX7219 chip)
BUZZER (GPIO4)
Enable the header output and disable the buzzer
(GPIO4 of ESP8266 is connected to pin 4 of the 10-pin header on the upper right)
Enable the buzzer and disable the header
(GPIO4 of ESP8266 is connected to the positive pole of the buzzer)
EN (EN)
Disable NodeMCU startup
(EN of ESP8266 is connected to ground)
Allow NodeMCU to start
(EN of ESP8266 is connected to 3V3, and this pin is left floating by default to allow startup)
WAKE (GPIO16)
enables pin header output
(GPIO16 of ESP8266 is connected to pin 16 of the upper right 10-pin pin header)
enables pin header output and system wake-up
(GPIO16 of ESP8266 is connected to pin 16 of the upper right 10-pin pin header and RST pin, do not use GPIO16 as output at this time)
Note: Only when DATA, SCLK, and CS are connected to the 2 pins on the right can MAX7219 control the normal display of the digital tube (three signal lines are indispensable).
Area B:

WS2812 1*3pin jumper: connect the left 2 pin to enable the pin header output (GPIO5),
connect the right 2 pin to enable WS2812 (the pin header has no output at this time).
3V3 1*3pin jumper: connect the left 2 pin to disable the AMS1117 3.3V output, and
connect the right 2 pin to enable the AMS1117 3.3V output.
VU 1*3pin jumper: See the following instructions:
(1) If you use this NodeMCU (with G and VU pins), please connect the VU jumper to the 2pin on the right. At this time, if you connect the USB cable to the NodeMCU, the NodeMCU can power the entire expansion board from the VU pin. (Note: The total current cannot exceed 1A when powered by the NodeMCU. If high-power power is required, please use the USB port on the expansion board or use a 18650 battery.)

(This is a NodeMCU with a serial port chip of CH340)
(2) If you use this NodeMCU (only two RSV pins), please connect the VU jumper to the 2nd pin on the left (or leave it unconnected). At this time, if you connect the USB cable to the NodeMCU, only the NodeMCU will have power, and the other devices on the expansion board will lose power and will not run. If you need the onboard modules to run at the same time, you need to turn on the main power switch and the power switch of the onboard module, and use the USB interface, POWER pin header or 18650 battery on the expansion board for power.

(This is a NodeMCU with a serial port chip of CH9102X)
Instructions for use:
1. Solder components. R1 is the brightness setting resistor of the digital tube, which needs to be selected according to the actual situation. The recommended value for red digital tube is 10K, and the recommended value for white light is 220K (220K is more comfortable to look at and not too dazzling). For other colors, please refer to the two sections on pages 10-11 of the datasheet:
Ⅰ.
Ⅱ.
Please solder the remaining components according to the component names in the silkscreen and PCB (four 0805 for 25%, 50%, 75%, and 100%). LED and the corresponding current limiting resistors R6 and R7 can be replaced according to actual needs. I use four yellow LEDs with two 10K resistors, and the brightness is slightly dim (pay attention to the direction of the LED).

Battery level indication, four 0805 yellow LEDs (R6 and R7 are LED current limiting resistors)

If the lithium battery charging and discharging function is not required, the 18650 battery box and the components in the blue box here (below the 18650 battery box, bottom of the PCB) can be left unsoldered.
Please solder the PWR and UNIT indicator lights according to the colors marked on the silk screen (red: "···_R" & green: "···_G"); the 9 ceramic chip capacitors (100nf) at the bottom edge of the bottom of the digital tube are spare for the WS2812 lamp beads and can be left unsoldered (see the Datasheet below).
2. Make sure all switches are disconnected (the side of the switch handle close to the MicroUSB port is off, and the side close to the digital tube is on), connect the Micro Use a USB charging cable or install an 18650 battery (be sure to check for short circuit before installing the battery). At this time, the PWR indicator light is red, the UNIT indicator light is off, and all onboard devices have no power.
3. Insert the NodeMCU into the slot (pay attention to the direction and align the pins before inserting. If it is inserted in reverse or not connected correctly, the NodeMCU may be damaged). After confirming that the NodeMCU is connected correctly, turn on the switch printed with PWR. At this time, only the NodeMCU and the 5V output pin header (the 3*10pin pin header in the upper right corner) are powered on, the PWR indicator light turns green, and the UNIT indicator light turns red. If you need to use the onboard digital tube or colored lights, you need to disconnect the main power supply first (turn off the switch printed with PWR) and remove the NodeMCU. Refer to the previous instructions to connect the jumper cap and then install the NodeMCU back. Finally, turn on the UNIT switch printed with UNIT. switch. At this time, all modules on the board are powered on, and the PWR and UNIT indicators are both green. If 3.3V output is enabled, an LED next to the 5V output pin will light up, otherwise it will be off.

Power indicator light description

"LED3V3" next to the capacitor on the left is the 3.3v output indicator
4. At this time, you can connect peripherals or use onboard modules.
5. If there are modules that require 3.3V power supply, please connect them to the 3.3V pins in the figure below. Connecting 5V may cause the risk of burning.

3.3v output pin
------------------------------Updated on 2022/12/22------------------------------
1.The PCB has been soldered and verified and works properly. Use a SamSung 3400mah 18650 battery (actual capacity 3296mah, the test equipment is XTAR's VC4 Plus), after the battery is fully charged, all onboard devices are enabled (NodeMCU firmware is MAX7219_PCB_Clock_Inverted, which can be obtained in the attachment) After 27 hours and 18 minutes, ETA9740 enters low battery protection, cuts off 5v output, and stops supplying power.

Photos taken during the test
2. The actual maximum discharge power of ETA9740 is about 2.52A, slightly exceeding the 2.4A on the Datasheet, and the actual power reaches 12.6W, which can easily drive 4 TT motors.

After discharging at about 2A for 30 minutes, the chip surface temperature is 33.3℃, and the ambient temperature is about 15℃
3. ETA9740 charges the battery (Riset=82kΩ, the inductance between BAT and SW is 2.2uH), and it takes 3 hours and 22 minutes from discharge protection to full charge, and there is basically no temperature rise on the chip surface (the first version uses TP4333 with linear charging, and it takes 5 hours and 27 minutes to fully charge, and the chip surface temperature reaches 56.5℃ at the highest).

ETA9740 peripheral circuit
------------------------------------------------------------------------------------------------------------------------------------------------

Description of charging current in the ETA9740 datasheet
------------------------------------------------------------------------------------------------------------------------------------------------------

TP4333 peripheral circuit
-------------------------------------------------------------------------------------------------------------------------------------------------

Description of charging current in the TP4333 datasheet