NTP client
By designing an NTP client, signal acquisition and forwarding from different digital clock terminals were realized, solving the synchronization accuracy and compatibility issues of digital clock terminals when accessing a remote metering platform, and improving calibration and synchronization efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- FUJIAN METROLOGY INST
- Filing Date
- 2025-06-05
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies, digital clock terminals are at risk of time discrepancies during long-term operation. Furthermore, when multiple terminals are connected to a remote metering platform simultaneously, the platform's performance degrades, and some terminals cannot be directly connected, resulting in poor synchronization accuracy.
Design an NTP client, including a receiving module, a 1PPS+TOD acquisition module, an MCU chip module, a communication module, and a display and control module. It adapts to various digital clock terminals through different access ports and input/output ports, uses the MCU chip for data difference processing, and connects to a remote metering platform through the NTP input/output module to realize signal acquisition and forwarding.
It improves the calibration and synchronization efficiency of digital clock terminals, reduces the computational burden on the platform, adapts to different digital clock terminals, and enhances the accuracy and compatibility of synchronization.
Smart Images

Figure CN224152912U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of remote calibration technology for digital clocks, and in particular to an NTP client. Background Technology
[0002] A digital clock is a device that displays the current time (year, month, day, hour, minute, second) in digital form. It uses a quartz crystal oscillator or an atomic frequency standard as its internal oscillator and can be synchronized via the internet, Global Navigation Satellite System (GNSS), or external reference clock signals. It is widely used in industries such as healthcare, finance, and high-speed rail, and the demand for verification or calibration in the metrology field is constantly increasing. However, digital clocks have a risk of time discrepancies during long-term operation, posing a significant hazard in locations with high time accuracy requirements. Therefore, it is necessary to use methods such as remote digital clock metrology platforms to verify and calibrate the time of each digital clock terminal to ensure that the time of each digital clock is synchronized with a certain degree of accuracy. However, when many digital clock clients are connected to the platform for calibration at the same time, the platform performance will be reduced. In addition, the configuration of current digital clock terminals varies greatly. Some have built-in NTP transmission function, while others do not, which makes it impossible for some terminals to connect directly to the device. Therefore, it is urgent to study an NTP client that can be used by different digital clock terminals as a relay device between digital clocks and remote metering platforms, to meet the access needs of most digital clock devices on the market, reduce the burden on the platform, and improve the accuracy of digital clock synchronization. Utility Model Content
[0003] The technical problem to be solved by this utility model is to provide an NTP client that can acquire and forward signals from different digital clock terminals.
[0004] This utility model is implemented as follows: an NTP client includes a receiving module, a 1PPS+TOD acquisition module, an MCU chip module, a communication module, and a display and control module;
[0005] The receiving module includes an antenna and a UM220 M0 module, the UM220 M0 module being connected to the antenna and the MCU chip module respectively;
[0006] The 1PPS+TOD acquisition module includes a 1PPS input circuit and a TOD input circuit, which are respectively connected to the MCU chip module. The 1PPS+TOD acquisition module is connected to the digital clock terminal port to acquire the time signal from the digital clock terminal.
[0007] The communication module includes an NTP input / output module and a serial port module, which are respectively connected to the MCU chip module.
[0008] The display and control module includes a display screen, indicator lights, and operation buttons, which are respectively connected to the MCU chip module.
[0009] The MCU chip module performs difference processing on the digital clock terminal time signal obtained by the NTP input / output module or the digital clock terminal time signal obtained by the 1PPS+TOD acquisition module and the accurate time signal obtained by the receiving module to obtain time difference data, and then forwards the time difference data and the digital clock terminal time signal to the remote metering platform.
[0010] Furthermore, the chip model of the MCU chip module is GD32F470VIT6.
[0011] Furthermore, the NTP input / output module includes a YT8512H chip and an RJ45 interface. The YT8512H chip is connected to the RMII interface of the MCU chip. The NTP input / output module connects to a remote metering platform to upload data, and can also connect to a digital clock terminal to obtain terminal time information.
[0012] Furthermore, the 1PPS input circuit includes an RS485 chip and its corresponding relay, an RS232 chip and its corresponding relay, and an analog switch. The relay is used for signal switching and path selection, and the signal enters the MCU chip module through its analog switch.
[0013] Furthermore, the TOD input circuit includes an RS485 chip and its corresponding relay, an RS232 chip and its corresponding relay, and an analog switch. The relay is used for signal switching and path selection, and the signal enters the MCU chip module through its analog switch.
[0014] Furthermore, the serial port module includes a USB-to-serial bridge chip CH340G, used to connect to a host computer and perform verification on the NTP client through the host computer.
[0015] Furthermore, the NTP client uses a 10MHz temperature-compensated crystal oscillator.
[0016] Furthermore, the NTP client also includes a reserved 4G / 5G module.
[0017] This utility model has the following advantages:
[0018] 1. By setting different access ports and input / output terminals, it can be adapted to various digital clock terminals to realize the acquisition of signals from different digital clock terminals;
[0019] 2. The MCU chip performs simple calculations on the differences in the collected data and then uploads it to the remote metering platform, reducing the computational burden on the platform and improving the calibration and synchronization efficiency of digital clock terminals within the region. Attached Figure Description
[0020] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0021] Figure 1 This is a schematic diagram of the structure of an NTP client according to the present invention.
[0022] Figure 2 This is a circuit diagram of an NTP client according to the present invention.
[0023] Figure 3 This is a schematic diagram of the relay circuit structure of the 1PPS+TOD acquisition module of this utility model.
[0024] Figure 4 This is a schematic diagram of the circuit connection structure of the RS485 chip in the 1PPS+TOD acquisition module of this utility model.
[0025] Figure 5 This is a schematic diagram of the circuit connection structure of the RS232 chip in the 1PPS+TOD acquisition module of this utility model.
[0026] Figure 6 This is a schematic diagram of the circuit connection structure of the analog switch in the 1PPS+TOD acquisition module of this utility model. Detailed Implementation
[0027] Please see Figures 1 to 2 As shown, this utility model provides an NTP client, including a receiving module, a 1PPS+TOD acquisition module, an MCU chip module, a communication module, and a display and control module;
[0028] The receiving module includes an antenna and a UM220 M0 module. The UM220 M0 module is connected to the antenna and the MCU chip module, respectively. The antenna input is connected to the UM220 M0 module, which can acquire BeiDou and GPS time signals and output a 1PPS (one pulse per second) signal, which is an important source of accurate time. It is also used for time synchronization by connecting to the PA3 TIMER4_CH1 pin of the MCU chip.
[0029] The 1PPS+TOD acquisition module includes a 1PPS input circuit and a TOD input circuit, which are respectively connected to the MCU chip module; the 1PPS+TOD acquisition module is connected to the digital clock terminal port to acquire the time signal of the digital clock terminal.
[0030] The communication module includes an NTP input / output module and a serial port module, which are respectively connected to the MCU chip module.
[0031] The display and control module includes a display screen, indicator lights, and operation buttons, all of which are connected to an MCU chip module. Specifically, it connects to a 0.96-inch SPI screen and connects to the operation buttons and indicator lights via multiple I / O ports. The MCU controls the screen to display information such as time and device status through corresponding interfaces, and controls the device's operating status by receiving button operation commands.
[0032] The MCU chip module performs difference processing on the digital clock terminal time signal obtained by the NTP input / output module or the digital clock terminal time signal obtained by the 1PPS+TOD acquisition module and the accurate time signal obtained by the receiving module to obtain time difference data, and then forwards the time difference data and the digital clock terminal time signal to the remote metering platform.
[0033] In one specific embodiment, the MCU chip module has a chip model of GD32F470VIT6.
[0034] In one specific embodiment, the NTP input / output module includes a YT8512H chip and an RJ45 interface. The YT8512H chip is connected to the RMII interface of the MCU chip. The NTP input / output module connects to a remote metering platform to upload data, and can also connect to a digital clock terminal to obtain terminal time information.
[0035] In one specific embodiment, such as Figures 3 to 6 As shown, the 1PPS (1 Pulse Per Second) input circuit includes an RS485 chip (see...). Figure 4 U23 in the middle) and its corresponding relay (see Figure 3 U19 in the middle), RS232 chip (see Figure 5 (U24) and its corresponding relay (see U24) Figure 3 U17 in the middle) and analog switches (see Figure 6 The U18 input (in the diagram) switches signals and selects paths via a relay, then connects to the MCU chip module via its analog switch. Upon power-up, the default input is RS232. After the signal is switched via the relay, it can be converted to either an RS485 or RS232 chip, and then connected to the PA0 TIMER4_CH0 pin of the MCU chip via the analog switch for precise time pulse acquisition.
[0036] In one specific embodiment, such as Figures 3 to 6As shown, the TOD input circuit includes an RS485 chip (see...). Figure 4 U25 in the middle) and its corresponding relay (see Figure 3 U21 in the middle), RS232 chip (such as Figure 5 (U24) and its corresponding relay (see U24) Figure 3 U22 in the middle) and analog switches (see Figure 6 The U20 input (in the circuit) uses a relay for signal switching and path selection, and then enters the MCU chip module via its analog switch. The TOD (Time of Day) input also defaults to RS232 input upon power-on. After a similar switching process as the 1PPS input (relay, RS485 / RS232 chip, and analog switch), it enters the MCU via the USART5_RX pin, providing time and date information. The internal structure of the TOD input circuit is basically the same as that of the 1PPS input circuit.
[0037] The aforementioned relays, analog switches, RS485 chips, and RS232 chips are all existing modules.
[0038] The signals to the analog switch are all TTL signals. The relay connected to the RS485 chip is used to extract the RS485 signal, which is then processed by the RS485 chip to obtain the corresponding TTL signal. The relay connected to the RS232 chip is used to distinguish between RS232 signals and TTL signals. If it is a TTL signal, it is sent directly to the analog switch. If it is an RS232 signal, it is processed by the RS232 chip and converted into a TTL signal before being sent to the analog switch.
[0039] Both the 1PPS input circuit and the TOD input circuit of this invention use two relays to correspond to two independent signal paths—one for an RS485 chip and the other for an RS232 chip—while sharing a single RS232 chip. This achieves "dual-path redundancy," improving reliability and adaptability to different communication scenarios, thus enhancing compatibility. The RS485 path (via the RS485 chip) is suitable for long-distance, multi-device parallel networking applications, offering strong anti-interference capabilities (differential signal transmission) and supporting bus-type communication. The RS232 path (via the RS232 chip) is suitable for short-distance, point-to-point debugging scenarios (such as local testing), featuring a simple circuit that can be directly adapted to a computer serial port. The relays, through "engaging / disengaging," flexibly switch communication interfaces, adapting to different application environments without hardware replacement. Furthermore, the combined use of the two relays enables time-division multiplexing and logic control. For example, the system can first complete local debugging via the RS232 path (relay switching to the RS232 chip) and then switch to the RS485 path (relay switching to the RS485 chip) to access the corresponding network. Alternatively, program logic can be used to switch between the two relays according to priority and timing (e.g., prioritizing RS485 and automatically switching to RS232 if RS485 fails) to improve system robustness. Furthermore, a relay itself is an "electrical switch" that can physically cut off signal paths, achieving electrical isolation and protection. When an abnormality such as overvoltage or surge occurs in a certain path (e.g., RS485), the relay disconnects to isolate the fault, preventing abnormal signals from damaging subsequent analog switches, MCUs, and other core components. Compared to directly connecting two paths in parallel, the "controllable on / off" capability of a relay can more precisely manage signal flow and avoid electrical interference between different interfaces.
[0040] The circuit design described above can flexibly switch communication interfaces according to the scenario (long-distance / short-distance, industrial / debugging), and ensures the reliability, compatibility and security of time signal transmission through redundant design and electrical isolation.
[0041] In one specific embodiment, the serial port module includes a USB-to-serial bridge chip CH340G, used to connect to a host computer for calibrating the NTP client. The CH340G chip converts the serial port to a USB interface, enabling communication with external devices via a TYPE-C interface. It can be used for device debugging, data transmission, or parameter configuration, and is connected to the USART0 interface of the MCU chip.
[0042] In one specific embodiment, the NTP client uses a 10MHz temperature-compensated crystal oscillator.
[0043] In one specific embodiment, the NTP client further includes a reserved 4G / 5G module. The reserved 4G / 5G module is used to realize the device's wireless communication function, enabling remote transmission of time data, receiving remote control commands, etc.
[0044] This invention employs two operating modes: First, the 1PPS+TOD acquisition module acquires the clock face time of the digital clock and sends it to the MCU. Simultaneously, the satellite signal received by the receiving module also enters the MCU. The MCU uses the receiver signal time as a reference, calculates the time difference of the digital clock, and achieves real-time time difference measurement. This time difference, along with the clock face time, is then forwarded to a remote platform for further processing. Second, the clock face time of the digital clock is acquired through the NTP input / output module. Simultaneously, the satellite signal received by the receiving module also enters the MCU. The MCU uses the satellite signal time as a reference, calculates the time difference of the digital clock, and achieves real-time time difference measurement. This time difference, along with the clock face time, is then forwarded to a remote platform for further processing.
[0045] This utility model's NTP client achieves digital clock time signal acquisition and forwarding by setting different access terminal circuits and input / output terminal circuits, and can be adapted to various digital clock terminals. This utility model's NTP client synchronizes satellite time through an internal receiving module, and monitors digital clock time information by obtaining time difference information through real-time comparison. At the same time, it forwards the time difference information and the acquired digital clock face time to the remote measurement platform, reducing the computational burden on the platform and improving the calibration and synchronization efficiency of digital clock terminals in the area, which can meet various periodic verification requirements.
[0046] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. An NTP client, characterized by: It includes a receiving module, a 1PPS+TOD acquisition module, an MCU chip module, a communication module, and a display and control module; The receiving module includes an antenna and a UM220 M0 module, the UM220 M0 module being connected to the antenna and the MCU chip module respectively; The 1PPS+TOD acquisition module includes a 1PPS input circuit and a TOD input circuit, which are respectively connected to the MCU chip module. The communication module includes an NTP input / output module and a serial port module, which are respectively connected to the MCU chip module. The display and control module includes a display screen, indicator lights, and operation buttons, which are respectively connected to the MCU chip module. The MCU chip module performs difference processing on the digital clock terminal time signal obtained by the NTP input / output module or the digital clock terminal time signal obtained by the 1PPS+TOD acquisition module and the accurate time signal obtained by the receiving module to obtain time difference data, and then forwards the time difference data and the digital clock terminal time signal to the remote metering platform.
2. The NTP client of claim 1, wherein: The MCU chip module has a chip model of GD32F470VIT6.
3. A NTP client according to claim 2, characterized in that: The NTP input / output module includes a YT8512H chip and an RJ45 interface. The YT8512H chip is connected to the RMII interface of the MCU chip.
4. The NTP client of claim 1, wherein: The 1PPS input circuit includes an RS485 chip and its corresponding relay, an RS232 chip and its corresponding relay, and an analog switch. The relay is used for signal switching and path selection, and the signal enters the MCU chip module through its analog switch.
5. The NTP client of claim 1, wherein: The TOD input circuit includes an RS485 chip and its corresponding relay, an RS232 chip and its corresponding relay, and an analog switch. The relay is used for signal switching and path selection, and the signal enters the MCU chip module through its analog switch.
6. The NTP client of claim 1, wherein: The serial port module includes a USB-to-serial bridge chip CH340G.
7. The NTP client of claim 1, wherein: The NTP client uses a 10MHz temperature-compensated crystal oscillator.
8. The NTP client of claim 1, wherein: The NTP client also includes a reserved 4G / 5G module.