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.
Previous article:Principle and application of real-time clock ISL1208
Next article:Headlight automatic positioning system based on C8051F020
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Transistor Selection
- NUCLEO_G431RB Review - RTC Real-time Clock
- 【New Year's Taste Competition】+ Spring Festival Customs
- ESD electrostatic protection classic book - "ESD Secrets: Electrostatic Protection Principles and Typical Applications"
- [TI star product limited time purchase] + AWR683ISK run demo
- Fancy PCB Exhibition (1)
- Why is it said that 90% of EMC is designed? (Long article)
- Recommended postgraduate schools
- Chinese mobile phones continue to sell well in India, Vivo surpasses Samsung to become the second largest brand
- Share CC2541 Bluetooth learning about ADC