Over-current and over-voltage judgment method and circuit based on current and voltage sampling and charging pile

Through the overcurrent and overvoltage judgment method based on current voltage sampling, the problem of high current and voltage monitoring costs in the prior art is solved, and a lower cost monitoring method is realized, ensuring the accuracy and economicality of monitoring.

CN120064760APending Publication Date: 2025-05-30DONGFENG MOTOR CO LTD DONGFENG NISSAN PASSENGER VEHICLE CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510182030.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-19
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In the prior art, the cost of using the BL0942 chip for current and voltage monitoring is relatively high, and it is necessary to propose a lower-cost monitoring method.

Method used

The overcurrent and overvoltage judgment method based on current voltage sampling is adopted, and the voltage analog signal is obtained, analog-to-digital conversion is performed, the actual values ​​of the current and voltage are calculated, and whether it is overcurrent or overvoltage is judged through accumulation calculation.

Benefits of technology

It realizes lower cost monitoring of current and voltage, reduces the overall cost of the system, and ensures the accuracy and effectiveness of monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120064760A_ABST
    Figure CN120064760A_ABST
Patent Text Reader

Abstract

The invention provides an overcurrent and overvoltage judgment method based on current and voltage sampling, a protection circuit and a charging pile. The method comprises the steps that a second voltage actual value is judged in each sampling period, if the absolute value of the second voltage actual value is larger than a preset voltage threshold value, accumulation calculation is conducted on the square of the second voltage actual value, accumulation calculation is conducted on the square of a first current actual value, and 1 is added to a sampling period value; calculating a first current effective value according to the accumulated value of the square of the first current actual value, and calculating a second voltage effective value according to the accumulated value of the square of the second voltage actual value; and judging according to the first current effective value and the second voltage effective value. The overcurrent and overvoltage judgment method based on current and voltage sampling solves the technical problem that in the prior art, the cost is high when a BL0942 chip is adopted for current and voltage monitoring, and the overcurrent and overvoltage judgment method based on current and voltage sampling is adopted to provide a mode for monitoring current and voltage with lower cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicles, and particularly to an over-current and over-voltage judgment method, a protection circuit and a charging pile based on current and voltage sampling. Background Art

[0002] In the prior art, electric vehicles need to be charged by a charging pile, and the charging pile needs to monitor over-voltage, over-current and other situations during the charging process.

[0003] In the prior art, there is a method of monitoring current and voltage by using a BL0942 chip. Specifically, the voltage and current input from the AC power grid end to the charging pile are collected, and through the calculation of the internal metering IC chip, the calculated result is transmitted to the MCU in the form of serial communication to transmit the digital value of the data, so that the MCU can directly communicate and read the voltage and current ADC signals. However, the cost of using the BL0942 chip to monitor current and voltage is relatively high, and it is necessary to propose a method of monitoring current and voltage with a lower cost. Summary of the Invention

[0004] Based on the above problems, the present invention proposes an over-current and over-voltage judgment method based on current and voltage sampling, which is characterized by including:

[0005] Obtain a first voltage analog signal and a second voltage analog signal, and convert the first voltage analog signal and the second voltage analog signal into a first voltage value and a second voltage value through analog-to-digital conversion;

[0006] Find a first current value corresponding to the first voltage value, calculate a first actual current value according to the first current value, and calculate a second actual voltage value according to the second voltage value;

[0007] Judge the second actual voltage value in each sampling period. If the absolute value of the second actual voltage value is greater than a preset voltage threshold, accumulate and calculate the square of the second actual voltage value, accumulate and calculate the square of the first actual current value, and add 1 to the sampling period value, and repeat the accumulation calculation until the absolute value of the second actual voltage value is less than the preset voltage threshold;

[0008] Calculate a first effective current value according to the accumulated value of the square of the first actual current value, and calculate a second effective voltage value according to the accumulated value of the square of the second actual voltage value;

[0009] Judge whether there is over-current according to the first effective current value, and judge whether there is over-voltage according to the second effective voltage value.

[0010] In addition, the finding of the first current value corresponding to the first voltage value and the calculation of the first actual current value according to the first current value include:

[0011] Calculate the first current value corresponding to the first voltage value according to the circuit that provides the first voltage analog signal, and calculate the actual first current value I according to the following formula ac :

[0012] I ac = k 2 * ADC_I ac + b 2

[0013] where ADC_I ac is the first current value, and k 2 , b 2 are the current sampling coefficients respectively, and the current sampling coefficients are set according to the parameter configuration of the circuit.

[0014] In addition, calculating the effective value of the first current according to the accumulated value of the square of the actual first current value includes:

[0015]

[0016] where I rms is the effective value of the first current, N is the sampling period value, and i is the counting variable.

[0017] In addition, calculating the actual second voltage value according to the second voltage value includes:

[0018] Calculate the actual second voltage value U ac :

[0019] U ac = k 1 * ADC_U ac + b 1

[0020] where ADC_U ac is the second voltage value, and k 1 , b 1 are the voltage sampling coefficients respectively, and the voltage sampling coefficients are set according to the parameter configuration of the circuit.

[0021] In addition, calculating the effective value of the second voltage according to the accumulated value of the square of the actual second voltage value includes:

[0022]

[0023] where U rms is the effective value of the second voltage, N is the sampling period value, and i is the counting variable.

[0024] In addition, determining whether there is overcurrent according to the effective value of the first current and determining whether there is overvoltage according to the effective value of the second voltage includes:

[0025] Within a preset time period, if the effective value of the first current continuously exceeds the current protection threshold, overcurrent is determined; if the effective value of the second voltage continuously exceeds the voltage protection threshold, overvoltage is determined.

[0026] The present invention also provides an overcurrent and overvoltage protection circuit based on current and voltage sampling, which adopts the overcurrent and overvoltage determination method based on current and voltage sampling described in any one of the above, and includes:

[0027] A current sampling circuit, a voltage sampling circuit, an arithmetic processor, and a microcontroller;

[0028] The first end of the current sampling circuit is connected to the external power supply network, and the second end is connected to the first input channel group of the arithmetic processor. The first end of the voltage sampling circuit is connected to the external power supply network, and the second end is connected to the second input channel group of the arithmetic processor. The first output end and the second output end of the arithmetic processor are respectively connected to the first input end and the second input end of the microcontroller, and the output end of the microcontroller is connected to the external control device.

[0029] In addition, the current sampling circuit includes: a current transformer, a first sampling resistor, a first feedback resistor, a second feedback resistor, a first bias resistor, and a second bias resistor;

[0030] The input side of the current transformer is connected in series between the current input end and the current output end of the power supply network. After the start end and the end of the output side of the current transformer are connected in series with the first sampling resistor, the start end is connected to the reverse input end of the first input channel group of the arithmetic processor after being connected to the second feedback resistor, and the end is connected to the same input end of the first input channel group after being connected in series with the first bias resistor. Both ends of the first feedback resistor are respectively connected to the reverse input end and the output end of the first input channel group, one end of the second bias resistor is connected to the first bias resistor, and the other end is grounded.

[0031] In addition, the voltage sampling circuit includes: a group of current limiting resistors, a voltage transformer, a second sampling resistor, a third feedback resistor, a fourth feedback resistor, a third bias resistor, and a fourth bias resistor;

[0032] The live wire end of the voltage of the power supply network is connected in series with a group of current limiting resistors and then is connected across the input side of the voltage transformer with the neutral wire. After the start end and the end of the output side of the voltage transformer are connected in series with the second sampling resistor, the start end is connected to the same input end of the second channel group after being connected in series with the third bias resistor, and the end is connected to the reverse input end of the second channel group after being connected in series with the third feedback resistor. Both ends of the fourth feedback resistor are respectively connected to the reverse input end and the output end of the second channel group, one end of the fourth bias resistor is connected to the third bias resistor, and the other end is grounded.

[0033] The present invention also provides a charging pile, which adopts the overcurrent and overvoltage protection circuit based on current and voltage sampling described in any one of the above.

[0034] The present invention solves the technical problem of high cost in current and voltage monitoring by using the BL0942 chip in the prior art. By adopting the over-current and over-voltage judgment method based on current and voltage sampling proposed in this embodiment, a lower-cost method for monitoring current and voltage is provided. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 is a flowchart of the over-current and over-voltage judgment method based on current and voltage sampling provided by an embodiment of the present invention;

[0036] Figure 2 is a circuit schematic diagram of the over-current and over-voltage protection circuit based on current and voltage sampling provided by an embodiment of the present invention;

[0037] Figure 3 is a circuit schematic diagram of the over-current and over-voltage protection circuit based on current and voltage sampling provided by an embodiment of the present invention;

[0038] Figure 4 is a circuit schematic diagram of the prior art. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0039] The following further describes the present invention in detail in combination with specific implementation schemes and drawings. It only intends to elaborate on the specific implementation schemes of the present invention and does not impose any limitation on the present invention. The protection scope of the present invention is subject to the claims.

[0040] Referring to Figure 1 , the present invention proposes an over-current and over-voltage judgment method based on current and voltage sampling, including:

[0041] Step S001: Obtain a first voltage analog signal and a second voltage analog signal, and perform analog-to-digital conversion on the first voltage analog signal and the second voltage analog signal to obtain a first voltage value and a second voltage value;

[0042] Step S002: Find a first current value corresponding to the first voltage value, calculate an actual first current value according to the first current value, and calculate an actual second voltage value according to the second voltage value;

[0043] Step S003: In each sampling period, judge the actual second voltage value. If the absolute value of the actual second voltage value is greater than a preset voltage threshold, accumulate the square of the actual second voltage value, accumulate the square of the actual first current value, and increment the sampling period value by 1. Repeat the accumulation calculation until the absolute value of the actual second voltage value is less than the preset voltage threshold;

[0044] Step S004: Calculate the first current effective value based on the accumulated value of the square of the first actual current value, and calculate the second voltage effective value based on the accumulated value of the square of the second actual voltage value.

[0045] Step S005: Determine whether there is overcurrent based on the first current effective value, and determine whether there is overvoltage based on the second voltage effective value.

[0046] Figure 4 The following shows the circuit diagram principle of using the BL0942 chip to monitor current and voltage in the prior art.

[0047] The BL0942 chip is a calibration-free AC power metering chip.

[0048] The metering IC chip is the BL0942 chip.

[0049] MCU stands for Microcontroller Unit, that is, the microcontroller unit, also called the single-chip microcomputer.

[0050] ADC signal: Convert the analog signal to a digital signal.

[0051] Refer to Figure 2 , in the present invention, in step S001, first obtain the first voltage analog signal and the second voltage analog signal. The first voltage analog signal is obtained from the ADC1 of the Figure 2 MCU, and the second voltage analog signal is obtained from the ADC2 of the Figure 2 MCU. Since the L OUT and L IN at the leftmost input signal terminal in Figure 2 collect current signals, in step S002, it is necessary to first find the first current value corresponding to the first voltage value, and then calculate the first actual current value based on the first current value. When converting the first voltage value to the first current value, it needs to be calculated according to the specific circuit composition between L OUT, L IN and ADC1, such as calculating according to the values of resistors R15, R18, etc. For example, a voltage of 2V is calculated from a current of 10A. Since the first voltage analog signal and the second voltage analog signal obtained at ADC1 and ADC2 are analog signals, rather than the true values during acquisition, it is necessary to calculate the first actual current value and the second actual voltage value.

[0052] Optionally, the first actual current value I ac can be calculated according to the following formula:

[0053] I ac = k 2 *ADC_I ac + b 2

[0054] Where ADC_Iac is the first current value, k 2 , b 2 are the current sampling coefficients respectively, and the current sampling coefficients are set according to the parameter configuration of the circuit.

[0055] Optionally, the actual value of the second voltage U can be calculated according to the following formula ac :

[0056] U ac = k 1 * ADC_U ac + b 1

[0057] where ADC_U ac is the second voltage value, k 1 , b 1 are the voltage sampling coefficients respectively, and the voltage sampling coefficients are set according to the parameter configuration of the circuit.

[0058] In step S003, the actual value of the second voltage is judged in each sampling period. If the absolute value of the actual value of the second voltage is greater than the preset voltage threshold, the square of the actual value of the second voltage is accumulated and calculated, the square of the actual value of the first current is accumulated and calculated, and the sampling period value is incremented by 1. The accumulation calculation is repeated until the absolute value of the actual value of the second voltage is less than the preset voltage threshold;

[0059] For example, the following specific method is used for judgment:

[0060] Set the MCU sampling period to T s , and set T s to be much smaller than the input voltage, that is, the period of the actual value of the second voltage U ac ( Figure 1 the input voltage at the L and N input terminals in ac ) to ensure that the sampled voltage signal can completely reflect the information of the input voltage. The input voltage U ac is judged in each sampling period. When the absolute value of U th is less than the preset voltage threshold U th (for example, U ac = 10V), the sampling period value N is cleared to zero. When the absolute value of U th is greater than U and are accumulated in each sampling period, and the accumulation is continued until the absolute value of U ac is less than U th . Then, the accumulated values of N and and are substituted into the formula to calculate the effective values of voltage and current. After the calculation is completed, N and the accumulated value are cleared to zero, and so on.

[0061] In step S004, the first current effective value is calculated according to the accumulated value of the square of the first actual current value, and the second voltage effective value is calculated according to the accumulated value of the square of the second actual voltage value;

[0062]

[0063] where, I rms is the first current effective value, N is the sampling period value, and i is the counting variable.

[0064]

[0065] where, U rms is the second voltage effective value, N is the sampling period value, and i is the counting variable.

[0066] In step S005, it is judged whether there is overcurrent according to the first current effective value, and it is judged whether there is overvoltage according to the second voltage effective value.

[0067] Within a preset time period, if the first current effective value continuously exceeds the current protection threshold, it is determined that there is overcurrent; if the second voltage effective value continuously exceeds the voltage protection threshold, it is determined that there is overvoltage.

[0068] Taking the second voltage effective value as an example, assuming that the voltage protection threshold is a and the preset time period (i.e., delay) is b, then within the continuous b time, if the second voltage effective value is always greater than the voltage protection threshold, it is considered that there is overvoltage, and overvoltage protection needs to be triggered. The output end of the MCU outputs a control signal to an external control device, such as a relay.

[0069] In this embodiment, since the sampled current and voltage are directly processed and then transmitted to the microcontroller MCU, and all the metering parts are completed in the MCU, the use of the BL0942 chip is omitted, thus saving costs.

[0070] This embodiment solves the technical problem of high cost in the prior art for monitoring current and voltage by using the BL0942 chip. By adopting the overcurrent and overvoltage judgment method based on current and voltage sampling proposed in this embodiment, a lower-cost method for monitoring current and voltage is provided.

[0071] In one of the embodiments, finding the first current value corresponding to the first voltage value and calculating the first actual current value according to the first current value includes:

[0072] Calculating the first current value corresponding to the first voltage value according to the circuit providing the first voltage analog signal, and calculating the first actual current value I ac :

[0073] I ac = k 2*ADC_I ac +b 2

[0074] Among them, ADC_I ac is the first current value, k 2 , b 2 are the current sampling coefficients respectively, and the current sampling coefficients are set according to the parameter configuration of the circuit.

[0075] Since Figure 2 the L OUT and L IN at the leftmost input signal terminal in collect current signals, it is necessary to first find the first current value corresponding to the first voltage value, and then the actual first current value can be calculated based on the first current value. When converting the first voltage value to the first current value, it needs to be calculated according to the specific circuit composition between L OUT, L IN and ADC1, such as calculating according to the values of resistors R15, R18, etc. For example, a voltage of 2V is calculated for a current of 10A. Since the first voltage analog signal and the second voltage analog signal obtained at ADC1 and ADC2 are analog signals, not the true values during acquisition, it is necessary to calculate the actual first current value and the actual second voltage value.

[0076] By calculating the actual first current value, the subsequent calculation of the effective value of the first current can be performed.

[0077] In one of the embodiments, the calculation of the effective value of the first current according to the accumulated value of the square of the actual first current value includes:

[0078]

[0079] Among them, I rms is the effective value of the first current, N is the sampling period value, and i is the counting variable.

[0080] By calculating the effective value of the first current, it is possible to determine whether there is an overcurrent according to the effective value of the first current.

[0081] In one of the embodiments, the calculation of the actual second voltage value according to the second voltage value includes:

[0082] Calculate the actual second voltage value U ac according to the following formula:

[0083] U ac = k 1 *ADC_U ac +b 1

[0084] Among them, ADC_U ac is the second voltage value, k 1 , b 1They are voltage sampling coefficients, which are set according to the parameter configuration of the circuit.

[0085] By calculating the actual value of the second voltage, the effective value of the second voltage can be calculated.

[0086] In one of the embodiments, the calculating the effective value of the second voltage according to the accumulated value of the square of the actual value of the second voltage includes:

[0087]

[0088] Wherein, U rms is the effective value of the second voltage, N is the sampling period value, and i is the counting variable.

[0089] By calculating the effective value of the second voltage, the overvoltage can be judged according to the effective value of the second voltage.

[0090] In one of the embodiments, the judging whether there is overcurrent according to the effective value of the first current and judging whether there is overvoltage according to the effective value of the second voltage includes:

[0091] Within a preset time period, if the effective value of the first current continuously exceeds the current protection threshold, it is determined that there is overcurrent; if the effective value of the second voltage continuously exceeds the voltage protection threshold, it is determined that there is overvoltage.

[0092] Referring to Figure 2 , the present invention also provides an overcurrent and overvoltage protection circuit based on current and voltage sampling, adopting the overcurrent and overvoltage judging method based on current and voltage sampling described in any one of the above, including:

[0093] A current sampling circuit 1, a voltage sampling circuit 2, an operation processor U1, and a microcontroller U2;

[0094] The first end of the current sampling circuit 1 is connected to the external power supply network, and the second end is connected to the first input channel group IN / A of the operation processor U1. The first end of the voltage sampling circuit 2 is connected to the external power supply network, and the second end is connected to the second input channel group IN / B of the operation processor U1. The first output end and the second output end of the operation processor U1 are respectively connected to the first input end and the second input end of the microcontroller U2, and the output end of the microcontroller U2 is connected to the external control device.

[0095] The original current and voltage signals are respectively sampled by the current sampling circuit 1 and the voltage sampling circuit 2 and sent to the microcontroller U2. Optionally, the microcontroller U2 is an MCU.

[0096] The operation processor U1 outputs a first voltage analog signal and a second voltage analog signal to the microcontroller U2, and the microcontroller U2 executes the following steps:

[0097] Step S001: Obtain a first voltage analog signal and a second voltage analog signal, and convert the first voltage analog signal and the second voltage analog signal into a first voltage value and a second voltage value through analog-to-digital conversion;

[0098] Step S002: Look up a first current value corresponding to the first voltage value, calculate an actual first current value based on the first current value, and calculate an actual second voltage value based on the second voltage value;

[0099] Step S003: In each sampling period, judge the actual second voltage value. If the absolute value of the actual second voltage value is greater than a preset voltage threshold, accumulate the square of the actual second voltage value, accumulate the square of the actual first current value, and increment the sampling period value by 1. Repeat the accumulation calculation until the absolute value of the actual second voltage value is less than the preset voltage threshold;

[0100] Step S004: Calculate an effective first current value based on the accumulated value of the square of the actual first current value, and calculate an effective second voltage value based on the accumulated value of the square of the actual second voltage value;

[0101] Step S005: Judge whether there is overcurrent according to the effective first current value, and judge whether there is overvoltage according to the effective second voltage value.

[0102] The overcurrent and overvoltage protection circuit for current and voltage sampling is arranged inside the charging bin of the charging pile.

[0103] Optionally, this circuit is a basic circuit schematic diagram. On this basis, a filter circuit can be added to the current and voltage signals collected by it.

[0104] This embodiment solves the technical problem of the relatively high cost of monitoring current and voltage in the prior art by using the BL0942 chip. By using the overcurrent and overvoltage protection circuit based on current and voltage sampling proposed in this embodiment, a method for monitoring current and voltage with lower cost is provided.

[0105] In one of the embodiments, the current sampling circuit 1 includes: a current transformer HT2, a first sampling resistor R15, a first feedback resistor R11, a second feedback resistor R12, a first bias resistor R18, and a second bias resistor R20;

[0106] The input side of the current transformer HT2 is connected in series between the current input terminal L IN and the current output terminal L OUT of the power supply network. After the start end and the end of the output side of the current transformer HT2 are connected in series with the first sampling resistor R15, the start end is connected to the second feedback resistor R12 and then connected to the inverting input terminal -IN / A of the first input channel group IN / A of the operation processor U1. The end is connected in series with the first bias resistor R18 and then connected to the non-inverting input terminal +IN / A of the first input channel group IN / A. Both ends of the first feedback resistor R11 are respectively connected to the inverting input terminal -IN / A of the first input channel group IN / A and the output terminal OUT / A of the first input channel group -IN / A. One end of the second bias resistor R20 is connected to the first bias resistor R18, and the other end is grounded.

[0107] The primary side of the current transformer HT2 is connected to the measured power supply network, i.e., the large current circuit, and the secondary side is connected to the measurement and control circuit, realizing the electrical isolation between the primary circuit and the secondary circuit. It prevents the high voltage and large current on the primary side from directly entering the measurement and control circuit, avoids the damage of strong electricity to the subsequent circuit, improves the safety and reliability of the whole circuit, and ensures the stable operation of electronic components.

[0108] Optionally, the operation processor U1 is an operational amplifier, which plays a role in differential amplification. After the current signal passes through R15, a voltage difference is formed, and the voltage difference is finally input to different pins of the operational amplifier. Therefore, the first input channel group IN / A of the operational amplifier receives the voltage analog signal. Due to the amplification effect of the operational amplifier, that is, the effect of amplifying the weak voltage signal, the output first voltage analog signal is a voltage value larger than the voltage difference across R15 to the microcontroller U2. The operational amplifier outputs a sine wave. When the microcontroller U2 receives it, it obtains the voltage signal by dotting.

[0109] One end of R15 is grounded, so the sine wave of the voltage across the resistor R15 has both positive and negative half axes. Since the microcontroller U2 (i.e., MCU) can only recognize the voltage on the positive half axis, it is necessary to set the first bias resistor R18 and the second bias resistor R20 to raise the voltage value, that is, to ensure that the input of +IN / A is a positive voltage. Vref1 provides the voltage reference.

[0110] Functions of the first bias resistor and the second bias resistor: Provide a bias voltage for the whole circuit, such as providing a bias for an AC voltage with a dynamic range of -36mV to +36mV. In this way, the final dynamic range is -36mV + Vref1 to +36mV + Vref1.

[0111] Function of the first sampling resistor: Used to convert the current induced by the current transformer into voltage.

[0112] Functions of the first feedback resistor and the second feedback resistor: used to configure the amplification factor of the operational amplifier.

[0113] The current sampling circuit 1 converts the sampled current into a voltage, and it is a positive voltage value for the operational amplifier.

[0114] In one of the embodiments, the voltage sampling circuit 2 includes: a set of current-limiting resistors, a voltage transformer L2, a second sampling resistor R28, a third feedback resistor R29, a fourth feedback resistor R30, a third bias resistor R21, and a fourth bias resistor R22;

[0115] The live wire end L of the voltage of the power supply network is connected in series with a set of current-limiting resistors and then is bridged across the input side of the voltage transformer L2 with the neutral wire N. After a second sampling resistor R28 is connected in series between the start end and the end of the output side of the voltage transformer L2, the start end is connected in series with the third bias resistor R21 and then connected to the non-inverting input terminal +IN / B of the second channel group IN / B, and the end is connected in series with the third feedback resistor R29 and then connected to the inverting input terminal -IN / B of the second channel group IN / B. Both ends of the fourth feedback resistor R30 are respectively connected to the inverting input terminal -IN / B and the output terminal OUT / B of the second channel group IN / B, and one end of the fourth bias resistor R22 is connected to the third bias resistor R21 and the other end is grounded.

[0116] A set of current-limiting resistors, such as R23, R24, R25, R26, and R27, are connected in series.

[0117] The voltage transformer L2 plays a role of isolation and at the same time plays a role of voltage conversion. In order to meet the input range value of the voltage transformer L2, it is necessary to perform resistor voltage division on the collected original voltage to play a role of voltage reduction. After voltage reduction through a set of current-limiting resistors, the second sampling resistor R28 is used for voltage division. At this time, different voltage values are formed at both ends of the second sampling resistor R28. One end of the second sampling resistor R28 is grounded, so that the voltage formed at both ends of the second sampling resistor R28 has values on both the positive and negative half axes.

[0118] Functions of a set of current-limiting resistors: to limit the working current of the primary side of the voltage transformer L2 within 2 mA.

[0119] Functions of the third feedback resistor and the fourth feedback resistor: used to configure the amplification factor of the operational amplifier. Since the voltage after passing through the voltage transformer L2 needs to be amplified, feedback resistors are required to amplify the voltage.

[0120] Functions of the third bias resistor and the fourth bias resistor: used to provide bias for the AC voltage, such as providing bias for an AC voltage with a dynamic range of -77.4 mV to +77.4 mV. In this way, the final dynamic range is -77.4 mV + Vref2 to +77.4 mV + Vref2.

[0121] Since the MCU can only recognize positive voltages, it is necessary to raise the voltage signals in the negative half-cycle of the voltage signal. The functions of Vref1 and Vref2 are both to raise the signals in the negative half-cycle of the sine wave so that the signals in the negative half-cycle of 220V can be collected.

[0122] The voltage sampling circuit is used to make the sampled voltage signal meet the input requirements of the operational amplifier.

[0123] Refer to Figure 3 , in one of the embodiments, a first filter circuit and a second filter circuit are added to the current sampling circuit 1. The first filter circuit includes: capacitor C5 and capacitor C6. One end of capacitor C5 is connected to the access point between resistor R12 and the inverting input terminal -IN / A of the first channel group IN / A. The other end of capacitor C5 is connected to one end of capacitor C6. The other end of capacitor C6 is connected between resistor R18 and the non-inverting input terminal +IN / A. A ground connection is made between capacitor C5 and capacitor C6.

[0124] The second filter circuit includes: connecting one end of capacitor C7 to the power supply VCC terminal of U1, and the other end of capacitor C7 is grounded.

[0125] The filter circuit filters out noise interference and can smooth the signal.

[0126] The present invention also provides a charging pile that uses the over-current and over-voltage protection circuit based on current and voltage sampling described in any one of the above.

[0127] This embodiment solves the technical problem of the relatively high cost of current and voltage monitoring by using the BL0942 chip in the prior art. By using the over-current and over-voltage protection circuit based on current and voltage sampling proposed in this embodiment, a lower-cost method for monitoring current and voltage is provided.

[0128] The above are only the principles and preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, based on the principles of the present invention, several other variations can also be made, which should also be regarded as the protection scope of the present invention.

Claims

1. A method for judging overcurrent and overvoltage based on current and voltage sampling, characterized in that: include: Acquire a first voltage analog signal and a second voltage analog signal, and convert the first voltage analog signal and the second voltage analog signal into a first voltage value and a second voltage value; Finding a first current value corresponding to the first voltage value, calculating a first current actual value according to the first current value, and calculating a second voltage actual value according to the second voltage value; The second voltage actual value is judged in each sampling period. If the absolute value of the second voltage actual value is greater than the preset voltage threshold, the square of the second voltage actual value is accumulated and calculated, the square of the first current actual value is accumulated and calculated, and the sampling period value is added by 1. The accumulation calculation is repeated until the absolute value of the second voltage actual value is less than the preset voltage threshold; Calculating the effective value of the first current according to the accumulated value of the square of the actual value of the first current, and calculating the effective value of the second voltage according to the accumulated value of the square of the actual value of the second voltage; Whether there is overcurrent is determined based on the first current effective value, and whether there is overvoltage is determined based on the second voltage effective value.

2. The over-current and over-voltage judgment method based on current and voltage sampling according to claim 1 is characterized in that: include: The step of searching for a first current value corresponding to the first voltage value and calculating the first current actual value according to the first current value comprises: The first current value corresponding to the first voltage value is calculated according to the circuit providing the first voltage analog signal, and the first current actual value I is calculated according to the following formula: ac : I ac =k2*ADC_I ac +b2 Among them, ADC_I ac is the first current value, k2 and b2 are current sampling coefficients respectively, and the current sampling coefficients are set according to the parameter configuration of the circuit.

3. The over-current and over-voltage judgment method based on current and voltage sampling according to claim 2 is characterized in that: include: The calculating the effective value of the first current according to the accumulated value of the square of the actual value of the first current comprises: Among them, I rms is the effective value of the first current, N is the sampling period value, and i is the counting variable.

4. The over-current and over-voltage judgment method based on current and voltage sampling according to claim 1 is characterized in that: include: Calculating the second voltage actual value according to the second voltage value comprises: The second voltage actual value U is calculated according to the following formula ac : IN ac =k1*ADC_U ac +b1 Among them, ADC_U ac is the second voltage value, k1 and b1 are voltage sampling coefficients respectively, and the voltage sampling coefficients are set according to the parameter configuration of the circuit.

5. The over-current and over-voltage judgment method based on current and voltage sampling according to claim 4 is characterized in that: include: Calculating the effective value of the second voltage according to the accumulated value of the square of the actual value of the second voltage comprises: Among them, U rms is the effective value of the second voltage, N is the sampling period value, and i is the counting variable.

6. The over-current and over-voltage judgment method based on current and voltage sampling according to any one of claims 1 to 5, characterized in that: include: The determining whether there is overcurrent according to the first current effective value and determining whether there is overvoltage according to the second voltage effective value comprises: Within the preset time period, if the first current effective value is continuously greater than the current protection threshold, overcurrent is determined, and if the second voltage effective value is continuously greater than the voltage protection threshold, overvoltage is determined.

7. An overcurrent and overvoltage protection circuit based on current and voltage sampling, characterized in that: The over-current and over-voltage judgment method based on current and voltage sampling as claimed in any one of claims 1 to 6 comprises: Current sampling circuit, voltage sampling circuit, operation processor and microcontroller; The first end of the current sampling circuit is connected to the external power supply network, and the second end is connected to the first input channel group of the operation processor. The first end of the voltage sampling circuit is connected to the external power supply network, and the second end is connected to the second input channel group of the operation processor. The first output end and the second output end of the operation processor are respectively connected to the first input end and the second input end of the microcontroller, and the output end of the microcontroller is connected to the external control device.

8. The over-current and over-voltage protection circuit based on current and voltage sampling according to claim 7, characterized in that: The current sampling circuit comprises: a current transformer, a first sampling resistor, a first feedback resistor, a second feedback resistor, a first bias resistor and a second bias resistor; The input side of the current transformer is connected in series between the current input end and the current output end of the power supply network. The starting end and the end of the output side of the current transformer are connected in series with the first sampling resistor, the starting end is connected to the second feedback resistor and then connected to the reverse input end of the first input channel group of the operation processor, the end is connected in series with the first bias resistor and then connected to the same-direction input end of the first input channel group, the two ends of the first feedback resistor are respectively connected to the reverse input end of the first input channel group and the output end of the first input channel group, one end of the second bias resistor is connected to the first bias resistor, and the other end is grounded.

9. The over-current and over-voltage protection circuit based on current and voltage sampling according to claim 7, characterized in that: The voltage sampling circuit comprises: a group of current limiting resistors, a voltage transformer, a second sampling resistor, a third feedback resistor, a fourth feedback resistor, a third bias resistor and a fourth bias resistor; A set of current-limiting resistors are connected in series to the live wire end of the power supply network voltage and then connected across the neutral wire by the input of the voltage transformer. A second sampling resistor is connected in series between the beginning and the end of the output side of the voltage transformer. The beginning end is connected in series with a third bias resistor and then connected to the same-direction input end of the second channel group. The end end is connected in series with a third feedback resistor and then connected to the reverse input end of the second channel group. Both ends of the fourth feedback resistor are respectively connected to the reverse input end of the second channel group and the output end of the second channel group. One end of the fourth bias resistor is connected to the third bias resistor, and the other end is grounded.

10. A charging pile, characterized in that: An over-current and over-voltage protection circuit based on current and voltage sampling as described in any one of claims 7 to 9 is adopted.