Automatic transmission efficiency measuring system and method based on wireless electric energy transmission device
Technical Field
The invention belongs to the technical field of transmission efficiency measurement of wireless electric energy transmission devices, and particularly relates to an automatic transmission efficiency measurement system and method based on a wireless electric energy transmission device.
Background
The voltage and current of a transmitting end and a receiving end in a wireless electric energy transmission device usually need to be measured in efficiency, most of the existing efficiency measurement systems use a single chip as a main control chip, and a voltage sensor and a current sensor are measurement modules which display measured physical quantities on a digital tube. Although the voltage and the current can be measured in the prior art, the transmission efficiency can also be obtained through calculation, the prior art needs to manually observe and record, is relatively complicated, and cannot automatically record and process data, so that the prior art is not beneficial to a user to analyze and compare the data; secondly, the prior art uses a voltage sensor and a current sensor, and the devices have the defects of low precision, instability caused by temperature change and the like.
Disclosure of Invention
The invention aims to provide a system and a method for automatically measuring transmission efficiency based on a wireless power transmission device, which aim to solve the technical problems that the voltage and current of a transmitting end and a receiving end in the conventional wireless power transmission device are difficult to measure and the transmission efficiency needs to be calculated manually.
In order to solve the technical problems, the specific technical scheme of the automatic transmission efficiency measuring system and method based on the wireless power transmission device is as follows:
an automatic transmission efficiency measuring system based on a wireless electric energy transmission device comprises a wireless electric energy transmission device, a voltage and current measuring module and a PC (personal computer) terminal, wherein the wireless electric energy transmission device comprises a transmitting terminal and a receiving terminal, the transmitting terminal and the receiving terminal realize wireless transmission of electric energy through an electromagnetic coupling device, circuits of the transmitting terminal and the receiving terminal are respectively provided with a set of voltage and current measuring device, and the voltage and current measuring device comprises a voltage and current measuring module, a power supply module, an SWD (single wire connector) download interface, a 485 communication module and an MCU (microprogrammed control unit) module; the Hall coulometer in the voltage and current measuring module measures current, and voltage is obtained by resistance voltage division; and then data are transmitted to the MCU module through AD conversion, a data packet is transmitted to the PC end between the MCU module and the PC end through 485 communication, the PC end extracts an effective voltage current value from the received data packet through code processing according to a 485 communication protocol, and the PC end displays and stores the data through an SWD download interface.
Further, the power module comprises a 24V-to-5V voltage reduction circuit and a 5V-to-3.3V voltage reduction circuit; the 485 communication module comprises a USB-to-485 communication circuit and a 485-to-TTL communication circuit, and the USB-to-485 communication circuit and the 485-to-TTL communication circuit are connected through connectors H1 and H2.
Furthermore, the VIN port of the U1 in the 24V to 5V voltage-reducing circuit is connected to the 24V power supply, the anode of the capacitor C1 and one end of the capacitor C2, and the VOUT port of the U1 is connected to one end of the capacitor C3, the anode of the capacitor C4 and the output end; the GND port of U1, the negative electrode of C1, the other end of C2, the other end of C3 and the negative electrode of C4 are grounded; u1 is of type L7805, and the capacitance values of C1, C2, C3 and C4 are 220uF, 0.1uF and 47uF respectively.
Furthermore, the VIN port of U2 in the 5V to 3.3V voltage-reducing circuit is connected to the output terminal of the 24V to 5V voltage-reducing circuit and one end of the capacitor C5, and the VOUT port of U2 is connected to one end of the capacitor C6 and the output terminal; the GND ports of the capacitor C5, the capacitor C6 and the U2 are grounded; the model number of U2 is AM1117, and the resistance of capacitor C5 and capacitor C6 is 10 uF.
Furthermore, the JU1 of the USB to 485 communication circuit is a USB interface and is connected to the PC terminal, and the U5 of the 485 to TTL communication circuit is connected to the main control chip UF of the MCU module through UTX, URX, and PA2, wherein the PA2 port of the main control chip UF is connected to the enable terminal of the MAX485, and the operating state of the MAX485 is determined to be a transmitting state or a receiving state.
Furthermore, a UBUS port of the JU1 in the USB-to-485 communication circuit is connected with a 5V power supply, a UD-port of the JU1 is connected with a VD-port of the U3, a UD + port of the JU1 is connected with a VD + port of the U3, and a GND port of the JU1 is grounded; the GND port of the U3 is grounded, the TXD port of the U3 is connected with the DI port of the U4, the RXD port of the U3 is connected with the RO port of the U4, the V3 port of the U3 is connected with one end of a capacitor C8, and the other end of the capacitor C8 is grounded; a VCC port of U3 is connected with a 5V power supply and one end of a capacitor C9, and the other end of the capacitor C9 is grounded; the TNOW port of U3 is connected with the RE port and the DE port of U4; the VCC port of U4 is connected with 5V power supply and one end of capacitor C10, and the other end of capacitor C10 is grounded; the B port of U4 is connected with one end of a resistor R1 and the first port of a plug H1, the A port of U4 is connected with the other end of a resistor R1 and the second port of a plug H1, and the GND port of U4 is grounded; the model of U3 is CH340B, the model of U4 is MAX485, the capacitance values of capacitors C8, C9 and C10 are 0.1uF, and the resistance value of resistor R1 is 1 k.
Further, an RO port of the U5 in the 485-to-TTL communication circuit is connected with a URX port of the main control chip UF; the RE port and the DE port of the U5 are connected with the PA2 port of the main control chip UF; the DI port of U5 is connected with the UTX port of the main control chip UF; the VCC port of U5 is connected with 5V power supply and one end of capacitor C11, and the other end of capacitor C11 is grounded; the B port of U5 is connected with one end of a resistor R4 and the first port of a plug H2; the A port of the U5 is connected with the other end of the resistor R4 and the second port of the plug H2; the GND port of U5 is grounded; the model number of U5 is MAX485, and the capacitance value of condenser C11 is 0.1uF, and the resistance of resistance R4 is 1K.
Further, the model of the main control chip UF is STM8L151F3-TSS020, a first port of J1 is connected to a power supply VCC, a SWIN port of J1 is connected to a PA0 port of the main control chip UF, and an NRST port of J1 is connected to a PA1 port of the main control chip UF; ports PB2 and PB1 of the main control chip UF are connected with ADC1 and ADC2 respectively; j1 is SWD.
Further, a first port of the P2 in the current measuring circuit is connected with a 5V power supply; the second port of the P2 is grounded, the third port of the P2 is connected with a wireless power transmission device, and the fourth port of the P2 is connected with the ADC 1; the first port Voltage-in of the P3 in the Voltage measuring circuit is connected with one end of a resistor R2, and the second port of the P3 is grounded; the other end of the resistor R2 is connected with the ADC2, one end of the capacitor C7 and one end of the resistor R3; the other end of the resistor R3 and the other end of the capacitor C7 are grounded; the resistance of the resistor R2 is 10K, the resistance of the resistor R3 is 1K, and the capacitance of the capacitor C7 is 0.1 uF.
The invention also discloses a transmission efficiency automatic measurement method based on the wireless electric energy transmission device, which comprises the following steps:
firstly, creating a serial port object and initializing a serial port number and a baud rate;
secondly, converting the character string instruction of the read data into a byte form, and sending the instruction to a voltage and current measuring module;
thirdly, the voltage and current device returns a data packet to the PC end, and effective data bits in the data packet comprise measured voltage values and current values;
fourthly, verifying the equipment number by the serial port and receiving the data packet;
fifthly, converting the received data packet into a character string form;
sixthly, dividing character strings according to a communication protocol, and dividing effective data bits which represent voltage and current in the character strings;
and seventhly, analyzing the data, converting the data into decimal numbers, calculating to obtain input power, output power and transmission efficiency, and displaying and storing the data at the PC terminal.
The automatic transmission efficiency measuring system and method based on the wireless power transmission device have the following advantages that: the invention adopts a serial port communication mode to immediately send and store the measured and collected data to the PC terminal, and uses the code to automatically calculate the power and the transmission efficiency, thereby realizing the automatic recording and processing of the data, being beneficial to the analysis, comparison and storage of the data by a user, and in addition, the invention uses the high-precision Hall coulometer to measure the data, thereby improving the accuracy and the stability of the system.
Drawings
FIG. 1 is a schematic diagram of the operation of an automatic measurement system of the present invention;
FIG. 2 is a block diagram of a voltage and current measuring device according to the present invention;
FIG. 3 is a schematic diagram of a 24V to 5V step-down circuit of the present invention;
FIG. 4 is a schematic diagram of a 5V to 3.3V step-down circuit of the present invention;
FIG. 5 is a schematic diagram of a USB to 485 communication circuit of the present invention;
FIG. 6 is a schematic diagram of a 485-to-TTL communication circuit according to the present invention;
FIG. 7 is a schematic diagram of a main control chip and an SWD download interface circuit according to the present invention;
FIG. 8 is a schematic diagram of a current measurement circuit of the present invention;
FIG. 9 is a schematic diagram of a voltage measurement circuit of the present invention;
fig. 10 is a flowchart of the procedure for acquiring and processing data by the PC according to the present invention.
Detailed Description
In order to better understand the purpose, structure and function of the present invention, an automatic transmission efficiency measuring system and method based on a wireless power transmission device according to the present invention will be described in detail with reference to the accompanying drawings.
The automatic transmission efficiency measuring system based on the wireless power transmission device comprises the wireless power transmission device, a voltage and current measuring module and a PC (personal computer) terminal, and a working flow chart is shown as 1. First, the wireless power transmission device is composed of a transmitting end and a receiving end, and wireless transmission of power is realized between the transmitting end and the receiving end through an electromagnetic coupling device, so that power supply to a load is realized.
Each of the transmitting terminal and the receiving terminal has a set of voltage and current measuring device, as shown in fig. 2, each of the voltage and current measuring devices is composed of a voltage and current measuring module, a power supply module, an SWD download interface, a 485 communication module, and an MCU module. The Hall coulometer in the voltage and current measuring module measures current, and the voltage is obtained by dividing the voltage through resistors; and then, data are transmitted to an MCU module which takes STM8L151F3 as a main control chip through AD conversion, a data packet is transmitted to a PC end through 485 communication between the MCU module and the PC end, the PC end extracts an effective voltage current value from the received data packet through code processing according to a 485 communication protocol, and the PC end displays and stores the data through an SWD download interface.
The power module comprises a 24V-to-5V voltage reduction circuit and a 5V-to-3.3V voltage reduction circuit. As shown in fig. 3, the VIN port of U1 in the 24V to 5V voltage-reducing circuit is connected to the 24V power supply, the positive electrode of the capacitor C1 and one end of the capacitor C2, and the VOUT port of U1 is connected to one end of the capacitor C3, the positive electrode of the capacitor C4 and the output terminal. The GND port of U1, the negative terminal of C1, the other end of C2, the other end of C3, and the negative terminal of C4 are grounded. U1 is of type L7805, and the capacitance values of C1, C2, C3 and C4 are 220uF, 0.1uF and 47uF respectively.
As shown in fig. 4, the VIN port of U2 in the 5V to 3.3V buck circuit is connected to the output terminal of the 24V to 5V buck circuit and one terminal of the capacitor C5, and the VOUT port of U2 is connected to one terminal of the capacitor C6 and the output terminal. The GND ports of the capacitor C5, the capacitor C6 and the U2 are grounded. The model number of U2 is AM1117, and the resistance of capacitor C5 and capacitor C6 is 10 uF.
The 485 communication module consists of two parts, namely a USB-to-485 communication circuit and a 485-to-TTL communication circuit, which are connected through connectors H1 and H2 and are communication channels for communicating the current and voltage measuring device and the PC end. The JU1 is a USB interface and is connected to the PC end, the U5 is connected with the main control chip UF of the MCU module through UTX, URX and PA2, wherein the PA2 port of the main control chip UF is connected with the enable end of MAX485, and the working state of the MAX485 is determined to be a transmitting state or a receiving state. As shown in FIG. 5, the UBUS port of JU1 in the USB to 485 communication circuit is connected with a 5V power supply, the UD-port of JU1 is connected with the VD-port of U3, the UD + port of JU1 is connected with the VD + port of U3, and the GND port of JU1 is grounded. The GND port of U3 is grounded, the TXD port of U3 is connected with the DI port of U4, the RXD port of U3 is connected with the RO port of U4, the V3 port of U3 is connected with one end of a capacitor C8, and the other end of the capacitor C8 is grounded. The VCC port of U3 is connected to a 5V power supply and one end of a capacitor C9, and the other end of the capacitor C9 is grounded. The TNOW port of U3 connects the RE port and DE port of U4. The VCC port of U4 is connected to 5V power supply and one end of capacitor C10, and the other end of capacitor C10 is grounded. The B port of U4 is connected to one end of resistor R1 and the first port of plug H1, the a port of U4 is connected to the other end of resistor R1 and the second port of plug H1, and the GND port of U4 is grounded. The model of U3 is CH340B, the model of U4 is MAX485, the capacitance values of capacitors C8, C9 and C10 are 0.1uF, and the resistance value of resistor R1 is 1 k.
As shown in fig. 6, the RO port of U5 in the 485-to-TTL communication circuit is connected to the URX port of the main control chip UF. The RE port and DE port of U5 are connected with PA2 port of the main control chip UF. The DI port of U5 is connected to the UTX port of main control chip UF. The VCC port of U5 is connected to 5V power supply and one end of capacitor C11, and the other end of capacitor C11 is grounded. The B port of U5 connects one end of resistor R4 and the first port of plug H2. The A port of U5 is connected to the other end of resistor R4 and the second port of plug H2. The GND port of U5 is connected to ground. The model number of U5 is MAX 485. The capacitance of the capacitor C11 is 0.1uF, and the resistance of the resistor R4 is 1K.
As shown in fig. 7, the model of the main control chip UF of the MCU module is STM8L151F3-TSS 020. The first port of the J1 is connected with a power supply VCC, the SWIN port of the J1 is connected with the PA0 port of the main control chip UF, and the NRST port of the J1 is connected with the PA1 port of the main control chip UF. The PB2 and PB1 ports of the main control chip UF are connected to the ADC1 and ADC2, respectively. J1 is SWD.
The current measuring circuit uses a Hall coulometer, and the voltage measuring circuit adopts a resistance voltage division mode, wherein P3 represents any one end circuit of a transmitting end and a receiving end in the wireless power transmission device. In the figure, Current-in is the Current of any end of a transmitting end or a receiving end in the wireless power transmission device, and Voltage-in is the Voltage of any end of the transmitting end or the receiving end in the wireless power transmission device. As shown in fig. 8, the first port of P2 is connected to a 5V power supply. The second port of the P2 is grounded, the third port of the P2 is connected with a wireless power transmission device, and the fourth port of the P2 is connected with the ADC 1. As shown in fig. 9, the first port Voltage-in of P3 is connected to one end of the resistor R2, and the second port of P3 is grounded. The other end of the resistor R2 is connected to the ADC2, one end of the capacitor C7, and one end of the resistor R3. The other end of the resistor R3 and the other end of the capacitor C7 are grounded. The resistance of the resistor R2 is 10K, the resistance of the resistor R3 is 1K, and the capacitance of the capacitor C7 is 0.1 uF.
As shown in fig. 10, a flow chart of the procedure for acquiring and processing data at the PC side is shown. Firstly, creating a serial port object and initializing a serial port number and a baud rate; secondly, converting the character string instruction of the read data into a byte form, and sending the instruction to a voltage and current measuring module; thirdly, the voltage and current device returns a data packet to the PC end, and effective data bits in the data packet comprise measured voltage values and current values; fourthly, verifying the equipment number by the serial port and receiving the data packet; fifthly, converting the received data packet into a character string form; sixthly, dividing character strings according to a communication protocol, and dividing effective data bits which represent voltage and current in the character strings; and seventhly, analyzing the data, converting the data into decimal numbers, calculating to obtain input power, output power and transmission efficiency, and displaying and storing the data at the PC terminal.
It is to be understood that the present invention has been described with reference to certain embodiments, and that various changes in the features and embodiments, or equivalent substitutions may be made therein by those skilled in the art without departing from the spirit and scope of the invention. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the invention without departing from the essential scope thereof. Therefore, it is intended that the invention not be limited to the particular embodiment disclosed, but that the invention will include all embodiments falling within the scope of the appended claims.