aOaVWQ8Q

#The8thLiChuangElectronicContest#ElectronicClock

 
Overview


 
* 1. Project function introduction:
The desktop electronic clock is designed based on the R7FA2E1A72DFL chip. The time and temperature are displayed through a four-digit 0.56-inch common cathode digital tube. The DHT11 temperature and humidity sensor is used to collect the ambient temperature and humidity. The reset button, serial port circuit, and SWD download circuit are all led out for easy download and debugging.
*2. Project attributes
 
 
1. Main control chip: R7FA2E1A72DFL;
2. Power interface: TYPE-C, 2Pin plug-in;
3. LED: one power indicator light, one charging status indicator light;
4. Buttons: one reset button, one BOOT button, four function buttons;
5. Debug interface: SWD download debug interface, serial port download debug interface, both use 2.54 pin header interface for lead-out;
6. Peripherals: one 0.56-inch common cathode digital tube, one DHT11 temperature and humidity sensor, one passive buzzer;
 
 
* 3. Advantages and characteristics
 
1. The onboard appearance is small, with a size of only 3115.0mil*1470.0mil;
2. Complete download and debugging interfaces;
3. Using power switching circuit, it can continue to work through lithium battery power supply even when power is off;
4. Low price and complete functions;
5. Use Jiali Chuang high-quality PCB and genuine components to ensure product quality;
 
*4. Hardware
4.1 Power supply circuit
4.2. Main control circuit The main control
      microcontroller uses R7FA2E1A72DFL, with an operating voltage between 1.6V and 5.5V, a maximum clock frequency of 48Mhz, and supports up to 128-KB FLASH, 16-KB SRAM, and a 12-bit AD conversion controller. The chip has an integrated crystal oscillator, which does not require an external crystal oscillator. It also integrates a touch function, which can achieve touch function without a touch chip.
      A 100nf 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. This pin needs to be connected to a 4.7uf capacitor to the VSS pin.
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, and the system resumes working state and completes the reset.
         When the BOOT1 button is not pressed, 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, so we can use this button to control the microcontroller to download the program or run normally.
4.4. Touch control circuit
    R7FA2E1A72DFL main control chip has a touch function. Adding a 560 ohm damping capacitor and appropriate capacitors to the touch line to stabilize the touch signal is actually sensitive and accurate enough.
4.5. The independent button circuit
 uses four buttons for clock control or other functions.
4.6. DHT11 temperature and humidity sensor circuit
     uses DHT11 temperature and humidity sensor to detect environmental temperature and humidity. DHT11 is a single bus communication method, and a pull-up resistor needs to be connected to the bus. When the bus is idle, its state is high.
4.7. The passive buzzer driving circuit
       controls the negative pole of the passive buzzer through the NPN transistor. R2 is a current limiting resistor. The function of R3 is to provide a reliable potential when the chip is just powered on or off to prevent interference. The electromagnetic passive buzzer here is an inductive load. The D1 diode is added as a freewheeling diode to prevent burning.
4.8. The four-digit digital tube driving circuit
      uses a 0.56-inch common cathode digital tube to display time, temperature and humidity and other information.
4.9. The lithium battery charging and discharging circuit
          is first a power switching circuit. The power switching circuit is composed of a P-channel MOS, a pull-down resistor and a diode. When the TYPE-C interface is connected, 5V comes over, and the G pole voltage of the MOS tube is 5V. After a 1N5819 Schottky diode, the VCC voltage is 4.4V, that is, the S pole is 4.4V, which does not meet the conduction conditions, and the battery power cannot come. When the TYPE-C interface is disconnected, the G pole is pulled down to a low level. Due to the presence of the body diode, the S pole will have a voltage of about 3.5V. When the conditions are met, the MOS tube is turned on, and the battery will power the subsequent circuit. Due to the presence of the 1N5819 Schottky diode, the current will not flow back in reverse.
The battery is charged through a TP5056 lithium battery charging chip. When the TYPE-C interface is connected, the lithium battery will be charged at the same time to ensure sufficient power. LED5 is used as a charging status indicator, and R11 is a charging current feedback resistor. By changing the resistance value of R11, the overall charging current can be changed.
4.10. The serial port debugging interface leads out the serial port pins through the 2.54*4P interface
         for serial port downloading and debugging.
4.11. The SWD debugging interface
  leads out the SWD pins through the 2.54*4P interface for SWD mode downloading and debugging.
4.12. The M3 copper column interface
      is used to fix the board through four M3 screw holes.
 
*5. Notes
5.1. When drawing the schematic diagram, pay attention to the following:
1. Draw according to the module circuit division and indicate the circuit function;
2. Fill in the name and other information on the drawing attributes;
5.2. When purchasing materials, pay attention to the following:
1. First filter the materials in stock, then filter the price sorting for purchase;
2. Try to purchase materials from the same warehouse and choose a warehouse close to each other to shorten the delivery time;
3. When purchasing multiple orders, you can save shipping costs by binding orders;
5.3. When drawing the schematic diagram, pay attention to the following:
1. Routing should be done at right angles first, and obtuse angles or arcs are mainly used where turns are required;
2. Add silk screen logos and annotate the interface functions;
3. The JLCJLCJLCJLC designated custom silk screen can be hidden under the device, and the finished board is beautiful; 5.4 . When welding, you can click the welding auxiliary tool in the toolbar of Jiali Chuang EDA to facilitate welding in real time interaction; 2. When welding the top layer, it is recommended to weld the main control chip first to avoid other devices affecting welding; 3. When welding the pin header, you can use an empty board or a perforated board to prevent slanted welding and affect the use; 4. The welding sequence should follow the principle of from low to high to avoid affecting the welding of small components; 5.5. Attention should be paid during debugging: 1. Before power-on debugging, check whether there are problems such as cold soldering and short circuit in the welding. Only after checking that there are no problems can the power be turned on for testing;







2. Use the USB to TTL serial port burning tool to download the program to the microcontroller. Connect the RXD end of the USB to TTL line to the TXD end of the microcontroller, and the TXD end to the RXD end of the microcontroller.
 

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-23 08:05:09

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号