Share this

Application of 80C196KC microcontroller in soft-start capacitor bank

2026-04-06 06:57:09 · · #1
Abstract The system uses an 80C196KC microcontroller as the main control unit to control the thyristors to perform soft starting and soft disconnection of capacitors in turn, and operates according to the optimized principle of "first come, first served". Keywords Microcontroller; Thyristor; Soft start A considerable portion of the power load in a factory is inductive, which not only consumes a large amount of active power, but also absorbs a large amount of reactive power. In order to save energy and improve the reliability and power supply quality of the power system, reactive power compensation measures must be adopted. At present, the reactive power compensation devices widely used at home and abroad are contactors (each operation generates 10-30 kJ/min of reactive power). s) As a switching element, it cannot achieve fast and accurate tracking compensation. Each switching of the capacitor generates a large inrush current and causes fluctuations in the grid voltage, which can easily cause the contactor contacts to burn. If all are thyristors[1], the cost is high, the harmonic components are large, and there is a large pollution to the grid. The 80C196KC is a 16-bit high-end microcontroller launched in the late 1980s. In this paper, the 80C196KC microcontroller controls a group of smaller thyristors as a soft starter or soft regulator. After the soft start is completed, the contactor corresponding to the circuit is short-circuited or disconnected, which can effectively overcome the disadvantage of using contactors or thyristors as switching elements alone, thereby increasing the capacity per unit volume of the capacitor cabinet. 1 System Working Principle 1) The main circuit of the system is AB phase (see Figure 1). The working principle of the soft-start capacitor bank is: to ensure the reliable operation (switching) of each group of capacitors, and to keep the system in a reasonable working state as much as possible. Each group of capacitors is soft-adjusted during switching, which effectively avoids the impact of large currents and reduces the contact current of the short-circuited capacitor contactor D[sub]i[/sub] (i=1~12), thus extending the life of the contactor and improving the reliability of the entire system. In order to make the capacitor bank work reasonably, a cyclic working system is implemented in which the capacitors put in first during under-compensation should be cut off first during over-compensation, and the capacitors put in later should be cut off later. As we all know, the power factor cosφ=1 is ideal, but more capacitors must be put in, which requires increased investment. Considering various factors, it is recommended that: 0.95≤cosφ≤0.98 (see Figure 2). 2) Analysis of the dynamic adjustment process of the thyristor: Before connection, the AC voltage of the power grid is U = U[sub]m[/sub]sin(ωt+ψ), and the initial conditions are U[sub]c[/sub](-0)=U[sub]c[/sub](+0)≈0, i(-0)=i(+0)≈0. Therefore, the maximum current rise rate is Km∝Um(1+sinψ)/Lsinα; the maximum surge current is... At the initial stage of soft start, the current will fluctuate. To protect the thyristor KP and limit the surge current, a reactor L is connected in series in the KP circuit. To prevent high-voltage breakdown of KP caused by high-order harmonics, a varistor and a resistor R are used for voltage limiting and absorption across KP. The parameters of the varistor are taken as 1000 V/3000 A, and the current through the resistor R is taken as 0.1... A; At this time, the power P[sub]R[/sub]=U[sub]AB[/sub]I[sub]R[/sub]=380×0.1=38 W, and the resistance R=U[sub]AB[/sub]/I[sub]R[/sub]=380/0.1=3.8 kΩ. Considering that the resistor may work for a long time, R is taken as 3.8 kΩ/40 W, and K[sub]P[/sub] is taken as 3~5I[sub]e[/sub]/1200 V. PK series thyristor modules are selected. Assuming that the logic of the contactor is "1" when it is engaged and "0" when it is disengaged, the working principle block diagram of engaging a single group of capacitors is shown in Figure 3. [align=center] [/align] If there is undercompensation when n groups of capacitors are engaged, and overcompensation when n+1 groups of capacitors are engaged, then based on the engagement of n groups of capacitors, the thyristor is used to steplessly adjust the n+1 group of capacitors to make the power factor meet the accuracy requirements, and the system will not oscillate. 2 System Hardware and Interface Circuit 2.1 Control System Structure The control system structure, composed of an 80C196KC microcontroller, is shown in Figure 4. In the figure, the output ports PA0-PA7 and PB0-PB3 of the interface chip 8155 are shorted by the capacitor contactors D1-D12 via opto-isolation control. When the thyristor soft-starts the capacitor, it may generate a large current. Therefore, it is necessary to ensure that the thyristor starts only one capacitor at a time, avoiding the simultaneous activation of two or more capacitors. Interlocking is achieved using the auxiliary contacts of contactor Zi. Since the number of contacts is limited and cannot cover all, the interlocking logic should satisfy the following: Considering that interlocking is easy to implement in the 80C196KC system, the decoder 74LS154 is the most suitable choice based on the logic requirements. Because the 74LS154 outputs only one channel at a time, using the 74LS154 to control the activation contactor Zi of KP can avoid malfunctions, and the hardware and software are relatively easy to coordinate and program. The output ports PC0 to PC3 of the 8155 are connected to the A, B, C, and D inputs of the 74LS154, respectively. At this time, all control terminals of the 74LS154 are active. PC0 to PC3 select different Y0 to Y11 (output ports of the 74LS154), correspondingly controlling Z1 to Z12. When no output is needed (i.e., Y0 to Y11 are not outputting), simply set PC0 = PC1 = PC2 = PC3 = 1, and select Y15 for output. 2.2 Phase Detection Circuit It is crucial for the system to accurately and reliably obtain the power factor cosφ, where φ is the angle by which the current lags behind or leads the voltage. The principle of the phase φ detection circuit is shown in Figure 5. Using Taylor expansion to calculate the cosφ value, it is clear that cosφ = 1 - (φ²/2!) + (φ₄/4!) - (φ₆/6!) can guarantee the system's accuracy requirements. Alternatively, a lookup table method can be used to calculate the cosφ value. After calculating the absolute value of cosφ, the direction of φ needs to be further determined, which can be accomplished by corresponding hardware and software. 2.3 Thyristor Control Circuit The principle of controlling the thyristor output is shown in Figure 6. In Figure 6, the inverter 4069 forms a modulation wave with a small duty cycle, with a frequency between 10 and 50 Hz. Between kHz, the high-speed output ports HSO0, HSO1, and HSO2 of the 80C196KC and the PB5 output port of the 8155 control phases AB, BC, and CA respectively via optical isolation. The output port PB′5 after optical isolation serves as the master switch. To simplify the system hardware, the synchronization signal for the three-phase thyristors is only taken for phases AB, with the other two phases differing by 120°. Considering the possibility of using large thyristors, the trigger signal issued by the system is a pulse group with a small duty cycle of 10° to 13°, which can reliably trigger large thyristors with low power consumption. To prevent damage to the thyristors due to false triggering, a current sensor is added to the thyristor circuit to form a closed-loop system, limiting current surges. If a short circuit occurs, PB′5 = 0, shutting down the thyristor and the corresponding Zi, and simultaneously issuing an alarm. 3 System Software Composition The software system of this device consists of three main parts: main program, subroutines, and interrupt service routines. 3.1 Main Program The main program has three main functions: 1) Program initialization. 2) Calling subroutines. 3) Coordinating the work between various functional modules. 3.2 Subroutines Subroutines include A/D conversion, data operation and processing, display subroutines, keyboard input subroutines, filtering subroutines, and output subroutines. The filtering subroutines include mean filtering, median filtering, and oldest value removal filtering. Based on the characteristics of the system, a first-order recursive digital filter is performed on the collected power factor. This method uses software to implement the algorithm of an RC low-pass filter, realizing the replacement of hardware filters with software. Hardware RC filtering is not used when sampling the power factor to avoid affecting the phase; therefore, recursive filtering is necessary. The filter output Y<sub>n</sub> = TX<sub>n</sub> + (1-T)Y<sub>n-1</sub> Considering that the power factor is one of the parameters with relatively large inertia, and that the sampled power factor value fluctuates due to pollution from higher harmonics and other electromagnetic noise in the field, amplitude limiting filtering can be used. This method can effectively overcome some disturbances in data acquisition. Theoretically, the sampled data with a normal distribution value approaches the system characteristics, rather than being just occasional parameters. Therefore, these sudden changes can be considered as interference and limited in numerical processing. The cosφ value after amplitude limiting filtering is quite smooth even in environments with significant interference. 3.3 Interrupt handling service routine: 1) Determine the direction of φ in the high-speed input interrupt routine. 2) Obtain the AB phase synchronization signal in the external interrupt service routine, and accurately calculate the angle of the trigger pulses for phases AB, BC, and CA according to the requirements. 3) Control the thyristors of phases AB, BC, and CA respectively using high-speed outputs HSO[sub]0[/sub], HSO[sub]1[/sub], and HSO[sub]2[/sub]. 4) There are many contactors controlling the capacitors, and the action sequence is strictly required. During programming, it is necessary to first standardize and serialize each output, i.e., number them according to the rules of engagement and disengagement, and call them as subroutines to simplify the entire software system structure. The flowchart for capacitor engagement is shown in Figure 7. The flowchart for capacitor disengagement is shown in Figure 8. In the figures, n is the number of capacitors engaged, e is the position of capacitor disengagement, and s is the position of capacitor engagement. At power-on, n=e=s=0. 4 System Anti-interference Measures 4.1 Hardware The system primarily utilizes intelligent interface chips and combinational logic arrays (GAL or PAL) chips to enhance system integration and reduce the probability of interference. A switching power supply with added filters is used as the system power source, and all input/output interfaces are opto-isolated. 4.2 Software 1) The Watchdog timer is placed in an external interrupt service routine to cover the entire program group. 2) The display content is refreshed periodically to ensure correct display. 3) A software redundancy method is used, changing the system from single-sample processing of control output to cyclic sampling processing of control output. This method has good resistance to random interference for control systems with high inertia. 4) Software traps are set: When the PC pointer malfunctions, the program "flies wildly," entering program areas or non-program areas that should not be entered, easily causing infinite loops or malfunctions. Therefore, programs are separated by 5-8 NOPs, or interception measures are set between non-program areas to force the program into the trap and then force it to return to the initial state. "Cold" and "hot" start identification flags and some fault-tolerant flags are set in the initialization program to ensure the program can quickly resume normal operation. The principle is hardware isolation and software exclusion. 5 Conclusion This system is a new type of alternating soft-start capacitor compensation device that combines thyristor technology with contactors. It can significantly improve the working state during capacitor switching and the power supply quality of the power grid, improve the reliability of operation and extend the service life, and has a wide range of applications.
Read next

CATDOLL Maria Hard Silicone Head

The head made from hard silicone does not have a usable oral cavity. You can choose the skin tone, eye color, and wig, ...

Articles 2026-02-22