Development of power switching device based on AVR microcontroller

Publisher:mlgb999Latest update time:2012-01-07 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Introduction

There are a large number of inductive loads in the electrical equipment of industrial and mining enterprises, such as arc furnaces, DC motor speed control systems, rectifier inverter equipment, etc. While consuming active power, they also occupy a large amount of inductive reactive power, resulting in a decrease in the power factor. Since reactive power occupies the capacity of the equipment and increases the current value of the line, and the line loss is proportional to the square of the current, it causes a huge waste of power resources. In addition, these inductive loads will also generate a large amount of power harmonics when working, causing harmonic pollution to the power grid, deteriorating the power quality, and abnormal operation of electrical instruments. In order to improve the power factor and control harmonics, dynamic filtering compensation can be used. The capacitor and inductor are connected in series to form a harmonic elimination circuit, which plays a role in reactive compensation and filtering harmonics. Various filtering and compensation systems are basically composed of power capacitors, iron core reactors, reactive compensation controllers and power switching devices. Among them, the power switching device is responsible for connecting and disconnecting with the power grid and is one of the key components in the entire compensation system. At present, the devices used for power switching are mainly:

(1) Ordinary contactor

Its advantage is that the contact resistance is very small, which is suitable for conducting large currents, but its disadvantages are also obvious: the pull-in and release time is long, which is not suitable for fast switching occasions. Sparks are easily generated at the contactor contacts, causing the contacts to stick and be unable to disconnect and be damaged, which has a huge impact on the power grid and generates interference, which may cause the surrounding electronic equipment to not work properly.

(2) Special contactor with pre-throw resistor

This type of contactor is large in size and does not actually solve the surge current problem during operation. At the same time, due to the poor coordination with the contactor contacts, the resistors often heat up and become damaged. Therefore, this type of contactor is not an ideal switching contactor.

(3) Zero-crossing trigger solid-state relay

The interior of an AC relay is often composed of two unidirectional thyristors in anti-parallel or bidirectional thyristors. When the solid-state relay receives a switching signal, once the voltage difference between the two ends approaches zero voltage, the switch is closed and put into operation; when the solid-state relay receives a cut-off signal, the thyristor is naturally turned off, that is, it is turned off when the current is zero. It can be seen that the working state of the solid-state relay when it is switched on and off is very ideal, but there is a fatal flaw, that is, the heating of the device and the harmonic interference problem during the working process, which limits its further promotion in the field of power switching.

(4) Discrete component composite switch

It combines the advantages of traditional electromagnetic relays and contactless switches. The timing coordination relationship can be completed by a resistor and capacitor delay circuit. However, the dispersion of discrete components and poor reliability will affect the long-term normal operation of the entire composite switch.

In view of the above shortcomings of the existing switching devices, this project adopts a high-performance embedded system as the core control component of the switching device. It has many advantages such as fast computing speed, short response time, small input surge current, stable operation, etc., and has broad application prospects.

2. Basic composition and working block diagram

Figure 1 Principle block diagram
The switching device developed in this project consists of power supply circuit, switching signal detection, zero-crossing detection, pulse triggering, thyristor circuit, electromagnetic contactor and status indication. The core component is the ATmega48V AVR series microcontroller of ATMEL Company of the United States. It has an internal RC oscillator and provides a 1/2/4/8MHz working clock. It can work without external clock circuit components, which is very simple and convenient. The working voltage range is wide from 2.7V to 6.0V, and it has a system power supply low voltage detection function and strong power supply anti-interference performance.

Figure 2 Working sequence

The working principle of the switching device is shown in Figure 1. Its basic working process is: the switching detection circuit detects the input (on) and removal (off) signals in an inquiry manner. When the input signal (high level) is detected, the zero-crossing detection circuit detects the pulsating voltage at both ends of the thyristor. Only when the voltage is close to zero, the pulse is output to trigger the thyristor to turn on. After a certain delay, the electromagnetic contactor is closed and turned on. After that, the thyristor is disconnected, and the contactor carries the line current to complete a switching process. When cutting (off), the thyristor is first triggered to turn on, and then the electromagnetic contactor is controlled to be disconnected. After a certain delay, when the current passes through zero, the thyristor is turned off, the removal action is completed, and the next switching cycle is entered. If the power grid has a phase loss or overvoltage fault during operation, the switching device refuses to be put into operation, and the fault location is indicated by the LED to ensure the safe operation of the entire equipment. Figure 2 is a working timing diagram, in which T1-T4 are waveform diagrams of the power grid voltage, switching control signal, thyristor and electromagnetic contactor respectively.

3. Zero-crossing detection and pulse triggering

The voltage zero-crossing detection circuit consists of a current-limiting resistor R1, a pull-up resistor R2, a protection diode D, an optocoupler P, etc., as shown in Figure 3. The AC voltage of the power grid passes through the current-limiting resistor R1 to the input end of the optocoupler P, and a rectangular wave with the same frequency and opposite phase as the power grid is obtained at its output end. The zero-crossing point of the power grid voltage can be detected by the "high-low" or "low-high" level processing program of the single-chip microcomputer.

The pulse trigger circuit is shown in Figure 4, which is mainly composed of amplifier, LC oscillator and pulse transformer. The rectangular pulse output by the microcontroller pin is amplified, LC resonated, and pulse transformer coupled to form a spike pulse, which is added between the control electrode and cathode of two anti-parallel unidirectional thyristors, so that they are turned on in the positive and negative half cycles of the grid voltage waveform respectively. In order to ensure reliable conduction of the thyristor, the trigger pulse width is not less than 100us, which can be set by the ATmega48V microcontroller program.

Figure 3 Zero-crossing detection circuit

Figure 4 Pulse trigger circuit

4. MCU Programming

The AVR series of single-chip microcomputers adopts RISC structure. Its speed, memory capacity, peripheral interface integration, serial expansion and more suitable for high-level language programming, as well as its development technology and simulation debugging technology, fully reflect and represent the development trend of current single-chip embedded systems. This project uses the ATmega48V chip in the AVR series and uses C language for development and design to improve product development efficiency and system maintainability. The high cost performance is the outstanding advantage of ATmega48V. It provides 23 programmable I/O lines, 4K bytes of in-system programmable Flash, 256 bytes of EEPROM, 6-channel 10-bit ADC and other configurations, which can meet the design requirements of this project.

The whole microcontroller program is a loop structure. First, the program is initialized, including the pin direction, interrupt mode, timer and other settings. A pin of the microcontroller detects the level state of the input control signal. When it is high, the level value of the zero-crossing detection pin is read and saved. When the zero-crossing detection pin is reversed (high → low or low → high), the corresponding pin of the microcontroller outputs a rectangular pulse with a period of 200us and a duty cycle of 50%, triggering the thyristor to turn on. Delay a certain time (about 60ms) to control the electromagnetic contactor to close and complete the input process. When the cut-off signal (low level) is received, the microcontroller pin outputs a rectangular pulse to trigger the thyristor to turn on, control the disconnection of the contactor, and delay a certain time to terminate the output pulse. When the current is zero, the thyristor is naturally turned off.

V. Conclusion

With ATmega48V as the core of the switching device, the peripheral circuit is simple, the functional design is flexible, the product cost is low, and the operation is stable and reliable. The surge current during switching is small, and the switching operation can be performed frequently. This device is used in power reactive power compensation and harmonic control equipment, and the number of switching capacitors can be increased to improve compensation accuracy, suppress harmonics, and improve the power quality of the power grid.


FIG5 is a diagram showing the trigger pulse waveform and a diagram showing a comparison with the grid voltage waveform (due to the large amplitude of the grid voltage, only part of the waveform is shown).

The power switching device developed in this project can achieve the following performance indicators after field testing:

(1) Turn-on time <60 ms; turn-off time <60 ms.

(2) Switch contact resistance ≤ 0.02Ω; control circuit power consumption < 2W.

(3) The temperature rise of the switch under rated current load is ≤25℃.

(4) The system voltage is within the range of ±20% of the rated voltage and can operate normally; if it exceeds the rated voltage, it will automatically trip.

(5) The switch refuses to close when a phase is missing. During normal operation, the switch automatically trips when a phase is missing, and the response time is ≤0.2 s.

(6) When the system is powered off, the switch automatically trips and responds within 0.2 s.

(7) When the switch working power supply is abnormal, the switch will automatically trip.

(8) LED indication is used, including switch closing, tripping position and phase failure indication.

The author's innovation: The power switching device developed in this project has a voltage level of 660 volts, which meets the actual needs of metallurgical, mining and other enterprises in North China; the AVR series microcontroller ATmega48V is used as the core component, making the switching device powerful and stable in performance.

The power switching device developed in this project can be widely used in automatic control situations in the power supply system of industrial and mining enterprises, especially as a switch component in power harmonic control and reactive power compensation equipment. It has obvious performance advantages and good application prospects, and the economic benefits can reach more than 5 million yuan.

References

[1]余永权 李小青 陈林康编著单片机应用系统的功率接口技术 北京航空航天大学出版社 1992年9月第1版。

[2] Microcontroller Principles and Applications edited by Peng Tongming and Xu Xueqin, China Electric Power Press, first edition, July 2005.

[3]马潮 编著AVR单片机嵌入系统原理与应用实践 北京航空航天大学出版社 2007年10月第1版。

[4] Gao Langqin, Luo Xianxi Analysis of harmonics and their suppression measures in AC frequency conversion devices[J]. Microcomputer Information, 2007, 6-1: 127-129

[5] Our AVR website: http://www.ouravr.com

Reference address:Development of power switching device based on AVR microcontroller

Previous article:Railway crossing monitoring system in mining area based on Atmega128 single chip microcomputer and GPRS
Next article:CAN-GPRS gateway based on ATMEGA128

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

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号