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

Publisher:温暖微风Latest update time:2022-01-28 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Specific implementation functions

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


Specific functions:


(1) Realize key control of stepper motor forward, reverse, acceleration, deceleration and stop;


(2) Two LEDs display forward and reverse rotation, and a 7-segment LED digital tube displays the current speed gear (9 gears in total);


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

design background

A stepper 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, and a wide range of speed regulation can be achieved by changing the pulse frequency. At the same time, stepper motors are easy to interface with computers and other digital components, so they are used in various digital control systems.


The stepper motor selected in this design is a four-phase stepper motor, and the method used is to use a single-chip microcomputer to control the drive of the stepper motor. A stepper 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 the "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 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 to achieve the purpose of speed regulation. This graduation project adjusts the speed of the stepper motor by changing the pulse frequency, and displays its speed level through a digital tube. In addition, the forward and reverse rotation is realized by a single-chip microcomputer. The stepper motor can be used as a special motor for control. It is widely used in various open-loop controls by taking advantage of its characteristic of no accumulated error (accuracy of 100%).


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


hardware design

The hardware circuit consists of the following modules:


(1) Single-chip microcomputer minimum system. It is used to drive and control other modules to achieve 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: Use buttons to control the forward, reverse, acceleration, deceleration, and stop of the stepper motor.


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


(4) Stepper motor module.


(5) Speed ​​indication module and forward and reverse indication module.

software design

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


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


(2) Realize key control of stepper motor forward, reverse, acceleration, deceleration and stop;


(3) Two LEDs display forward and reverse rotation, and a 7-segment LED digital tube displays the current speed gear (9 gears in total);


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


Schematic

The schematic diagram of this system was designed using Altium Designer19, as shown in the figure.

program

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

Simulation Implementation

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

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

Previous article:30-Taxi meter based on 51 single chip microcomputer (Hall speed measurement)
Next article:28-Smart curtain design based on 51 single chip microcomputer

Recommended posts

With an estimated total investment of 600 million yuan, Baidu's 5G Smart City intelligent driving project has landed in Chengdu. What do you think of this?
AccordingtothenewsonApril8,atthe10thTIAAConferenceandthe2021AutonomousDrivingCommercialApplicationConference,Baidu's5GSmartCityIntelligentDrivingProjectwithatotalinvestmentof600millionyuanwasannouncedtobelaunch
okhxyyo RF/Wirelessly
Bear Pai Hongmeng Development Board Review - [Hardware Composition]
Afewweeksago,IsawatrialactivityfortheHarmonyOSdevelopmentboard-BearPieontheforum.IhappenedtobequiteinterestedintheHarmonyOS,soIappliedforit.Tomysurprise,Iwasapproved. SoIhappilycommunicatedwiththeadm
未见 Programming Basics
I heard there are gifts for watching videos?
Wow,it’strue! Youjustneedtofollowmyprocessonce,andtherewillreallybegifts! Eventtime:FromnowuntilSeptember10,2020 Activityprocess: Clickheretoentertheeventpage,and
EEWORLD社区 Integrated technical exchanges
What are the methods to extend HDMI cable?
HDMIcablesareusedtotransmithigh-definitionvideoandaudiosignals,butthelengthofHDMIcablesmaylimittheirusescenarios.IfyouneedtoextendanHDMIcable,thereareseveralcommonmethods: UsinganHDMIextensioncable: This
SAMZHE山泽 Integrated technical exchanges
【National Technology N32G430】04 Configure the clock and run the lights
04Configuretheclockandrunthelights N32G430clocktree: Configuretheclockaccordingtotheclocktreeinformation: 1.Useexternalfastclock(8M),targetsystemclock128M; 2.ConfigurethePLLclocksourcetoHSE,multiplyby
秦天qintian0303 Domestic Chip Exchange
Newbie Report Newbie Report
NewbiereportNewbiereportPleasetakecareofme WelcomeWelcome,whatdirectionareyouin? Welcome,welcome,warmlywelcome.Wehopethatwecanlearnfromeachother,exchangeexperiencesandmakeprogresstogether. Welcome,Ihopethefo
ss三生三世 Wireless Connectivity
Latest Microcontroller Articles
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号