Home > Control Circuits >Protection Circuits > Amplitude and phase detection leakage protection device designed and manufactured using PIC16C711A

Amplitude and phase detection leakage protection device designed and manufactured using PIC16C711A

Source: InternetPublisher:酷到被通缉 Keywords: Leakage protector Updated: 2024/11/07

Compared with pulse type leakage protectors, amplitude and phase detection leakage protectors have the advantage of high protection sensitivity. However, how to improve the reliability and accuracy of its action under the premise of ensuring high sensitivity has become an important indicator for measuring the performance of such products. The amplitude and phase detection leakage protector was made using PIC16C711A. The field operation proved that its sensitivity, reliability and accuracy are satisfactory. Now the selection principle and working principle of CPU are explained, and friends who are proficient in PIC microcontrollers are sincerely hoped to give their advice.

This type of protector is mainly used in three-phase three-wire or three-phase four-wire low-voltage power circuits. When there is leakage current in the line or someone is electrocuted, a voltage will be induced in the -CT. Different processing methods for this signal voltage form different types of leakage protectors. For example, a pulse-type leakage protector is used to calculate only the absolute size and amplitude change of the voltage; a leakage protector that not only calculates the absolute size of the voltage, but also calculates the change value of the leakage current of a phase in the three-phase electricity through the change of the amplitude is called an amplitude-discrimination phase-discrimination type. When the change value of the leakage current in the phase is greater than 30mA (or 50mA), the leakage protector should trip and disconnect the three-phase power supply.

The amplitude and phase detection leakage protector actually measures the vector difference of two adjacent AC signals in the leakage signal. Since this information is fleeting, the performance of the selected CPU is crucial. The main reasons for choosing PIC16C711A instead of 51 series microcontroller are as follows:

1. Due to the wide operating voltage range, the CPU can work normally when the grid voltage fluctuates greatly.

2. Low cost: In addition to the CPU, A/D and watchdog circuits are also required. The total cost of choosing PIC16C711A is cheaper than that of the 51 series.

3. Since the instruction system of PIC microcontroller is single-byte, the possibility of program "runaway" is smaller than that of the instruction system with double-byte.

4. Small size and simple power supply circuit further reduce the cost of the whole machine.

The complete circuit is shown in the figure below. Relays JX and JD can realize silent operation of the AC contactor. Since the measured signal is the vector difference of two adjacent AC signals, a phase reference needs to be established in order to achieve the purpose of measuring the phase.

This circuit uses the phase of the AC working power signal as the reference. The difference between two adjacent AC signals and the phase reference is the phase difference between the two adjacent AC signals. In the figure, UIB converts the phase reference signal into a square wave signal; UIA converts the measured signal into a square wave signal. The two square wave signals are connected to the RB6 and RB7 pins of the CPU respectively. The phase difference between the two adjacent AC signals is measured using the "level change interrupt" and "timing interrupt" of the PIC microcontroller. The line leakage current is connected through plug P5, U1C realizes small signal half-wave precision rectification, and U1D realizes DC amplification. In this way, the DC voltage on capacitor C6 will be proportional to the line leakage current. PIC16C711A detects the size of the line leakage current through its internal A/D conversion.

When the line leakage current is greater than 300mA, the external AC contactor is cut off through the relay. According to the phase difference and the size of the line leakage current, the change value of the single-phase leakage current is obtained through digital vector calculation. When the change value is greater than 50mA, it means that someone is getting an electric shock and the external AC contactor must be disconnected immediately. After a delay of 20 seconds, the protector automatically closes the external AC contactor to restore the line.

The following are some details of the software:

1. System initialization

System initialization includes the setting of the I/O port, A/D, timer and interrupt of the microcontroller. A/D conversion is not allowed in the initialization program, but A/D interrupt is enabled in the "level change interrupt" of PORTB. The purpose of this is to improve the product's anti-interference ability and the accuracy of A/D conversion. The software is edited and debugged in the MPLAB software package environment. The software package requires that symbols occupy a single line and cannot be followed by a colon.

2. Level change interrupt

In PIC16C711A's PORTB, when RB4-RB7 is set as input mode, there is an important feature. When the level on these four lines changes, it can cause a CPU interrupt, which is a level change interrupt. Using this feature, the phase difference between two adjacent AC signals can be measured. For example, when the AC power signal passes through zero, the square wave signal level output by UIB will change, causing a level change interrupt. In this interrupt service subroutine, the time when this level changes will be recorded. Similarly, the interrupt service subroutine also records the time when the line leakage current signal passes through zero, and the difference between the two recorded times is the relative phase of the line leakage current signal.

3. A/D conversion

The positive change of the square wave signal level output by UIB has another important function - starting A/D conversion. In this way, the voltage on capacitor C6 is measured at a fixed time of each cycle, achieving the purpose of phase-locked measurement. It not only reduces the requirements for the rectifier and filter circuit, but also overcomes the influence of grid frequency fluctuation on the measurement. In the figure, the four LEDs are used to indicate power supply, leakage protection, electric shock protection and normal working indication respectively. S1 is the trigger test button. S2 is the leakage test button. Through the above explanations, it can be seen that the circuit makes full use of the internal resources of PIC16C711A and realizes the amplitude and phase detection functions with fewer external components.

Amplitude and phase detection leakage protection device designed and manufactured using PIC16C711A

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号