System Design of Single Chip Microcomputer in Intelligent Static Phase Advancer

Publisher:好的哎Latest update time:2012-02-01 Source: 微计算机信息 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In traditional thyristor rectifier devices, the trigger circuit mostly uses the voltage method to adjust the conduction angle α. This method is easier to implement for trigger circuits based on discrete components and dedicated integrated circuits, but the performance of this trigger is not satisfactory, such as complex circuits, difficult debugging, and poor pulse uniformity. In order to improve the above problems, a single-chip microcomputer is used to implement it. In this system, the simple single-chip microcomputer AT89C2051 produced by ATMEL is used to implement it.

1. Introduction to AT89C2051 MCU

The main feature of 89C2051 is that it uses Flash memory technology, which reduces manufacturing costs. Its software and hardware are fully compatible with MCS-51. 89C2051 contains 2K bytes of Flash program memory and 128 bytes of on-chip RAM. The operating clock is allowed to be 0-24MHz. 89C2051 does not allow the construction of an external bus to expand the program/data memory, so it does not need pins such as ALE, PSEN, RA, and WR. 89C2051 has a total of 20 pins, it only inherits the most important pins of 8031, and is compact. The specific pin diagram is shown in Figure 1.

2. Single chip microcomputer circuit design

The circuit diagram of the single chip microcomputer is shown in Figure 2.

The current signals of phases A, B, and C are detected by current transformers TA1, TA2, and TA3, and then processed by signal conditioning circuits and logic circuits.

After the conversion circuit, the input is from P3.4, P3.3, and P3.2 of 89C2051, and after being processed by the single-chip microcomputer, it is output from P1.4, P1.3, and P1.2. The output voltage signal is output through a voltage comparator. Take the A phase output as an example to illustrate its working principle. First, let's look at the A phase output circuit diagram as shown in Figure 3.

As can be seen from Figure 3, the in-phase voltage input terminal (pin 12) of LM324 is the A-phase voltage input, and the voltage of the inverting voltage input terminal (pin 13) is 15/(10+2)*2=2.5V. When the A-phase voltage output is greater than 2.5V, the output terminal (pin 14) of LM324 outputs a high level, otherwise, it outputs a low level. Therefore, the output terminal of LM324 outputs a square wave signal, which drives the light-emitting diode L1 to alternate between light and dark, flashing. Similarly, the same is true for phases B and C.

Pin 9 (P3.5) of the microcontroller is used to handle thermal faults. The temperature switch signal is connected from YZ11. When there is no thermal fault, L5 is always on. When a thermal fault occurs, P3.5 outputs a high level and L5 goes out. This reminds the user that the fault needs to be handled.

3. MCU software design

Software is the soul of the system. Without software, the system cannot run normally, so system software design plays an important role in the entire system. The quality of software design will affect the quality of the entire system, and the quality of software is also related to whether the various parts of the hardware can work in coordination. Therefore, for a system, software design is a very important part.

In the control part of the whole system, the 89C2051 single-chip microcomputer is used as the core device of the control part, so the software design part is mainly to program the 89C2051 single-chip microcomputer.

The 89C2051 microcontroller is a microcontroller that is fully compatible with the 8031. It is completely consistent with the 8031 ​​in terms of instruction system and on-chip RAM settings. The 89C2051 is a 20DIP package with a 2K programmable flash program memory on-chip. It can work with an external crystal oscillator. The highest crystal oscillator frequency of the 89C2051 can reach 24MHz, and the on-chip program memory can be erased and reprogrammed many times. Therefore, the performance of the 89C2051 is superior to that of the 8031 ​​in many aspects, making it an ideal industrial control microcontroller.

89C2051 has the following advantages:

(1) 2051 uses the core of MCS-51, which is easily accepted by the majority of users;

(2) The 2051 basically maintains the 80C31 hardware I/O functions;

(3) 2051 Flash memory technology can be repeatedly erased/written more than 1,000 times, making it easy to solve debugging problems;

(4) It is more suitable for small batch system applications and is easy to upgrade the software.

89C2051 can use the following two methods to develop application systems.

(1) Since the internal program memory of 89C2051 is Flash, it is very convenient and quick to modify its internal program. All you need is a programmer that can program 89C2051. The debugger can use a repeated cycle of program editing, compiling, solidifying and inserting into the circuit board for testing. For a skilled MCS-51 programmer, this debugging method is not very difficult. Of course, this debugging method cannot understand the contents of the on-chip RAM and the direction of the program.

(2) Bring out P1.0-P1.7 and P3.0-P3.6 in the simulation plug of the ordinary 8031/80C31 simulator to simulate 2051. This method can use the single-step and breakpoint debugging methods, but the simulation is not realistic enough, for example, the internal analog comparator function of 2051, the enhanced pull-down capability of P1 and P3 ports, etc.

During software debugging, the first debugging method is selected, which is a repeated cycle of program editing, compiling, curing and inserting the program into the circuit board for testing.

In software design, the functions implemented by 89C2051 are mainly to give specific control to the detected A, B, and C phase currents (voltages) according to control rules, and to monitor and alarm for phase loss and thermal faults.

In the control system, since the rotor current of the AC wound-rotor motor as the control object is symmetrical, it is only necessary to detect the frequency of any phase current (converted into half-cycle time for processing in the program), compare it with the set value, calculate the deviation and deviation change, and determine the corresponding position in the control rule table and what control decision should be taken.

The specific flow chart of the main program is shown in Figure 4.

The subroutine design mainly includes determining the delay time according to the control rule table and outputting after the delay. The specific flow chart is shown in Figure 5.

The procedure for determining the working condition is:

if (200

CL=9;

else if (150

IV. Conclusion

The single chip microcomputer is used as the core control component of the static phase advancer, which effectively improves the accuracy and stability of system control and saves control costs.

Reference address:System Design of Single Chip Microcomputer in Intelligent Static Phase Advancer

Previous article:Principle and application of real-time clock ISL1208
Next article:Headlight automatic positioning system based on C8051F020

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号