Intelligent terminal module docking station and control method thereof
By designing the intelligent terminal module dock, including control unit, module management unit, Ethernet unit, voltage sampling unit and power unit, the problems of single function of the intelligent terminal module and complex iteration are solved, multi-module expansion and iterative update of intelligent terminals are realized, and multiple branches and multi-functional needs are met in the low-voltage distribution station area.
Patent Information
- Application Number
- CN202411946048.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-25
AI Technical Summary
The existing smart terminal module has a single function, which cannot meet the multi-branch and multi-functional needs of the low-voltage distribution station area, and the update and iteration methods are complex.
Design an intelligent terminal module dock, including a control unit, a module management unit, an Ethernet unit, a voltage sampling unit and a power supply unit. Through the electrical connection and communication interface of these units, module management, Ethernet functions, voltage sampling and power management are realized, and multi-module expansion and iterative update of smart terminals are supported.
It realizes the modularization of smart terminals, supports multi-module expansion, simplifies the update and iteration process of smart terminals, meets the multi-branch and multi-functional needs of low-voltage distribution station areas, and improves the functions and flexibility of smart terminals.
Smart Images

Figure CN119891536A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent terminals, and in particular to an expansion dock for an intelligent terminal module and a control method thereof. Background Art
[0002] The actual number of branches in the low-voltage distribution area branch topology identification scenario has reached 8-12. At present, the existing low-voltage distribution area intelligent terminal body supports up to 5 branches, which cannot meet the actual needs; and the existing intelligent terminal module has a single function and high cost. It can only be connected to the intelligent terminal through a USB interface or a serial port. It does not have multiple interfaces, data acquisition, clock positioning and 10 / 100M Ethernet functions at the same time, does not support module expansion, and its communication protocol has problems such as no verification and poor security; although intelligent terminal equipment is widely used in low-voltage distribution areas, the intelligent function iteration and update can only be completed by replacing new terminals and their corresponding components. The patent document with application number CN201220136373.8 discloses an intelligent terminal with a user-replaceable wireless communication device, including an intelligent terminal body and a wireless communication device with a SIM card installed. A slot for inserting the wireless communication device is provided on one side of the intelligent terminal body. The wireless communication device is detachably installed in the slot and connected to the intelligent terminal body through an interface, and the outer surface of the wireless communication device is adapted to the outer surface of the intelligent terminal body. Therefore, it is urgent to propose an expansion dock for a smart terminal module and a control method thereof to solve the technical problems that the existing smart terminal update and iteration methods are complicated and the smart terminal module has a single function and cannot meet the multi-branch and multi-function requirements of the low-voltage distribution station area. Summary of the invention
[0003] The main purpose of the present invention is to propose an expansion dock for a smart terminal module and a control method thereof, aiming to solve the technical problems that the existing smart terminal update iteration method is complicated, and the smart terminal module has a single function and cannot meet the multi-branch and multi-function requirements of the low-voltage distribution station area.
[0004] To achieve the above-mentioned purpose, the present invention provides a module expansion dock for a smart terminal, wherein the module expansion dock for a smart terminal includes: a control unit, a module management unit, an Ethernet unit, a voltage sampling unit and a power supply unit; the module management unit is electrically connected to the control unit via a USB interface, the Ethernet unit is electrically connected to the control unit via an Ethernet interface, and the voltage sampling unit is electrically connected to the control unit via a UART interface; the power supply unit is electrically connected to the control unit via a GPIO interface, and the output end of the power supply unit is electrically connected to the input end of the module management unit, the control unit and the Ethernet unit, respectively.
[0005] In one of the preferred solutions, the voltage sampling unit includes a sampling chip D2 and a voltage divider and sampling circuit;
[0006] The sampling chip D2 is connected to the voltage dividing and sampling circuit and the control unit respectively, and the voltage dividing and sampling circuit is connected to the strong power interface; the voltage dividing and sampling circuit includes the A-phase voltage dividing and sampling circuit, the B-phase voltage dividing and sampling circuit and the C-phase voltage dividing and sampling circuit.
[0007] In one of the preferred solutions, the A-phase voltage division and sampling circuit includes a voltage division resistor R56, a magnetic bead L4, a sampling resistor R62, a capacitor C29, a sampling resistor R78 and a capacitor C30; one end of the voltage division resistor R56 is connected to the strong power interface, the other end of the voltage division resistor R56 is connected to the magnetic bead L4, and the other end of the magnetic bead L4 is respectively connected to the sampling resistor R62, the capacitor C29 and the V1P positive analog input pin of the sampling chip D2; one end of the sampling resistor R78 and the capacitor C30 is connected to the V1N negative analog input pin of the sampling chip D2, and the other ends of the sampling resistor R62, the capacitor C29, the sampling resistor R78 and the capacitor C30 are grounded.
[0008] In one of the preferred schemes, the B-phase voltage dividing and sampling circuit includes a voltage dividing resistor R63, a magnetic bead L34, a sampling resistor R69, a capacitor C31, a sampling resistor R79 and a capacitor C32; one end of the voltage dividing resistor R63 is connected to the strong power interface, the other end of the voltage dividing resistor R63 is connected to the magnetic bead L34, and the other end of the magnetic bead L34 is respectively connected to the sampling resistor R69, the capacitor C31 and the V2P positive analog input pin of the sampling chip D2; one end of the sampling resistor R79 and the capacitor C32 is connected to the V2N negative analog input pin of the sampling chip D2, and the other ends of the sampling resistor R69, the capacitor C31, the sampling resistor R79 and the capacitor C32 are grounded.
[0009] In one of the preferred schemes, the C-phase voltage dividing and sampling circuit includes a voltage dividing resistor R70, a magnetic bead L35, a sampling resistor R76, a capacitor C36, a sampling resistor R82 and a capacitor C41; one end of the voltage dividing resistor R70 is connected to the strong power interface, the other end of the voltage dividing resistor R70 is connected to the magnetic bead L35, and the other end of the magnetic bead L35 is respectively connected to the sampling resistor R76, the capacitor C36 and the V3P positive analog input pin of the sampling chip D2; one end of the sampling resistor R82 and the capacitor C41 is connected to the V3N negative analog input pin of the sampling chip D2, and the other ends of the sampling resistor R76, the capacitor C36, the sampling resistor R82 and the capacitor C41 are grounded.
[0010] One of the preferred schemes, the Ethernet unit includes an Ethernet transceiver circuit and an Ethernet protection circuit; the Ethernet transceiver circuit is respectively connected to the control unit and the Ethernet protection circuit; the Ethernet transceiver circuit includes an Ethernet transceiver chip D3 and a peripheral circuit, and the Ethernet transceiver chip D3 is respectively connected to the peripheral circuit and the Ethernet protection circuit.
[0011] In one preferred embodiment, the Ethernet protection circuit includes a TVS diode array D4, a clamping diode V12, a clamping diode V13, a clamping diode V14 and a clamping diode V15; pin 1 of the TVS diode array D4 is respectively connected to the Ethernet transceiver chip D3 and the pin 3 of the clamping diode V12; pin 3 of the TVS diode array D4 is respectively connected to the Ethernet transceiver chip D3 and the pin 3 of the clamping diode V13; pin 4 of the TVS diode array D4 is respectively connected to the Ethernet transceiver chip D3 and the pin 3 of the clamping diode V15 pins of the TVS diode array D4 are connected to the Ethernet transceiver chip D3 and the 3rd pin of the clamping diode V14 respectively; the 2nd pin of the TVS diode array D4, the 1st pin of the clamping diode V12, the 1st pin of the clamping diode V13, the 1st pin of the clamping diode V14 and the 1st pin of the clamping diode V15 are grounded, and the 5th pin of the TVS diode array D4, the 2nd pin of the clamping diode V12, the 2nd pin of the clamping diode V13, the 2nd pin of the clamping diode V14 and the 2nd pin of the clamping diode V15 are connected to the power supply terminal.
[0012] In one of the preferred solutions, the module management unit includes a USB_HUB circuit, a module interface circuit, a reset circuit and a crystal oscillator starting circuit; the USB_HUB circuit is connected to the module interface circuit, the reset circuit and the crystal oscillator starting circuit respectively.
[0013] One of the preferred solutions, the module interface circuit includes a first module interface circuit, a second module interface circuit and a third module interface circuit; the first module interface circuit includes a module interface XS1, pins 1 and 2 of the module interface XS1 are connected to the power supply terminal, pins 3 and 4 of the module interface XS1 are grounded, pin 5 of the module interface XS1 is connected to a resistor R107, pin 6 of the module interface XS1 is connected to a resistor R108, and the other ends of the resistors R107 and R108 are connected to the USB_HUB circuit;
[0014] The second module interface circuit includes a module interface XS2, wherein pins 1 and 2 of the module interface XS2 are connected to a power supply terminal, pins 3 and 4 of the module interface XS2 are grounded, pin 5 of the module interface XS2 is connected to a resistor R105, pin 6 of the module interface XS2 is connected to a resistor R106, and the other ends of the resistor R105 and the resistor R106 are connected to a USB_HUB circuit;
[0015] The third module interface circuit includes a module interface XS3, pins 1 and 2 of the module interface XS3 are connected to the power supply end, pins 3 and 4 of the module interface XS3 are grounded, pin 5 of the module interface XS3 is connected to resistor R104, pin 6 of the module interface XS3 is connected to resistor R103, and the other ends of the resistor R103 and resistor R104 are connected to the USB_HUB circuit.
[0016] A control method for a smart terminal module expansion docking station includes the following steps:
[0017] S1, thread initialization;
[0018] S2, performing scheduled status monitoring, updating and periodic task management of the expansion dock through the module management module;
[0019] S3, receiving and processing messages through the Ethernet unit, and managing the docking station upgrade and TCP connection;
[0020] S4, performing periodic voltage measurement and processing according to the voltage sampling unit;
[0021] S5. Reclaim thread resources.
[0022] In the above technical solution of the present invention, the expansion dock for intelligent terminal modules includes: a control unit, a module management unit, an Ethernet unit, a voltage sampling unit and a power supply unit; the module management unit is electrically connected to the control unit through a USB interface, the Ethernet unit is electrically connected to the control unit through an Ethernet interface, and the voltage sampling unit is electrically connected to the control unit through a UART interface; the power supply unit is electrically connected to the control unit through a GPIO interface, and the output end of the power supply unit is electrically connected to the input end of the module management unit, the control unit and the Ethernet unit respectively. The structure of the present invention is simple, and the acquisition and measurement of three-phase voltage can be realized by setting a voltage sampling unit, and the ADC data is transmitted to the control unit in real time through a dedicated UART channel; the module management unit supports multi-module expansion, and provides an effective solution for the modularization of intelligent terminals, and there is no need to replace new terminals and their components. The iteration and update of intelligent terminal modules can be realized through the Ethernet unit, which solves the technical problems that the existing intelligent terminal update and iteration methods are complicated, and the intelligent terminal modules have a single function and cannot meet the multi-branch and multi-function requirements of low-voltage distribution stations. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.
[0024] Figure 1 A schematic diagram of a module expansion dock for a smart terminal according to an embodiment of the present invention;
[0025] Figure 2 is a schematic diagram of a voltage sampling unit according to an embodiment of the present invention;
[0026] Figure 3 is a schematic diagram of an Ethernet unit according to an embodiment of the present invention;
[0027] Figure 4 is a schematic diagram of a module management unit according to an embodiment of the present invention;
[0028] Figure 5 A first schematic diagram of a control method for a smart terminal module expansion dock according to an embodiment of the present invention;
[0029] Figure 6 This is a second schematic diagram of a control method for a smart terminal module expansion dock according to an embodiment of the present invention.
[0030] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with the implementation methods and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0032] In addition, in the present invention, the descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features.
[0033] Furthermore, the technical solutions between the various embodiments of the present invention may be combined with each other, but this must be based on the fact that they can be implemented by ordinary technicians in the field. When the combination of technical solutions is mutually contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0034] See also Figure 1-Figure 4 According to one aspect of the present invention, the present invention provides a module expansion dock for a smart terminal, wherein the module expansion dock for a smart terminal comprises: a control unit, a module management unit, an Ethernet unit, a voltage sampling unit and a power supply unit; the module management unit is electrically connected to the control unit via a USB interface, the Ethernet unit is electrically connected to the control unit via an Ethernet interface, and the voltage sampling unit is electrically connected to the control unit via a UART interface; the power supply unit is electrically connected to the control unit via a GPIO interface, and the output end of the power supply unit is electrically connected to the input end of the module management unit, the control unit and the Ethernet unit, respectively.
[0035] Specifically, in this embodiment, the control unit expands the external interface through UART and USB, realizes communication with the voltage sampling unit through the UART interface, realizes data exchange with the Ethernet unit through the Ethernet interface, realizes data interaction with the module management unit through the USB interface, and controls the power supply unit to power on each unit through the GPIO interface; in the present invention, the control unit adopts a processor of the SCM600 series, with a main frequency of 300MHz and an embedded ARM926EJ-S TMARM core, with a dedicated PMU, and can run the LINUX operating system. The present invention does not specifically limit the model of the control unit, which can be set according to needs. The operating speed of the control unit is faster than that of the cortex-M3 and the single-chip microcomputer, and it supports two Ethernet channels, and has multiple UARTs, USBs and IICs to provide communication channels for each functional unit.
[0036] Specifically, in the present embodiment, the voltage sampling unit comprises a sampling chip D2 and a voltage divider and sampling circuit; the sampling chip D2 is respectively connected to the voltage divider and sampling circuit and the control unit, and the voltage divider and sampling circuit is connected to the strong power interface; the voltage divider and sampling circuit comprises an A-phase voltage divider and sampling circuit, a B-phase voltage divider and sampling circuit, and a C-phase voltage divider and sampling circuit; the sampling chip D2 may adopt RN8209C or other types of metering chips, which are not specifically limited in the present invention; the high-precision ADC sampling and ADC data real-time transmission functions of the sampling chip D2 are used to realize three-phase voltage sampling, and the ADC data is transmitted to the control unit in real time through a dedicated UART channel; the voltage divider and sampling circuit performs voltage division and sampling on phases A, B and C, and each phase voltage divider and voltage sampling circuit is composed of a voltage divider resistor, a sampling resistor, a filter device and a magnetic bead, see the attached Figure 2 .
[0037] Specifically, in this embodiment, the A-phase voltage division and sampling circuit includes a voltage division resistor R56, a voltage division resistor R57, a voltage division resistor R58, a voltage division resistor R59, a voltage division resistor R60, a voltage division resistor R61, a magnetic bead L4, a sampling resistor R62, a capacitor C29, a sampling resistor R78 and a capacitor C30; one end of the voltage division resistor R56 is connected to the strong power interface, the other end of the voltage division resistor R56 is connected to the magnetic bead L4, and the other end of the magnetic bead L4 is respectively connected to the sampling resistor R62, the capacitor C29 and the V1P positive analog input pin of the sampling chip D2; the sampling resistor R78 One end of the sampling resistor R62, the capacitor C29, the sampling resistor R78 and the capacitor C30 are connected to the negative analog input pin V1N of the sampling chip D2, and the other ends of the sampling resistor R62, the capacitor C29, the sampling resistor R78 and the capacitor C30 are grounded; the voltage is divided by the high-precision voltage-dividing resistor R56, the voltage-dividing resistor R57, the voltage-dividing resistor R58, the voltage-dividing resistor R59, the voltage-dividing resistor R60 and the voltage-dividing resistor R61 connected in series to form a voltage-dividing circuit, and at the same time, the flow of current can be limited, thereby protecting the electronic components from overload or damage; the magnetic bead L4 connected in series with the voltage-dividing resistor can effectively suppress high-frequency noise and spike interference on the signal line and the power line, and has the ability to absorb electrostatic pulses.
[0038] Specifically, in this embodiment, the B-phase voltage division and sampling circuit includes a voltage division resistor R63, a voltage division resistor R64, a voltage division resistor R65, a voltage division resistor R66, a voltage division resistor R67, a voltage division resistor R68, a magnetic bead L34, a sampling resistor R69, a capacitor C31, a sampling resistor R79 and a capacitor C32; one end of the voltage division resistor R63 is connected to the strong power interface, the other end of the voltage division resistor R63 is connected to the magnetic bead L34, and the other end of the magnetic bead L34 is respectively connected to the sampling resistor R69, the capacitor C31 and the V2P positive analog input pin of the sampling chip D2; the sampling resistor R79 One end of the capacitor C32 is connected to the V2N negative analog input pin of the sampling chip D2, and the other ends of the sampling resistor R69, the capacitor C31, the sampling resistor R79 and the capacitor C32 are grounded; a high-precision voltage-dividing resistor R63, a voltage-dividing resistor R64, a voltage-dividing resistor R65, a voltage-dividing resistor R66, a voltage-dividing resistor R67 and a voltage-dividing resistor R68 are connected in series to form a voltage-dividing circuit for voltage division, and at the same time, the flow of current can be limited, thereby protecting the electronic components from overload or damage. The magnetic bead L34 and the voltage-dividing resistor are connected in series to effectively suppress high-frequency noise and spike interference on the signal and power lines, and have the ability to absorb electrostatic pulses.
[0039] Specifically, in this embodiment, the C-phase voltage dividing and sampling circuit includes a voltage dividing resistor R70, a voltage dividing resistor R71, a voltage dividing resistor R72, a voltage dividing resistor R73, a voltage dividing resistor R74, a voltage dividing resistor R75, a magnetic bead L35, a sampling resistor R76, a capacitor C36, a sampling resistor R82 and a capacitor C41; one end of the voltage dividing resistor R70 is connected to the strong power interface, the other end of the voltage dividing resistor R70 is connected to the magnetic bead L35, and the other end of the magnetic bead L35 is respectively connected to the sampling resistor R76, the capacitor C36 and the V3P positive analog input pin of the sampling chip D2; the sampling resistor R8 2 and one end of the capacitor C41 are connected to the V3N negative analog input pin of the sampling chip D2, and the other ends of the sampling resistor R76, the capacitor C36, the sampling resistor R82 and the capacitor C41 are grounded; a voltage dividing circuit is composed of a high-precision voltage dividing resistor R70, a voltage dividing resistor R71, a voltage dividing resistor R72, a voltage dividing resistor R73, a voltage dividing resistor R74 and a voltage dividing resistor R75 to divide the voltage, and at the same time, the flow of current can be limited, thereby protecting the electronic components from overload or damage. The magnetic bead L35 is connected in series with the voltage dividing resistor to effectively suppress high-frequency noise and spike interference on the signal line and the power line, and has the ability to absorb electrostatic pulses.
[0040] Specifically, in the present embodiment, the Ethernet unit includes an Ethernet transceiver circuit and an Ethernet protection circuit; the Ethernet transceiver circuit is respectively connected to the control unit and the Ethernet protection circuit; the Ethernet transceiver circuit includes an Ethernet transceiver chip D3 and a peripheral circuit, and the Ethernet transceiver chip D3 is respectively connected to the peripheral circuit and the Ethernet protection circuit; the peripheral circuit includes resistors R82, R83, R5, R86, R87, R88, R89, R90, R91, R92 and R93; the resistor R82 is configured as a pull-down resistor of the TXD_2 pin of the Ethernet transceiver chip D3, the resistor R83 is configured as a pull-down resistor of the TXD_3 of the Ethernet transceiver chip D3, the resistor R84 is configured as a pull-up resistor of the RESERVED0 pin of the Ethernet transceiver chip D3, the resistors R85, R86, R87, R88, R89, R90, R91, R92 and R93; the resistor R82 is configured as a pull-down resistor of the TXD_2 pin of the Ethernet transceiver chip D3, the resistor R83 is configured as a pull-down resistor of the TXD_3 of the Ethernet transceiver chip D3, the resistor R84 is configured as a pull-up resistor of the RESERVED0 pin of the Ethernet transceiver chip D3, the resistors R85, R86, R87, R88, R89, R90, R91, R92 and R93 The resistor R86 is configured as a pull-up resistor of the LED pin of the Ethernet transceiver chip D3, the resistor R87 is configured as a pull-down resistor of the RESET pin of the Ethernet transceiver chip D3, the resistor R88 is configured as a pull-up resistor of the MDIO pin of the Ethernet transceiver chip D3, the resistor R89 is configured as a pull-up resistor of the MDIO pin of the Ethernet transceiver chip D3, the resistor R90 is configured as a CRS_DV pull-down resistor of the Ethernet transceiver chip D3, the resistor R91 is configured as a RX_ER pull-down resistor of the Ethernet transceiver chip D3, the resistor R92 is configured as a pull-up resistor of the PHYAD1 pin of the Ethernet transceiver chip D3, and the resistor R93 is configured as a pull-up resistor of the PHYAD2 pin of the Ethernet transceiver chip D3. The peripheral circuit resistors are pulled up to 3.3V and pulled down to ground to complete the default initial state level configuration of each pin of the Ethernet transceiver chip D3.
[0041] Specifically, in this embodiment, the Ethernet protection circuit includes a TVS diode array D4, a clamping diode V12, a clamping diode V13, a clamping diode V14 and a clamping diode V15; pin 1 of the TVS diode array D4 is respectively connected to the Ethernet transceiver chip D3 and the pin 3 of the clamping diode V12; pin 3 of the TVS diode array D4 is respectively connected to the Ethernet transceiver chip D3 and the pin 3 of the clamping diode V13; pin 4 of the TVS diode array D4 is respectively connected to the Ethernet transceiver chip D3 and the pin 3 of the clamping diode V15; pin 6 of the TVS diode array D4 is respectively connected to the Ethernet transceiver chip D3 and the pin 3 of the clamping diode V15; They are respectively connected to the Ethernet transceiver chip D3 and the 3rd pin of the clamping diode V14; the 2nd pin of the TVS diode array D4, the 1st pin of the clamping diode V12, the 1st pin of the clamping diode V13, the 1st pin of the clamping diode V14 and the 1st pin of the clamping diode V15 are grounded; the 5th pin of the TVS diode array D4, the 2nd pin of the clamping diode V12, the 2nd pin of the clamping diode V13, the 2nd pin of the clamping diode V14 and the 2nd pin of the clamping diode V15 are connected to the power supply end; the Ethernet protection circuit is used to protect components from being damaged by high voltage shocks, ensuring the stable operation and long-term reliability of electronic equipment.
[0042] Specifically, in this embodiment, the module management unit includes a USB_HUB circuit, a module interface circuit, a reset circuit and a crystal oscillator starting circuit; the USB_HUB circuit is connected to the module interface circuit, the reset circuit and the crystal oscillator starting circuit respectively; the USB_HUB circuit leads out a USB bus connected to the control unit, and the USB_HUB circuit leads out three USB buses to connect each module interface, that is, the three USB buses are connected to the first module interface circuit, the second module interface circuit and the third module interface circuit.
[0043] Specifically, in this embodiment, the module management unit is also provided with a peripheral filtering circuit, which includes capacitor C57, capacitor C58, capacitor C59, capacitor C60, capacitor C61, capacitor C62, capacitor C63, capacitor C64 and capacitor C65; one end of the capacitor C57, capacitor C58, capacitor C59, capacitor C60, capacitor C61, capacitor C62, capacitor C63, capacitor C64 and capacitor C65 is connected to the USB_HUB circuit, and the other end of the capacitor C57, capacitor C58, capacitor C59, capacitor C60, capacitor C61, capacitor C62, capacitor C63, capacitor C64 and capacitor C65 is grounded, and the noise generated is suppressed, filtered and decoupled by the peripheral filtering circuit.
[0044] Specifically, in this embodiment, the module interface circuit includes a first module interface circuit, a second module interface circuit and a third module interface circuit; the first module interface circuit includes a module interface XS1, pins 1 and 2 of the module interface XS1 are connected to the power supply end, pins 3 and 4 of the module interface XS1 are grounded, pin 5 of the module interface XS1 is connected to resistor R107, pin 6 of the module interface XS1 is connected to resistor R108, and the other ends of the resistor R107 and resistor R108 are connected to the USB_HUB circuit; the second module interface circuit includes a module interface XS2, pins 1 and 2 of the module interface XS2 are connected to the power supply end, pins 3 and 4 of the module interface XS2 are grounded, pin 5 of the module interface XS2 is connected to resistor R105, and the module interface XS2 Pin 6 is connected to resistor R106, and the other ends of the resistors R105 and R106 are connected to the USB_HUB circuit; the third module interface circuit includes a module interface XS3, pins 1 and 2 of the module interface XS3 are connected to the power supply end, pins 3 and 4 of the module interface XS3 are grounded, pin 5 of the module interface XS3 is connected to resistor R104, pin 6 of the module interface XS3 is connected to resistor R103, and the other ends of the resistors R103 and R104 are connected to the USB_HUB circuit; by setting resistors R108, R107, R106, R105, R104 and R103 in the first module interface circuit, the second module interface circuit and the third module interface, and connecting them in series on the USB signal line, impedance matching and electrostatic discharge protection are achieved.
[0045] Specifically, in this embodiment, the reset circuit includes a resistor R95, a resistor R97 and a capacitor C54; one end of the resistor R95 is connected to the power supply end, and the other end of the resistor R95 is respectively connected to the capacitor C54, the resistor R97 and the USB_HUB circuit, the other end of the capacitor C54 is grounded, and the other end of the resistor R97 is connected to the control unit. The capacitor C54 is a decoupling capacitor. The reset circuit restores the circuit to its initial state to ensure its correct startup and stable operation, and the initial level is configured to be a high level.
[0046] Specifically, in this embodiment, the crystal oscillator starting circuit includes a resistor R98, a capacitor C55, a capacitor C56 and a crystal oscillator Y3; one end of the resistor R98 is respectively connected to the capacitor C55, the crystal oscillator Y3 and the USB_HUB circuit, the other end of the resistor R98 is respectively connected to the capacitor C56, the crystal oscillator Y3 and the USB_HUB circuit, the other end of the capacitor C56 is respectively connected to the other end of the capacitor C55 and the ground, and the other pins of the crystal oscillator Y3 are grounded; the capacitor C55 and the capacitor C56 can select values for the degree of matching of the crystal oscillator load capacitance, and a stable clock signal is generated through the crystal oscillator starting circuit to ensure the normal operation and performance stability of the equipment.
[0047] See also Figure 5-Figure 6 According to another aspect of the present invention, the present invention provides a control method for a smart terminal module expansion dock, wherein the control method comprises the following steps:
[0048] S1, thread initialization;
[0049] S2, performing scheduled status monitoring, updating and periodic task management of the expansion dock through the module management module;
[0050] S3, receiving and processing messages through the Ethernet unit, and managing the docking station upgrade and TCP connection;
[0051] S4, performing periodic voltage measurement and processing according to the voltage sampling unit;
[0052] S5. Reclaim thread resources.
[0053] Specifically, in this embodiment, the control method for the intelligent terminal module expansion dock includes periodic task management, TCP service management and metering collection management; the periodic task management is to complete the regular status monitoring and update of the expansion dock, the TCP service management is to implement 3242 / 3241 port monitoring, manage TCP connection and disconnection, and implement protocol functions, and the metering collection management is to implement the register reading, voltage calculation and calibration functions of the metering chip based on the serial port.
[0054] Specifically, in this embodiment, the periodic task management is implemented in the main thread logic, and mainly processes the tasks of periodic inspection execution, such as regularly checking whether the parameters have changed and regularly checking the lighting status of the LED; the periodic task management uses a map structure with time as the main key and the task processing function as the execution body to manage each periodic task. During the execution process, the time difference between the map's stack head and the time before the point is used as the sleep time to ensure that the periodic task can be processed quickly. Since the present invention does not use a multi-threaded asynchronous method to implement task execution, the execution process and the polling process are in the same execution flow. Therefore, it is required that the task execution can be completed as soon as possible to avoid problems. Now it is blocked, and it also avoids the unexpected extension of the execution interval; the step S2 monitors, updates and manages the periodic task of the expansion dock through the module management module, specifically: the periodic task list is stored in the map container of mapHandle, listens to the addition of periodic tasks, and determines whether the current task or the most recent task has timed out. If so, the timed-out task is executed. If the current task or the most recent task needs to be repeated, it will be added to the periodic task list again, and whether to continue the periodic task is determined according to the execution result. If so, the periodic task in the periodic task list continues to be executed, otherwise, the execution of the periodic task in the periodic task list is exited.
[0055] Specifically, in this embodiment, the TCP service management completes information reading, docking station upgrade and other functions and TCP connection management when processing received messages, so that each port service only accepts one client connection. If a new connection is logged in, the original connection will be logged out, and the calibration protocol is supported; the step S3 receives and processes messages through the Ethernet unit, and manages the docking station upgrade and TCP connection, specifically: binds the listening port; the listening ports are 3241 and 3242; receives new clients, processes client messages and responds; determines whether there is no communication with the client in the first time interval, if so, sends a request clock for heartbeat, otherwise, further determines whether there is no communication with the client in the second time interval, if so, disconnects the client connection, otherwise, determines whether there is a new connection, if so, disconnects the port connection, otherwise, determines whether the client has a received message, if so, responds to the client message, and records the receiving time, otherwise, updates the number of clients to the global variable; the first time interval is 15 seconds, and the second time interval is 60 seconds, which is not specifically limited in the present invention and can be set as needed.
[0056] Specifically, in this embodiment, the metering collection management through the voltage sampling module includes two modes, the first one, the normal mode is to read the voltage in sequence every second, and the second one, the calibration mode, needs to complete the calibration calculation function; the step S4 performs periodic voltage metering and processing according to the voltage sampling unit, specifically: initialize the metering serial port, determine whether to enter the calibration mode, if so, conditionally wait for the calibration message, forward the external 485 message to the metering chip, and process the calibration message, and conditionally wake up the external thread; otherwise, read the voltage and write to the global variable.
[0057] In order to facilitate the understanding of the relevant terms of the present invention, an explanation is given here:
[0058] USB / IP: It is a network-based device sharing mechanism that can share the USB device connected to device A (server) to remote device B (client) through the network.
[0059] Docking station: supports module expansion devices that realize USB module sharing through USBIP protocol and realize device management of the docking station through TCP-based module management protocol.
[0060] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. All equivalent structural changes made using the contents of the present invention's specification and drawings, or directly / indirectly applied in other related technical fields, are included in the patent protection scope of the present invention.
Claims
1. A module expansion dock for a smart terminal, characterized in that: include: Control unit, module management unit, Ethernet unit, voltage sampling unit and power supply unit; The module management unit is electrically connected to the control unit via a USB interface, the Ethernet unit is electrically connected to the control unit via an Ethernet interface, and the voltage sampling unit is electrically connected to the control unit via a UART interface; the power supply unit is electrically connected to the control unit via a GPIO interface, and the output end of the power supply unit is electrically connected to the input ends of the module management unit, the control unit and the Ethernet unit, respectively.
2. The expansion dock for a smart terminal module according to claim 1, characterized in that: The voltage sampling unit includes a sampling chip D2 and a voltage dividing and sampling circuit; The sampling chip D2 is connected to the voltage dividing and sampling circuit and the control unit respectively, and the voltage dividing and sampling circuit is connected to the strong power interface; the voltage dividing and sampling circuit includes the A-phase voltage dividing and sampling circuit, the B-phase voltage dividing and sampling circuit and the C-phase voltage dividing and sampling circuit.
3. The expansion dock for a smart terminal module according to claim 2, characterized in that: The A-phase voltage division and sampling circuit includes a voltage division resistor R56, a magnetic bead L4, a sampling resistor R62, a capacitor C29, a sampling resistor R78 and a capacitor C30; one end of the voltage division resistor R56 is connected to the strong power interface, the other end of the voltage division resistor R56 is connected to the magnetic bead L4, and the other end of the magnetic bead L4 is respectively connected to the sampling resistor R62, the capacitor C29 and the V1P positive analog input pin of the sampling chip D2; one end of the sampling resistor R78 and the capacitor C30 is connected to the V1N negative analog input pin of the sampling chip D2, and the other ends of the sampling resistor R62, the capacitor C29, the sampling resistor R78 and the capacitor C30 are grounded.
4. The expansion dock for a smart terminal module according to claim 2, characterized in that: The B-phase voltage dividing and sampling circuit includes a voltage dividing resistor R63, a magnetic bead L34, a sampling resistor R69, a capacitor C31, a sampling resistor R79 and a capacitor C32; one end of the voltage dividing resistor R63 is connected to the strong power interface, the other end of the voltage dividing resistor R63 is connected to the magnetic bead L34, and the other end of the magnetic bead L34 is respectively connected to the sampling resistor R69, the capacitor C31 and the V2P positive analog input pin of the sampling chip D2; one end of the sampling resistor R79 and the capacitor C32 is connected to the V2N negative analog input pin of the sampling chip D2, and the other ends of the sampling resistor R69, the capacitor C31, the sampling resistor R79 and the capacitor C32 are grounded.
5. The expansion dock for a smart terminal module according to claim 2, characterized in that: The C-phase voltage dividing and sampling circuit includes a voltage dividing resistor R70, a magnetic bead L35, a sampling resistor R76, a capacitor C36, a sampling resistor R82 and a capacitor C41; one end of the voltage dividing resistor R70 is connected to the strong power interface, the other end of the voltage dividing resistor R70 is connected to the magnetic bead L35, and the other end of the magnetic bead L35 is respectively connected to the sampling resistor R76, the capacitor C36 and the V3P positive analog input pin of the sampling chip D2; one end of the sampling resistor R82 and the capacitor C41 is connected to the V3N negative analog input pin of the sampling chip D2, and the other ends of the sampling resistor R76, the capacitor C36, the sampling resistor R82 and the capacitor C41 are grounded.
6. A module expansion dock for a smart terminal according to any one of claims 1 to 5, characterized in that: The Ethernet unit includes an Ethernet transceiver circuit and an Ethernet protection circuit; the Ethernet transceiver circuit is connected to the control unit and the Ethernet protection circuit respectively; the Ethernet transceiver circuit includes an Ethernet transceiver chip D3 and a peripheral circuit, and the Ethernet transceiver chip D3 is connected to the peripheral circuit and the Ethernet protection circuit respectively.
7. The expansion dock for a smart terminal module according to claim 6, characterized in that: The Ethernet protection circuit includes a TVS diode array D4, a clamping diode V12, a clamping diode V13, a clamping diode V14 and a clamping diode V15; pin 1 of the TVS diode array D4 is respectively connected to the Ethernet transceiver chip D3 and pin 3 of the clamping diode V12; pin 3 of the TVS diode array D4 is respectively connected to the Ethernet transceiver chip D3 and pin 3 of the clamping diode V13; pin 4 of the TVS diode array D4 is respectively connected to the Ethernet transceiver chip D3 and pin 3 of the clamping diode V15; Pin 6 of the TVS diode array D4 is connected to the Ethernet transceiver chip D3 and pin 3 of the clamping diode V14 respectively; pin 2 of the TVS diode array D4, pin 1 of the clamping diode V12, pin 1 of the clamping diode V13, pin 1 of the clamping diode V14 and pin 1 of the clamping diode V15 are grounded, and pin 5 of the TVS diode array D4, pin 2 of the clamping diode V12, pin 2 of the clamping diode V13, pin 2 of the clamping diode V14 and pin 2 of the clamping diode V15 are connected to the power supply end.
8. A module expansion dock for a smart terminal according to any one of claims 1 to 5, characterized in that: The module management unit comprises a USB_HUB circuit, a module interface circuit, a reset circuit and a crystal oscillator oscillation circuit; the USB_HUB circuit is connected to the module interface circuit, the reset circuit and the crystal oscillator oscillation circuit respectively.
9. The expansion dock for a smart terminal module according to claim 8, characterized in that: The module interface circuit includes a first module interface circuit, a second module interface circuit and a third module interface circuit; the first module interface circuit includes a module interface XS1, pins 1 and 2 of the module interface XS1 are connected to the power supply terminal, pins 3 and 4 of the module interface XS1 are grounded, pin 5 of the module interface XS1 is connected to a resistor R107, pin 6 of the module interface XS1 is connected to a resistor R108, and the other ends of the resistors R107 and R108 are connected to the USB_HUB circuit; The second module interface circuit includes a module interface XS2, wherein pins 1 and 2 of the module interface XS2 are connected to a power supply terminal, pins 3 and 4 of the module interface XS2 are grounded, pin 5 of the module interface XS2 is connected to a resistor R105, pin 6 of the module interface XS2 is connected to a resistor R106, and the other ends of the resistor R105 and the resistor R106 are connected to a USB_HUB circuit; The third module interface circuit includes a module interface XS3, pins 1 and 2 of the module interface XS3 are connected to the power supply end, pins 3 and 4 of the module interface XS3 are grounded, pin 5 of the module interface XS3 is connected to resistor R104, pin 6 of the module interface XS3 is connected to resistor R103, and the other ends of the resistor R103 and resistor R104 are connected to the USB_HUB circuit.
10. A control method for a smart terminal module expansion dock according to any one of claims 1 to 9, characterized in that: The following steps are involved: S1, thread initialization; S2, performing scheduled status monitoring, updating and periodic task management of the expansion dock through the module management module; S3, receiving and processing messages through the Ethernet unit, and managing the docking station upgrade and TCP connection; S4, performing periodic voltage measurement and processing according to the voltage sampling unit; S5. Reclaim thread resources.
Citation Information
Patent Citations
Intelligent terminal with replaceable wireless communication device
CN202583948U