* 1. Project introduction
The desktop electronic clock design based on R7FA2E1A72DFL chip displays time, temperature, etc. through four-digit 0.56-inch common cathode digital tubes, and uses DHT11 temperature and humidity sensor to collect ambient temperature and humidity
*2. Project function
1. Main control chip: R7FA2E1A72DFL;
2. Program download The BOOT port adopts the short-circuit method
3. LED: one power indicator light and one charging status indicator light;
4. Buttons: one reset button and three function buttons;
6. Peripherals: one 0.56-inch common cathode digital tube, one DHT11 temperature and humidity sensor, and one passive buzzer;
*3. Hardware part

4.1 Power supply and serial port download circuit

4.2. Main control circuit The main control
microcontroller uses R7FA2E1A72DFL, the operating voltage is between 1.6V and 5.5V, the maximum clock frequency is 48Mhz, and the maximum support is 128-KB FLASH, 16-KB SRAM, and 12-bit AD conversion controller. The chip has an integrated crystal oscillator, so no external crystal oscillator is needed. At the same time, the chip has an integrated touch function, so the touch function can be realized without a touch chip.
A capacitor is added to the power input part for power filtering. The VCL pin is used to stabilize the smoothing capacitor of the internal power supply.

4.3. Reset circuit and startup selection circuit
Reset is also called restart. Press the RST button, the RST pin of the main control is pulled low, and the system enters the reset state. Release the RST button, and the RST pin of the main control returns to a high level. The system resumes the working state and completes the reset.
When BOOT1 is short-circuited or not, the BOOT pin is high, and the microcontroller enters the Single-chip mode, which is the normal working mode. When the button is pressed, the BOOT pin is low, and the microcontroller enters the SCI-BOOT mode, which is the program download mode. Therefore, we can control the microcontroller to download the program or run normally through this button.

4.4. Touch control circuit
The R7FA2E1A72DFL main control chip has a touch function. Add a 560-ohm damping capacitor and an appropriate capacitor to the touch line to stabilize the touch signal. In fact, it is sensitive and accurate enough.

4.5. The independent button circuit
uses four buttons for clock control or other functions.

4.6. The DHT11 temperature and humidity sensor circuit
uses the DHT11 temperature and humidity sensor to detect the ambient temperature and humidity. DHT11 is a single bus communication method and requires a pull-up resistor to be connected to the bus. When the bus is idle, its state is high.

4.7. The passive buzzer drive circuit
controls the negative pole of the passive buzzer through the NPN transistor. The electromagnetic passive buzzer here is an inductive load. The D3 diode is added as a freewheeling diode to prevent burning.

4.8. The four-digit digital tube drive circuit
uses a 0.56-inch common cathode digital tube to display time, temperature, humidity and other information.

4.9. Lithium battery charging and discharging circuit

4.12. The M3 copper column interface
is used to fix the board through four M3 screw holes.
*6. BOM list

* 8. Demonstration project video
More details: https://diy.szlcsc.com/posts/15a52db9fd7d40c492eb505280278e45