1、 1 基于基于C5151单片机直流电机测速仪设计单片机直流电机测速仪设计 摘摘 要:要:电机的转速是各类电机运行过程中的一个重要监测量,测速装置在电机 调速系统中占有非常重要的地位, 特别是数字式测速仪在工业电机测速方面有独 到的优势。本文介绍了一种基于C51单片机的光电传感器转速测量系统的设计。 系统采用对射式光电传感器产生与齿轮相对应的脉冲信号, 使用AT89C51单片机 采样脉冲信号并计算每分钟内脉冲信号的数目,即电机对应的转速值,最终系统 通过LCD实时显示电机的转速值。经过软硬件系统的搭建,分别通过Protues软件 系统仿真实验和实际电路搭建检查实验。仿真实验表明本系统满足设计要求
2、,并 且结构简单、实用。整个直流电机测速系统在降低测速仪成本,提高测速稳定性 及可靠性等方面有一定的应用价值。 关键词关键词:转速测量;光电传感器;单片机 2 Based On C51 SCM Single DC Motor Speedometer Design ABSTRACT:Motor speed is all kinds of motor operation is an important process to monitor the amount of speed measuring device in the motor control system occupies a very
3、 important position, Especially the digital speedometer in the industrial motor speed has unique advantage. This paper describes a photoelectric sensor 51 SCM-based speed measurement system design. System uses a beam photoelectric sensor generates a pulse signal corresponding to the gear, the use of
4、 a sampling pulse signal AT89C51 SCM and calculating the pulse per minute, the number of signals that the speed of the motor corresponding to the value of the final system time through the LCD display the motor speed value.After a hardware and software system structures, respectively, through Protue
5、s software system to build the actual circuit simulation and experimental examination. Simulation results show that the system meets the design requirements, and the structure is simple and practical. DC Motor Speed entire system in reducing speedometer costs, improve reliability, speed stability an
6、d a certain application value. Keywords: Speed measurement; Photoelectric; Single chip micyoco 1 目目 录录 1 绪论 . 1 1.1 数字式转速测量系统的发展背景 1 1.2 转速测量在国民经济中的应用 1 1.3 主要研究内容. 2 1.4 设计的目的和意义 2 2 转速测量系统的原理 4 2.1 转速测量原理 4 2.2 转速测量计算方法 5 3 转速测量系统设计方案. 7 3.1 直流电机转速测量方法 7 3.2 设计任务及方案 8 4 直流电机测速系统设计 9 4.1 单片机 AT89C51 介绍 9 4.2 转速信号采集 . 14 4.2 转速信号处理电路设计 . 16 4.4 最小系统的设计 . 17 4.4.1 复位电路. 17 4.4.2 晶振电路 20 4.5 显示部分设计 . 20 5 直流测速系统仿真 . 24 5.1 直流测速系统仿真 . 24 5.1.1 单片机最小系统仿真 25 5.1.2 数码管显示仿真 25 5.2 主程序流程设计 . 26 5.2