摘 要
随着单片机技术的日新月异,使得许多控制功能及算法可以采用软件技术来完成,为直流电动机的控制提供了更大的灵活性,并使系统能达到更高的性能。采用单片机构成控制系统,可以节约人力资源和降低系统成本,从而有效的提高工作效率,可以实现复杂的控制,控制灵活性和适应性好,无零点漂移,控制精密高,可提供人机界面,多机联网工作。
本文为直流电动机驱动模块、单片机、光电传感器(检测转速)、数码管显示模块、按键输入模块及上位机界面;通过按键及上位机输入电动机的转速,输入后单片机能够根据PID控制算法控制电动机的速度稳定在该速度值运行,且能够通过数码管实时显示当前的速度值;通过上位机界面实时绘制电动机当前的转速曲线;设计矩阵按键解析程序;设计数码管动态扫描程序;设计设计转速闭环PID控制程序;
关键词:直流电机;单片机;软件设计
Abstract
With the microcontroller technology advances, makes a number of control functions and algorithms software technology, provides greater flexibility for DC motor control, and the system can achieve higher performance. Using single-chip computer control system can save human resources and reduce system cost, so as to effectively improve work efficiency can be achieved complex control, control flexibility and adaptability, no zero drift control precision high, man-machine interface, multi-machine networking.
DC motor drive module, single-chip, photoelectric sensors (speed detection), digital display module, the key input modules and PC interface; enter the motor speed through the key and the host computer, entered microcontroller based PID control algorithm to control the motor speed and stability in the value of the speed run, and the current speed value can be displayed in real time through the digital real-time rendering the current speed curve of the motor; through the PC interface; design matrix button resolver; design digital dynamic scanner; design design speed closed-loop PID control procedures;
Keywords: DC motor; microcontroller; software design
目录
摘 要 I
Abstract II
1绪论 III
1.1研究背景及意义 III
1.2国内外研究现状 IV
1.5系统设计内容 V
2系统方案设计 V
2.1系统的设计要求及主要技术指标 V
2.2系统总体方案 VI
2.3总体方案论述 VI
3系统软件设计 VII
3.1系统软件构架 VII
3.2各模块程序说明 X
3.2.1温度采集模块 X
3.2.2电动机转速及转向控制模块 X
3.2.3温度显示模块 XIII
结 论 XV
参考文献 XVI
致谢 XVII
附录A系统总程序 XVIII
附录B系统仿真图 XXVII