0GhyA

[Training Camp] Internet of Things Clock + Hu Yunfei

 
Overview

demand analysis:

1. Essence ESP-C3-12F is used as the main control core. 2. The 8-digit digital tube displays the time in real time, in the format of hours, minutes, and seconds from left to right. 3. When the motherboard circuit is powered on, first perform network configuration. After completing the network connection, grab the network time and display it in real time. If there is no network, the time can be accurately displayed even when the DS1302 clock circuit is working. With the buttons, you can switch the network configuration and manual adjustment of the time.

circuit design

This circuit schematic design consists of 8 modules: 1. Power circuit module Because the power supply voltage of the main control chip is around 3.3V, the linear power supply chip AMS1117-3.3V is selected. The chip is connected to 0.1 at the input and output ends. The uF capacitor, the package is selected as 0805, is used as a filter capacitor to suppress self-oscillation, and the power supply interface is selected as Miceo-usb. This interface has two functions, one is to provide power, and the other is to provide convenience for serial communication. 2. USB to serial port circuit             Since the PC USB level and ESP-C3-12F level logic are inconsistent, the USB to serial port circuit is designed based on this, and CH340N is selected as the conversion chip. Compared with CH340G, this chip is simpler to connect on the circuit and does not require external connections. The crystal oscillator circuit is internal and integrated. The power supply voltage of the chip is 3.3V, and the capacitors C3 and C4 are used for filtering. The clock chip is DS1302. In the pin arrangement of DS1302, Vcc1 is the backup power supply and VCC2 is the main power supply. The clock can still run continuously even when the main power supply is turned off. The DS1302 is powered by Vcc1 or Vcc2, whichever is greater. When Vcc2 is greater than Vcc1+0.2v, Vcc2 supplies power to DS1302. When Vcc2 is less than Vcc1, the DS1302 is powered by Vcc1. X1 and X2 are oscillation sources, connected to an external 32.768kHz crystal oscillator. RST is the reset/chip select line. All data transfers are started by driving the RST input high. 4. Main control circuit: The main control chip is the Essence network chip ESP-C3-12F. The chip has 22 pins and the chip supply voltage is 3.3V. It is a low-power product. 5. Indication circuit and button circuit The indication circuit is controlled by two MCU pins. One is the IO0 pin of the MCU. By default, this pin is pulled high; the other indicator light is connected to the MCU enable terminal. When no RST button is pressed, The light is always on and goes out when the button is pressed. The button circuit and indicator circuit are shown in Figure 5 below. 6. Display and drive circuit The clock display device selects a common cathode digital tube, a total of two 4-bit digital tubes, and the driver chip selects MAX7219. This chip can drive two 4-bit common cathode digital tubes, and can control the digital tubes to display any digital value through the program set by the MCU.

PCB design

Complete PCB layout, wiring, copper laying and related logo design

Physical demonstration

After the circuit board is welded and the test is normal, a functional program is developed. After the program design is completed, the program is downloaded to ESP-C3-12F. After repeated debugging, the expected function is achieved. After the system is powered on, it first initializes the relevant configuration. The digital tube prints information and shows that the network is being configured. When entering for the first time, you need to perform network settings in the esp_touch app software. After completing the configuration, the digital tube prints a successful message, and then the network time is obtained and displayed on the digital tube. On, if the KEY3 button is pressed without network, the time will be read from the ds1302 chip.

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

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

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号