Asynchronous transceiver control circuit based on GPIO (General Purpose Input / Output) chip selection signal control
By designing an asynchronous transceiver control circuit based on GPIO chip select signal control, the problems of high power consumption, complex circuits and external crystal oscillator dependence in power metering are solved, low power consumption, simplified circuits and signal stability are achieved, and suitable for smart meters and remote monitoring systems.
Patent Information
- Application Number
- CN202421471941.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2034-06-26
AI Technical Summary
The prior art has problems in power metering, such as high power consumption, complex circuit design, external crystal oscillator dependence, insufficient signal stability and accuracy, and lack of isolation and protection of data transmission.
A control circuit based on GPIO chip select signal control asynchronous transceiver is designed, including voltage sampling circuit, current sampling circuit, optocouple isolation communication circuit and V9240 metering chip circuit. The working state of the chip is controlled through GPIO, and an RC oscillator is built-in to eliminate external crystal oscillator dependence.
It realizes low power consumption, simplified circuit design, built-in clock, signal stability and accuracy, as well as data transmission isolation and protection, and is suitable for smart meter and remote monitoring systems.
Smart Images

Figure CN222914063U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of sampling and metering circuits, and particularly relates to a control circuit for an asynchronous transceiver controlled by a GPIO chip select signal. Background Art
[0002] With the progress of science and technology and the popularization of overseas smart meters, the functions of electric energy meters are becoming more and more diverse. The sampling and metering module, as the basic and most important function of smart metering products, has also been continuously improved and perfected.
[0003] Traditional electric energy metering chips such as V9240 usually require an external crystal oscillator to provide a time reference to ensure the accuracy of electric energy metering. This not only increases the system cost, but also increases the complexity of circuit design, and at the same time increases the potential failure rate. In smart meters and remote monitoring systems, low power consumption is an important design goal. The metering modules in the prior art have a relatively high power consumption during normal operation, which is not conducive to long-term stable operation, especially in application scenarios sensitive to power consumption. Without an accurate time reference and an efficient signal processing circuit, it is difficult for the prior art to ensure the stability and accuracy of voltage and current sampling signals, thus affecting the final electric energy metering result. In addition, the prior art lacks sufficient isolation and protection measures during data transmission and is easily affected by external interference or faults.
[0004] Therefore, it is of great significance to design a control circuit for an asynchronous transceiver controlled by a GPIO chip select signal to solve the above problems. Summary of the Utility Model
[0005] To solve the problems in the background art, the utility model provides a control circuit for an asynchronous transceiver controlled by a GPIO chip select signal, which includes:
[0006] A voltage sampling circuit, including a voltage-dividing resistor connected in series between the power ground and the metering analog ground, a sampling capacitor connected in parallel with the voltage-dividing resistor, and a sampling resistor for converting the voltage-divided value into a sampling voltage value;
[0007] A current sampling circuit, including a manganin shunt and a resistor and a capacitor connected in parallel with the shunt for collecting current signals;
[0008] An optocoupler isolation communication circuit, including optocoupler elements for protection isolation and data transmission and related resistors and capacitors;
[0009] A V9240 metering chip circuit, including an input port connected to the voltage sampling circuit and the current sampling circuit, and a UART interface for communicating with a microprocessor;
[0010] A control unit for controlling the working state of the metering chip through a GPIO chip select signal.
[0011] In a preferred embodiment, the voltage sampling circuit includes resistors RM1, RM1, RM3, RM4, RM6, RM7, RM8 and capacitor CM1; resistors RM1, RM1, RM3, RM4, RM6, RM7 and RM8 are connected in series between the power supply ground and the metering analog ground. Resistors RM1, RM1, RM3, RM4, RM6, RM7 are voltage-dividing resistors, and resistor RM8 is a sampling resistor. Capacitor CM1 is connected in parallel with resistor RM8. The voltage-divided value of resistor RM8 is the sampled voltage value VAP. The sampling signal is connected to pin 2 of metering chip UM1, which is the voltage input pin of the V9240 metering chip.
[0012] In a preferred embodiment, the current sampling circuit includes a manganin shunt SM1, resistors RM9, RM10, RM11 and capacitors CM2, CM3, CM4; the manganin shunt VI is connected to the power input. ILN and ILP are connected in parallel with resistor RM10. ILN is connected to capacitor CM2 through resistor RM9, and ILP is connected to capacitor CM4 through resistor RM11. The other ends of CM2 and CM4 are respectively connected to the power supply ground. The manganin shunt is connected in parallel with capacitor CM3 at the back ends of resistors RM9 and RM11. Capacitor CM3 is the sampling capacitor. The currents flowing through both ends of capacitor CM3 are the current sampling values IAN and IAP respectively. The current sampling value IAN is connected to pin 3 of the V9240 metering chip, which is the current N-terminal input, and the current sampling value IAP is connected to pin 4 of the V9240 metering chip, which is the current P-terminal input.
[0013] In a preferred embodiment, the V9240 metering chip circuit includes capacitors CM8, CM9, CM10, bead LM1 and V9240 metering chip UM1; one end of capacitor CM7 is connected to the metering analog ground, and the other end is connected to the chip power input power supply AVCC and pin 1 of the V9240 metering chip, which is the 3.3V power input pin of the V9240 metering chip; pin 2 of the chip is connected to resistor RM8 at the resistor end, which is the voltage P-terminal input; pins 3 and 4 of the chip are respectively connected to resistor RM9 and resistor RM11 at the capacitor end, and these two pins are respectively the chip current N-terminal input and P-terminal input; pin 5 of the chip is connected to capacitor CM11, and the other end of capacitor CM11 is connected to the metering analog ground. Pin 5 of the chip is the on-chip reference voltage and should be connected to a 1μf decoupling capacitor and then grounded; pin 6 of the chip is connected to pin 4 of optocoupler DM1 and pin 2 of optocoupler DM2. This pin is the UART receive data input port. When the low level duration of this pin input is greater than 64ms, it will cause an RX reset inside the V9240 metering chip; pin 7 of the chip is the internal digital power output interface. After being connected to a parallel circuit composed of a ≥4.7Μf and a 0.1μF decoupling capacitor through bead LM1 externally, it is then connected to the metering analog ground; pin 8 of the chip is connected to the metering ground.
[0014] In a preferred solution, the optocoupler circuit is composed of resistors RM12, RM13, RM14, RM15, RM16, RM17, capacitors CM5, CM6, CM7, triode QM1 and optocouplers DM1, DM2; one end of resistor RM3 is connected to the metering power supply AVCC, and the other end is connected to capacitor CM5 and the 4th pin of optocoupler DM1. Capacitor CM5 is connected in parallel to the 3rd and 4th pins of optocoupler DM1. The 3rd pin of the optocoupler is connected to the metering ground. The 1st pin of the optocoupler is connected to the collector of triode QM1 through resistor RM14. The 2nd pin of the optocoupler is connected to capacitor CM6 and the data output port of the MCU to the V9240 metering chip. One end of capacitor CM6 is connected to the 2nd pin of optocoupler DM1; the emitter of triode QM1 is connected to the high level DVDD, the base is connected to the control interface of the MCU to triode QM1, and the collector is connected to resistor RM14; one end of resistor RM15 is connected to the metering power supply AVCC, and the other end is connected to the 1st pin of optocoupler DM2. The 2nd pin of optocoupler DM2 is connected to the data input port of the V9240 metering chip for receiving data; the 3rd pin of optocoupler DM2 is connected to capacitor CM7, and the other end of capacitor CM7 is connected to the data input port of the MCU to the V9240 metering chip. The 4th pin of optocoupler DM2 is connected to resistors RM16 and RM17. The other end of RM16 is connected to the stable high level DVDD, and the other end of resistor RM17 is connected to the data input port of the MCU to the V9240 metering chip.
[0015] The beneficial effects achieved by the present utility model are as follows:
[0016] The present invention provides an asynchronous transceiver control circuit based on GPIO chip select signals. Through GPIO control, the power supply of the metering chip can be quickly cut off when necessary, serving as a protection mechanism to prevent the electric meter from being damaged due to overload or other abnormal conditions. By controlling the startup and shutdown of the metering chip through the GPIO port, a flexible power management method is provided, and the operation of the metering chip can be activated or stopped at any time according to needs, thereby achieving precise control of the power metering process. The typical power consumption of the V9240 metering chip of the present invention is only 1.3 mA during normal operation. This low-power consumption characteristic significantly reduces energy consumption, especially suitable for application scenarios with strict power consumption requirements, such as smart meters and remote monitoring systems. The V9240 metering chip integrates an RC oscillator internally, eliminating the dependence on external crystal oscillators. This simplifies the circuit design, reduces the number of system components, lowers the system cost and potential failure rate. Removing the external crystal oscillator and other unnecessary components helps to reduce the device volume and space occupation. At the same time, because the number of components is reduced, the overall energy consumption is also reduced. The use of the internal RC oscillator ensures the accuracy of power metering and a stable timing reference, improves the reliability and stability of the system. At the same time, the GPIO control mechanism can quickly cut off the power supply in case of abnormalities to protect the electric meter from damage. The simplified circuit design and low-power consumption characteristics make the present invention easy to use and integrate, suitable for a variety of smart grid and Internet of Things applications, improving user convenience. By adopting an internal RC oscillator, the metering chip can quickly respond to voltage and current changes, has high sensitivity, and can accurately measure electric energy.
[0017] The circuit design of the present invention can operate at different grid frequencies, has strong adaptability, and can meet the grid standards of different countries and regions. The simplified circuit and low-power consumption design make the present invention not only suitable for commercial use, but also suitable for home and small applications, with wide practicability.
[0018] While ensuring the accuracy of power metering, the control circuit of the present invention achieves low cost, low power consumption, high reliability and high adaptability, meeting the requirements of modern smart grid and Internet of Things applications. Brief Description of the Drawings
[0019] Figure 1 is the schematic diagram of the control circuit;
[0020] Figure 2 is the MCU control pin diagram;
[0021] Figure 3 is the internal circuit diagram of the V9240 chip;
[0022] Figure 4 is the control circuit flowchart. Detailed Embodiment
[0023] Next, in combination with the accompanying drawings in the present utility model, the technical solutions in the present utility model will be clearly and completely described. In addition, the forms of each structure described in the following embodiments are merely examples, and the present utility model is not limited to the structures described in the following embodiments. All other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present utility model.
[0024] Referring to Figures 1-4 , the present utility model provides an asynchronous transceiver control circuit based on a GPIO chip select signal. The asynchronous transceiver control circuit based on the GPIO chip select signal includes a voltage sampling circuit, a current sampling circuit, an optocoupler isolation communication circuit, and a V9240 metering chip circuit part.
[0025] The voltage sampling circuit consists of resistors RM1, RM1, RM3, RM4, RM6, RM7, RM8, and capacitor CM1. Resistors RM1, RM1, RM3, RM4, RM6, RM7, and RM8 are connected in series between the power supply ground and the metering analog ground. Resistors RM1, RM1, RM3, RM4, RM6, RM7 are voltage-dividing resistors, and resistor RM8 is a sampling resistor. Capacitor CM1 is connected in parallel with resistor RM8. The voltage-divided value of resistor RM8 is the sampling voltage value VAP. The sampling signal is connected to pin 2 of metering chip UM1, which is the voltage input pin of the metering chip. The function of the voltage sampling circuit is to collect voltage signals.
[0026] The current sampling circuit consists of a manganin shunt SM1, resistors RM9, RM10, RM11, and capacitors CM2, CM3, CM4. The manganin shunt VI is connected to the power input. ILN and ILP are connected in parallel with resistor RM10. ILN is connected to capacitor CM2 through resistor RM9, and ILP is connected to capacitor CM4 through resistor RM11. The other ends of CM2 and CM4 are respectively connected to the power supply ground. The manganin shunt is connected in parallel with capacitor CM3 at the back ends of resistors RM9 and RM11. Capacitor CM3 is a sampling capacitor. The currents flowing through both ends of capacitor CM3 are the current sampling values IAN and IAP respectively. The current sampling value IAN is connected to pin 3 of the metering chip, which is the current N-terminal input. The current sampling value IAP is connected to pin 4 of the metering chip, which is the current P-terminal input. The function of the current sampling circuit is to collect current signals.
[0027] The metering chip circuit consists of capacitors CM8, CM9, CM10, bead LM1, and metering chip UM1. One end of capacitor CM7 is connected to the metering analog ground, and the other end is connected to the chip power input power supply AVCC and pin 1 of the metering chip. This pin is the 3.3V power input pin of the metering chip. Pin 2 of the chip is connected to resistor RM8 at the resistor end, and this pin is the voltage P terminal input. Pins 3 and 4 of the chip are respectively connected to resistor RM9 and resistor RM11 at the capacitor end. These two pins are respectively the chip current N terminal input and P terminal input. Pin 5 of the chip is connected to capacitor CM11. The other end of capacitor CM11 is connected to the metering analog ground. Pin 5 of the chip is the on-chip reference voltage and should be connected to a 1 μF decoupling capacitor and then grounded. Pin 6 of the chip is connected to pin 4 of optocoupler DM1 and pin 2 of optocoupler DM2. This pin is the UART receive data input port. When the low level duration at this pin is greater than 64 ms, it will cause an RX reset inside the metering chip. Pin 7 of the chip is the internal digital power output interface. After being connected to a parallel circuit composed of a ≥4.7 μF and a 0.1 μF decoupling capacitor through bead LM1 externally, it is then connected to the metering analog ground. Pin 8 of the chip is connected to the metering ground. The function of the V9240 metering chip circuit is to process voltage sampling signals and current sampling signals, perform electric energy metering, and communicate with the MCU.
[0028] The optocoupler circuit consists of resistors RM12, RM13, RM14, RM15, RM16, RM17, capacitors CM5, CM6, CM7, triode QM1, and optocouplers DM1, DM2. One end of resistor RM3 is connected to the metering power supply AVCC, and the other end is connected to capacitor CM5 and pin 4 of optocoupler DM1. Capacitor CM5 is connected in parallel to pins 3 and 4 of optocoupler DM1. Pin 3 of the optocoupler is connected to the metering ground. Pin 1 of the optocoupler is connected to the collector of triode QM1 through resistor RM14. Pin 2 of the optocoupler is connected to capacitor CM6 and the data output port of the MCU to the metering chip. One end of capacitor CM6 is connected to pin 2 of optocoupler DM1. The emitter of triode QM1 is connected to the high level DVDD, the base is connected to the control interface of the MCU to triode QM1, and the collector is connected to resistor RM14. One end of resistor RM15 is connected to the metering power supply AVCC, and the other end is connected to pin 1 of optocoupler DM2. Pin 2 of optocoupler DM2 is connected to the metering chip receive data input port. Pin 3 of optocoupler DM2 is connected to capacitor CM7. The other end of capacitor CM7 is connected to the data input port of the MCU to the metering chip. Pin 4 of optocoupler DM2 is connected to resistors RM16 and RM17. The other end of RM16 is connected to the stable high level DVDD, and the other end of resistor RM17 is connected to the data input port of the MCU to the metering chip. The function of the optocoupler circuit is protection isolation and data transmission.
[0029] When the present utility model is applied, the sampled voltage and current signals are first processed by the APGA unit inside the chip to ensure that the signal quality is suitable for subsequent analog-to-digital conversion. The conditioned analog voltage signal and current signal are then further processed by the ADC unit, and the analog signals are converted into digital signals for further processing in the digital domain. The digitized voltage signal and current signal enter the metering VMA unit inside the chip and are calculated according to a preset algorithm, including true root mean square (TRMS) calculation to obtain the effective voltage and current values of alternating current, and then calculating the active power, reactive power, and accumulated active and reactive electrical energy. The internal reference voltage of the REF pin (pin 5) of the V9240 metering chip is 1.188V. The metering chip is built-in with a high-frequency RC oscillator, which by default operates in a system with a power grid fundamental frequency of 50Hz, generating an RC clock of 3.2MHz. In the metering mode, this circuit is automatically turned on to generate CLK2 for use by the metering VMA, ADC, and UART interfaces.
[0030] When a POR reset, RX reset, or software reset occurs, this circuit is automatically turned on. The metering chip is built-in with a low-frequency RC oscillator that generates an RC clock (CLK3) of 32kHz for use by the RX sleep wake-up circuit and for filtering the input signals of some IO ports (pin RX). As long as the system does not lose power, this circuit keeps working.
[0031] When the metering chip sends data to the MCU, the optocoupler DM2 conducts and enters the working state, and the metering data receiving port pin (pin 1) of the MCU receives the data sent by the metering chip; when the MCU sends data to the metering chip, first a low-level signal is sent through the triode control pin (pin 77), the triode QM1 conducts and enters the working state, and the RX pin (pin 6) of the metering chip receives the data sent by the MCU.
[0032] The above are only the preferred embodiments of the present utility model and are not used to limit the present utility model. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present utility model shall be included within the protection scope of the present utility model.
Claims
1. A control circuit for controlling an asynchronous receiver and transmitter based on a GPIO chip select signal, characterized in that: It includes: A voltage sampling circuit includes a voltage dividing resistor connected in series between a power supply ground and a metering analog ground, a sampling capacitor connected in parallel with the voltage dividing resistor, and a sampling resistor for converting a voltage dividing value into a sampling voltage value; A current sampling circuit, comprising a manganese copper shunt and a resistor and a capacitor connected in parallel with the shunt, for collecting current signals; Optocoupler isolation communication circuit, including optocoupler elements and related resistors and capacitors for protection isolation and data transmission; A V9240 metering chip circuit, including an input port connected to a voltage sampling circuit and a current sampling circuit, and a UART interface for communicating with a microprocessor; The control unit controls the working state of the metering chip through the GPIO chip select signal.
2. The asynchronous receiver-transmitter control circuit based on GPIO chip select signal control according to claim 1, characterized in that: The voltage sampling circuit includes resistors RM1, RM1, RM3, RM4, RM6, RM7, RM8 and capacitor CM1; resistors RM1, RM1, RM3, RM4, RM6, RM7 and RM8 are connected in series between the power ground and the metering analog ground, resistors RM1, RM1, RM3, RM4, RM6, RM7 are voltage dividing resistors, resistor RM8 is a sampling resistor, capacitor CM1 is connected in parallel with resistor RM8, the voltage dividing value of resistor RM8 is the sampling voltage value VAP, and the sampling signal is connected to pin 2 of the metering chip UM1, which is the voltage input pin of the V9240 metering chip.
3. The asynchronous receiver-transmitter control circuit based on GPIO chip select signal control according to claim 1, characterized in that: The current sampling circuit includes a manganese copper shunt SM1, resistors RM9, RM10, RM11 and capacitors CM2, CM3, CM4; the manganese copper shunt VI is connected to the power input, ILN and ILP are connected in parallel with resistor RM10, ILN is connected to capacitor CM2 via resistor RM9, ILP is connected to capacitor CM4 via resistor RM11, the other ends of CM2 and CM4 are connected to the power ground respectively, the manganese copper shunt is connected in parallel with capacitor CM3 at the rear end via resistors RM9 and RM11, capacitor CM3 is a sampling capacitor, the currents flowing through both ends of capacitor CM3 are current sampling values IAN and IAP respectively, the current sampling value IAN is connected to pin 3 of the V9240 metering chip, which is the current N-terminal input, and the current sampling value IAP is connected to pin 4 of the V9240 metering chip, which is the current P-terminal input.
4. The asynchronous receiver-transmitter control circuit based on GPIO chip select signal control according to claim 1, characterized in that: The V9240 metering chip circuit includes capacitors CM8, CM9, CM10, magnetic beads LM1 and V9240 metering chip UM1; one end of capacitor CM7 measures analog ground, and the other end is connected to the chip power input power AVCC and V9240 metering chip 1 pin, which is the 3.3V power input pin of the V9240 metering chip; chip pin 2 is connected to resistor RM8 to connect the resistor end, which is the voltage P terminal input; chip pins 3 and 4 are respectively connected to resistors RM9 and RM11 to connect the capacitor end, and these two pins are respectively the chip current N terminal input and P terminal input; chip pin 5 is connected to capacitor CM11, The other end of capacitor CM11 is connected to the metering analog ground. Pin 5 of the chip is the on-chip reference voltage and should be connected to a 1μf decoupling capacitor before being grounded. Pin 6 of the chip is connected to pin 4 of optocoupler DM1 and pin 2 of optocoupler DM2. Pin 6 of the chip is the UART receive data input port. When the low level input duration of pin 6 of the chip is greater than 64ms, an RX reset will be generated inside the V9240 metering chip. Pin 7 of the chip is the internal digital power output interface. Externally, it is connected to a parallel circuit consisting of a ≥4.7Μf and a 0.1μF decoupling capacitor through a magnetic bead LM1, and then connected to the metering analog ground. Pin 8 of the chip is connected to the metering ground.
5. The asynchronous receiver-transmitter control circuit based on GPIO chip select signal control according to claim 1, characterized in that: The optocoupler circuit is composed of resistors RM12, RM13, RM14, RM15, RM16, RM17, capacitors CM5, CM6, CM7, transistor QM1 and optocouplers DM1 and DM2; one end of resistor RM3 is connected to the metering power supply AVCC, and the other end is connected to capacitor CM5 and pin 4 of optocoupler DM1, capacitor CM5 is connected to pins 3 and 4 of optocoupler DM1 in parallel, pin 3 of optocoupler is connected to the metering ground, pin 3 of optocoupler 1 is connected to the collector of transistor QM1 through resistor RM14, pin 2 of optocoupler is connected to capacitor CM6 and the data output port of MCU to V9240 metering chip, one end of capacitor CM6 is connected to pin 2 of optocoupler DM1; transistor QM 1 The emitter is connected to the high level DVDD, the base is connected to the control interface of the MCU to the transistor QM1, and the collector is connected to the resistor RM14; one end of the resistor RM15 is connected to the metering power supply AVCC, and the other end is connected to the 1st pin of the optocoupler DM2, and the 2nd pin of the optocoupler DM2 is connected to the data receiving input port of the V9240 metering chip; the 3rd pin of the optocoupler DM2 is connected to the capacitor CM7, and the other end of the capacitor CM7 is connected to the data input port of the MCU to the V9240 metering chip, the 4th pin of the optocoupler DM2 is connected to the resistors RM16 and RM17, the other end of RM16 is connected to the stable high level DVDD, and the other end of the resistor RM17 is connected to the data input port of the MCU to the V9240 metering chip.