1 Hardware Design
The three main parameters that reflect the leakage action performance are: rated leakage action current (I△n), leakage action time and rated leakage non-action current (I△n0).
I△n represents the sensitivity of leakage action and is the leakage action current value of the leakage protector. The leakage action time refers to the time required for the leakage action current to be applied to the leakage protector until the circuit is cut off. I△n0 is the leakage current value that does not act as specified by the national standard to prevent the leakage protector from malfunctioning, and is usually 0.5I△n.
The method for testing the leakage current is: start applying the test current from less than 0.2I△n, and increase it linearly to I△n within 30s. If the current value at the moment of disconnection of the leakage protector is I△, when I△n0n0<I△<I△n is satisfied, the leakage current value of the leakage protector is qualified. Therefore, the uniform growth of the leakage current value tested will directly affect the accuracy of the measurement. It is difficult to increase the current value of the leakage test uniformly using the traditional manual and motor-driven voltage regulator method, and it is difficult to control the random error of the measurement. Using a single-chip microcomputer to control the leakage current value in real time, so that the leakage current increases uniformly, can effectively improve the accuracy of the measurement. Figure 1 shows the structural block diagram of the leakage protector action characteristic tester.
Figure 1 Tester block diagram
The tester is based on the ATmega32 single-chip microcomputer, and is equipped with programmable leakage current source, leakage current detection circuit, contact status monitoring circuit, keyboard, display and other peripheral devices. ATmega32 is an 8-bit microcontroller based on the enhanced AVR RISC structure, with advanced instruction set and single clock cycle instruction execution time, which is 8 to 12 times faster than the ordinary 8051 single-chip microcomputer. The operating frequency is up to 16MHz, with 32K bytes of Flash program memory, 1 hardware 16-bit timer and 2 8-bit timers, 4 PWM outputs, 8 A/D conversions, 1 full-duplex asynchronous serial port, and 32 general I/O ports. It has the advantages of low power consumption, high speed, and super strong anti-interference, and has a high cost performance among similar products.
1.1 Programmable leakage current source
The key to ensure measurement accuracy is that the programmable leakage current source can generate a uniformly changing leakage current. The leakage current source consists of a 50Hz sine wave generator and an AC digital-to-analog conversion circuit.
1.1.1 50Hz sine wave generator
The 50Hz RC sine wave oscillation circuit is composed of an operational amplifier. The amplitude of the oscillation signal is stabilized by nonlinear negative feedback. At the same time, the frequency selection circuit of the RC sine wave oscillation circuit is composed of low temperature coefficient resistors and capacitors to ensure the stability of the oscillation frequency. In order to improve the load carrying capacity, the sine wave output signal is output through a voltage follower.
1.1.2 AC digital-to-analog conversion circuit
Figure 2 AC digital-to-analog conversion circuit [page]
The AC digital-to-analog conversion circuit is the core part of the programmable leakage current source. The amplitude of the sinusoidal AC quantity is controlled by changing the digital quantity, and has good linearity. The digital-to-analog conversion circuit is composed of DAC08 08, which is a binary fast multiplication 8-bit D/A chip. The AC digital-to-analog conversion circuit is shown in Figure 2. In order to ensure the conversion from digital to sinusoidal AC analog signals, VD in the figure is a preset DC bias, which is equal to the amplitude of the output signal of the 50Hz sine wave generator.
According to the circuit shown in the figure, the following relationship can be obtained:
It can be seen from formula (5) that when the resistors R1, R4, R5, R, and Rf are fixed values, the magnitude of the output current has nothing to do with RL and is only controlled by the digital quantity. When A1, A2, ... A8 are all "1", adjust the circuit parameters to make IL = 0.5A, and when A1, A2 ... A8 are all "0", make IL = 0A. The current variation range of 0 to 0.5A fully meets the test requirements of the leakage protector currently produced in my country. In order to improve the measurement speed, under the condition of ensuring the accuracy of the simulated leakage current, the output current is divided into four gears of 50mA, 100mA, 200mA and 500mA. The selection of each gear is realized by the size of the ATmega32 switching resistor R1. In different gears, the value of the current increase is different. When the 50mA gear is selected, the current increases by 0.196mA (50mA/255); when the 500mA gear is selected, the current increases by 1.96mA (500mA/255). Therefore, it can fully meet the requirement of providing a linearly increasing leakage current for the leakage protector.
1.2 Contact status monitoring circuit
The contact status monitoring circuit is shown in Figure 3. When the moving and static contacts of the leakage protector are closed, the alternating current of L1 and L2 is rectified, filtered and stabilized, so that the photocoupler G3 is turned on, and the output of pin 2 of the inverter A is high potential. When the moving and static contacts of the leakage protector are disconnected, the photocoupler G3 is cut off, and the output of pin 2 of the inverter A is low potential, which is the moment when the leakage detection ends. When the moving and static contacts of the leakage protector are closed, the current of the photocoupler G3 passes through the moving and static contacts of one phase of the leakage protector, and the current size is 1~2mA. Since it is direct current, it will not generate induced current on the secondary side of the zero-sequence current transformer in the leakage protector, and has no effect on the leakage action current of the leakage protector.
Figure 3 Contact status monitoring circuit
1.3 Control Circuit
The control circuit is shown in Figure 4. The start signal generated by the leakage current of the leakage protector is controlled by the program, and the disconnection signal of the moving and static contacts is sent to the external interrupt input terminal PD2 of ATmega32. The disconnection time of the moving and static contacts of the leakage protector is detected by interruption. Button S1 is used as a test function selection to select the measurement of leakage current or leakage action time. Button S2 is used to select a certain gear of the simulated leakage current of 50mA, 100mA, 200mA and 500mA. Buttons S3 and S4 are used to set the current value of the simulated leakage when measuring the leakage action time. S3 controls the increase of the current value of the simulated leakage, and S4 controls the decrease of the current value of the simulated leakage. S5 is the test start/stop control button. When measuring the leakage current, set the parameters and press S5. ATmega32 outputs data according to the gear selected by S2, so that the simulated leakage current increases from 0 to the maximum value. If the leakage protector is activated when the simulated leakage current reaches a certain current value, then the current value is the actual leakage action current value. When testing the leakage action time, after setting the leakage current parameters, press S5. ATmega32 will directly generate the set simulated leakage current according to the set current value to measure the leakage action time.
Figure 4 A/D conversion and control circuit
2 Software Design
The ATmega32 software is designed based on embedded C language, and the program structure is modular, including the main program, instrument initialization subroutine, function control subroutine, programmable leakage current source subroutine, leakage detection action time subroutine and display subroutine.
The main program is the main control program for detecting the action characteristic parameters of the leakage protector. When the tester is working, the main program runs in a loop and calls the relevant subprograms according to the functional requirements. After the subprogram is executed, it returns to the main program. The instrument initialization subprogram realizes the initialization of the instrument, including instrument parameters, microcontroller pin configuration, timer, analog-to-digital conversion , interrupt initialization, etc. The control function subprogram realizes the scanning of key functions and controls the communication between the instrument and people. The programmable leakage current source subprogram is used to generate leakage current for testing and detect the current value (I△) of leakage when the leakage protector is disconnected. The leakage action time detection subprogram realizes the detection of the leakage action time of the leakage protector. The display subprogram realizes the display of leakage current and leakage action time.
3 Conclusion
This tester is easy to operate, solves the problem of inaccurate measurement in manual test methods, achieves the purpose of automatic measurement, can detect online and offline leakage protectors, improves the level of detection of leakage protector performance, and provides technical means for research on the working performance of leakage protectors, quality inspection and production debugging. The instrument design makes full use of the various functions built into ATmega 32, making the hardware circuit structure simple and effectively improving the cost performance of the instrument. It has been used in many companies and scientific research institutions. The results show that the instrument works reliably and meets the expected technical indicators.
Previous article:AVR-based closed-loop control system for experimental loading
Next article:Design of handheld measuring instrument based on embedded laser display
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- #Idle Market# 4G module
- How to learn drivers, Linux kernel and various common peripherals
- Resource Download: Qorvo Wi-Fi Graphics File: 802.11ax / 802.11ac for the Smart Home
- Award-winning live broadcast: Tektronix's three-detection "detector" will help you overcome the pitfalls of probes
- The problem of overcurrent capability of two MOS tubes when turned on
- Evaluation report summary: AI development board based on Allwinner - R329 development board
- 【GD32E503 Review】Chip internal interface test
- TI Power
- New support for STM32WB55 in MicrPython
- Useful Information|Selected from TI CC3200-LAUNCHXL Evaluation Report