Application of 89C51 single chip microcomputer in DC speed control system

Publisher:智慧启迪Latest update time:2012-01-19 Source: 微计算机信息 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Introduction

DC motors have good starting and braking performance and are suitable for smooth speed regulation over a wide range. They have been widely used in many electric traction fields that require speed regulation or rapid forward and reverse rotation. From a control perspective, DC speed regulation is also the basis of AC traction systems [4] . Early DC motor control was based on analog circuits, using operational amplifiers, nonlinear integrated circuits, and a small amount of digital circuits. The hardware part of the control system was very complex, with a single function, and the system was very inflexible and difficult to debug, which hindered the development of DC motor control technology and the promotion of its application range. With the rapid development of single-chip microcomputer technology, many control functions and algorithms can be completed using software technology, providing greater flexibility for DC motor control and enabling the system to achieve higher performance. Using a single-chip microcomputer to form a control system can save human resources and reduce system costs, thereby effectively improving work efficiency [1] .

2. Principle of speed measurement

Speed ​​is a commonly used parameter in engineering. The speed of a rotating body is often expressed in revolutions per minute. Its unit is r/min. There are many ways to measure speed. Since speed is measured by the number of revolutions per unit time, using Hall elements to measure speed is a more commonly used measurement method.

The Hall device is a thin sheet made of semiconductor material. The length, width and height of the device are l, b and d respectively. If an external magnetic field B is applied perpendicular to the plane of the sheet (along the thickness d), and an external electric field is applied to the two end faces along the l direction, a certain current will flow. Since the electrons move in the magnetic field, they will be subject to a Lorentz magnetic force, the magnitude of which is: f l =qVB

Where: fl Lorentz magnetic force, q – carrier charge, V – carrier velocity, B – magnetic induction intensity.

This causes the trajectory of electrons to shift, resulting in electron accumulation or excess charge on the two sides of the Hall element slice, forming a Hall electric field. The potential difference U H between the two sides of the Hall element is called the Hall voltage.

The Hall voltage is: U H =R H ×I×B/d(mV)

Where: RH --- Hall constant, d --- element thickness, B --- magnetic induction intensity, I --- control current

Assume K H = R H /d , then U H = K H × I × B (mV)

KH is the sensitivity coefficient of the Hall device (mV/mA/T), which indicates the size of the Hall electromotive force output by the Hall element under unit magnetic induction intensity and unit control current. It should be noted that when the electromagnetic induction intensity B is reversed, the Hall electromotive force is also reversed. If the control current remains unchanged, the Hall induction voltage will change with the strength of the external magnetic field. According to this principle, a permanent magnet can be fixed on the edge of the turntable on the motor shaft. The turntable rotates with the measured shaft, and the magnet will also rotate synchronously. A Hall element is installed near the turntable. When the turntable rotates with the shaft, the Hall element is affected by the magnetic field generated by the magnet, so it outputs a pulse signal, and its frequency is proportional to the rotation speed. The rotation speed can be calculated by measuring the period or frequency of the pulse.

3. Hardware Design of DC Motor Speed ​​Control System

A 5V power supply is made to ensure the normal working voltage. The speed measuring circuit composed of Hall elements and peripheral devices converts the motor speed into a pulse signal and sends it to the counter T1 of the single-chip computer. The actual speed of the motor is measured by T1 and compared with the set value to form a deviation. According to the comparison result, the DAC0832 output control voltage is increased or decreased. The power amplifier circuit converts the analog voltage output by DAC0832 into a motor control voltage with a certain output power.

4. Software Design of DC Motor Speed ​​Control System

1. Programming ideas: The function of the control system program is to use T0 and T1 of the 89C51 microcontroller to measure the actual speed of the motor and compare it with the given value. According to the comparison result, the output control voltage of the DAC0832 chip is increased or decreased. The 30H unit stores the flag of whether the actual speed is equal to the set value. "1" means equal, "0" means not equal. The 40H unit stores the digital control voltage sent to the DAC0832 chip. 7FFFH is the address of DAC0832.

2. The system flow chart is shown in Figure 3:

Figure 3 Flowchart of DC motor speed control system

5. Working principle of DC motor speed control system

The speed of a DC motor is related to the voltage applied to both ends of the motor. This system uses DAC0832 to control the voltage output to the DC motor to control the speed of the motor. When the motor speed is less than the set value, the output voltage of the DAC0832 chip increases, and when it is greater than the set value, the output voltage of the DAC0832 chip decreases, so that the motor rotates at a set constant speed. We use a proportional regulator algorithm. Control law:

Y=K P e(t)+K I

In the formula: Y---proportional regulator output, KP --- proportional coefficient, KI --- integral coefficient

e(t)---The input of the regulator, generally the deviation value.

The system uses a proportional integral regulator, referred to as PI regulator, so that the system can achieve static zero error through the regulator action of the PI regulator under the action of disturbance, thus achieving static zero error. In the zero-error speed control system, the proportional part of the proportional integral regulator makes the dynamic response faster (no lag), and the integral part eliminates the static error of the system.

VI. Conclusion

This system uses a single chip to form a motor speed control system and adopts a proportional-integral regulator algorithm. It has high efficiency, simple circuits, and is widely used.

References:

1. Yin Gengqin, Tang Xuwei, Urban Traffic Light Simulation Control System, Microcomputer Information, 2005, No. 10-1

2. Lou Ranmiao and Li Guangfei, ed., "51 Single Chip Microcomputer Design Examples", Beijing University of Aeronautics and Astronautics Press

3. Yu Yongquan, Wang Minghui, Huang Ying, Application of Single Chip Microcomputer in Control System, Electronic Industry Press

4. Electric Traction Automatic Control System, edited by Chen Boshi, China Machinery Industry Press

Reference address:Application of 89C51 single chip microcomputer in DC speed control system

Previous article:Design of Multi-ultrasonic Signal Fusion Processing System Based on AT89C52 Single Chip Microcomputer
Next article:Design of Switching and Control System Based on Dual CPU

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号