29-Stepper motor control system based on 51 single chip microcomputer

 

Specific realization function

The system is composed of STC89C52 single chip microcomputer + single digital tube + LED indicator light + ULN2003 drive chip + DC-5V stepper motor.

Specific functions:

(1) Realize button control of stepping motor forward, reverse, acceleration, deceleration and stop;

(2) 2 light-emitting diodes display forward and reverse rotation, a 7-segment LED digital tube displays the current speed gear (a total of 9 gears);

(3) 4 red LEDs, indicating the speed of the motor.

 

design background

A stepping motor is an actuator that converts electrical pulse signals into angular displacement. The angular displacement of its rotor is proportional to the frequency of the input pulse. A wide range of speed can be achieved by changing the pulse frequency; at the same time, the stepping motor is easy to interact with the computer Interface with other digital components, so it is used in various digital control systems.

The stepper motor selected in this design is a four-phase stepper motor, and the method adopted is to use a single-chip microcomputer to control the drive of the stepper motor. Stepping motor is an actuator that converts electrical pulses into angular displacement. When the stepper driver receives a pulse signal, it drives the stepper motor to rotate a fixed angle (called "step angle") in the set direction, and its rotation runs step by step at a fixed angle. The angular displacement can be controlled by controlling the number of pulses, so as to achieve the purpose of accurate positioning; at the same time, the speed and acceleration of the motor rotation can be controlled by controlling the pulse frequency, so as to achieve the purpose of speed regulation. This graduation project is to adjust the speed of the stepper motor by changing the pulse frequency, and the level of its speed is displayed through the digital tube. In addition, it can realize its forward and reverse rotation through a single-chip microcomputer. The stepper motor can be used as a special motor for control. It is widely used in various open-loop control due to its feature of no accumulated error (accuracy of 100%).

The system designed in this paper has simple operation, flexible control, clear display, low production cost and high cost performance.

hardware design

The hardware circuit is composed of the following modules:

(1) The smallest single-chip microcomputer system. It is used to drive and control other modules to realize the overall function. It uses the STC89C52 single-chip microcomputer as the core chip, supplemented by a reset circuit and a crystal oscillator circuit.

(2) Button module. Realize button control of stepping motor forward, reverse, acceleration, deceleration and stop.

(3) Display module. A 7-segment LED digital tube displays the current speed gear (a total of 9 gears).

(4) Stepper motor module.

(5) Rotation speed indicator module and forward and reverse indicator module.

software design

According to the design requirements of this article, on the basis of hardware circuit design, specific functions that need to be realized through software programming:

(1) Drive each module to work, realize the clear display of the digital tube, and realize the motor drive;

(2) Realize button control of stepping motor forward, reverse, acceleration, deceleration and stop;

(3) 2 light-emitting diodes display forward and reverse rotation, and a 7-segment LED digital tube displays the current speed gear (a total of 9 gears);

(4) 4 red LEDs, indicating the speed of the motor.

 

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/114595013