40- PWM Speed Regulation Design of DC Motor Based on 51 Single Chip Computer

Specific realization function

The system consists of STC89C52 single-chip microcomputer, LCD1602 liquid crystal display, Hall speed sensor, 3V DC motor, and key module.

Specific functions:

1. Use Hall sensor to measure the motor speed in a non-contact manner;

2. The LCD1602 liquid crystal displays the current speed (in revolutions per minute (RPM)) and the current PWM duty cycle 0~100%;

3. The motor speed can be adjusted by pressing the button, or it can start to pause, forward and reverse;

4. The button can realize the functions of acceleration, deceleration, forward rotation, reverse rotation, start/pause and so on.

Instructions for use:

The first line of the LCD screen displays the motor speed, and the second line displays the duty cycle. The larger the duty cycle value, the faster the motor speed.

There are a total of 6 buttons in the system. The independent button near the single-chip microcomputer is the reset button of the system. Pressing the single-chip microcomputer will reset.

The bottom row is the control buttons:

1 key: Accelerator key, can be short press, the duty cycle increases by 1, or long press, the duty cycle continuously increases;

2 key: Deceleration key, short press, the duty cycle decreases by 1, or long press, the duty cycle continuously decreases;

3 key: Forward rotation switch key, the motor will rotate forward after pressing;

4 key: reverse switching key, the motor reverses when pressed;

5 key: start pause key, press once to start, then press again to pause.

design background

In modern electronic products, DC motors have been widely used in automatic control systems, electronic equipment, household appliances, electronic toys, etc. The familiar tape recorders, record players, video cameras, electronic computers, etc. cannot lack DC motors. So the control of DC motor is a very practical technology. DC motors can be roughly divided into four categories: stepper motors with several phase windings, permanent magnet inverter DC motors, servo motors, and two-phase low-voltage AC motors

DC motors are characterized by large starting torque, large maximum torque, easy speed control, and high efficiency after speed regulation. Compared with AC speed regulation, DC motors have complex structure, high production cost and heavy maintenance workload. With the advent of high-power transistors and the maturity of vector control technology, vector control frequency conversion technology has developed rapidly, and various types and power frequency conversion speed control devices have been developed and widely used in industry. Scope of application: DC governor can be used in papermaking and printing, textile printing and dyeing, optical cable equipment, electrical technical equipment, food processing machinery, rubber processing machinery, biopharmaceutical equipment, circuit board equipment, laboratory equipment, special processing, light industry, transportation equipment, vehicles Engineering, medical equipment, communication equipment, radar equipment and other industries. The proportion of high-performance AC drive applications is increasing year by year. In the industrial sector, it will become a historical necessity to replace DC drives with adjustable-speed AC drives.

hardware design

This system uses STC89C51 to control the output data. The PWM signal is generated by the IO port of the single-chip microcomputer and sent to the DC motor. The DC motor sends the real-time speed back to the single-chip microcomputer through the speed measuring circuit for speed display, so as to realize the control of the motor speed and steering, and reach the DC motor. The purpose of speed regulation.

software design

The speed adjustment adopts PWM (Pulse Width Modulation) pulse width modulation, and the working principle: by generating a rectangular wave, changing the duty cycle to achieve the purpose of adjusting the pulse width. Definition of PWM: Pulse width modulation (PWM) is a very effective technology that uses the digital output of a microprocessor to control analog circuits. It is widely used in many fields from measurement and communication to power control and conversion. The value of the analog signal can be changed continuously, and the resolution of its time and amplitude is not limited.

Schematic diagram

 

The system schematic design adopts Altium Designer19, as shown in the figure.

program

This design uses KEIL5 software to realize the program design, as shown in the figure.

Simulation implementation

This design uses protues8.7 software to realize the simulation design, as shown in the figure.

All information

All materials include programs (notes), AD schematic diagrams, protues simulation, reference papers, program explanations, simulation explanations, simulation videos, schematic explanations, introduction to the use of materials, etc., the most complete in the entire network!

For information, please follow the WeChat public account "Electronic Engineer Growth Diary", and reply the key word: "Information"!

Guess you like

Origin blog.csdn.net/weixin_41017942/article/details/115042387