基于单片机的温度控制直流电动机转速系统设计.docx
《基于单片机的温度控制直流电动机转速系统设计.docx》由会员分享,可在线阅读,更多相关《基于单片机的温度控制直流电动机转速系统设计.docx(61页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、目录设计总说明1Introduction31绪论61.1引言61.2电机控制发展历史61.3研究背景91.4研究意义91.5系统设计内容102系统方案设计102.1系统的设计要求及主要技术指标102.2系统总体方案102.3总体方案论述113硬件电路设计123.1单片机的选择123.1.1 MCS-51系列单片机123.1.2 AT89C51单片机123.1.3管脚介绍133.1.4单片机晶振电路153.1.5单片机复位电路:163.2温度采集模块设计173.2.1方案论证:173.2.2 DS18B20的内部结构183.2.3 DS18B20温度传感器的存储器203.2.4 DS18B20使
2、用中注意事项243.2.5 温度采集模块的电路连接253.3转速控制模块设计253.3.1直流电机转速调节原理253.3.2电机调速控制方案论证263.3.3 PWM方式选择273.3.4 PWM控制信号的产生方式273.3.5直流电机PWM调速原理283.4直流电机293.4.1有刷直流电机293.4.2无刷直流电机303.5直流电机驱动模块的选择323.5.1方案选择323.5.2 L298驱动芯片323.5.3电机及驱动模块电路连接343.6温度显示模块设计353.6.1液晶显示简介353.6.2 LM016L的结构及功能363.6.3 液晶显示模块的电路连接404系统软件设计414.1
3、系统软件构架414.2各模块程序说明434.2.1温度采集模块434.2.2电动机转速及转向控制模块434.2.3温度显示模块465结论48参考文献48致谢49附录A系统总程序50附录B系统仿真图5959 / 61设计总说明在电气时代的今天,电动机一直在现代化的生产和生活中起着十分重要的作用。据资料统计,现在有的90%以上的动力源自于电动机,电动机与人们的生活息息相关,密不可分。随着现代化步伐的迈进,人们对自动化的需求越来越高,使电动机控制向更复杂的控制发展。 近年来由于微型机的快速发展,国外交直流系统数字化已经达到实用阶段由于以微处理器为核心的数字控制系统硬件电路的标准化程度高,制作成本低,
4、且不受器件温度漂移的影响,且单片机具有功能强、体积小、可靠性好和价格便宜等优点,现已逐渐成为工厂自动化和各控制领域的支柱之一。其控制软件能够进行逻辑判断和复杂运算,可以实现不同于一般线性调节的最优化、自适应、非线性、智能化等控制规律。所以微机数字控制系统在各个方而的性能都远远优于模拟控制系统且应用越来越广泛。现在市场上通用的电机控制器大多采用单片机和DSP。但是以前单片机的处理能力有限,对采用复杂的反馈控制的系统,由于需要处理的数据量大,实时性和精度要求高,往往不能满足设计要求。近年来出现了各种单片机,其性能得到了很大提高,价格却比DSP低很多。其相关的软件和开发工具越来越多,功能也越来越强,
5、但价格却在不断降低。现在,越来越多的厂家开始采用单片机来提高产品性价比。本论文要求使用单片机进行电路设计,同时单片机部分应带有显示功能。单片机对某个位置进行温度监控,当外部温度45时,电动机加速正转,当温度75时,电动机全速正转;当外部温度10时,电动机加速反转,当温度0时,电动机全速反转;当温度回到1045之间时电动机逐渐停止转动。AT89C51是美国ATMEL公司生产的低电压高性能CMOS8位单片机,片内含4K bytes的可反复檫写的只读程序存储器(PEROM) 和128 bytes的随机存取数据存储器(RAM), 器件采用ATMEL公司的高密度、非易失性存储技术生产,兼容标准MSC-5
6、1指令系统,片内置通用8位中央处理器(CPU)和Flash存储单元,功能强大AT89C51单片机可为您提供许多高性价比的应用场合,可灵活应用于各种控制领域。温度采集模块可以采用一只温度传感器 DS18B20,此传感器,可以很容易直接读取被测温度值,进行转换,电路简单,精度高,软硬件都以实现,而且使用单片机的接口便于系统的再扩展,满足设计要求 。利用单片机的一个I/O口的引脚,通过软件对这个引脚不断地输出高低电平来实现PWM波的输出,51系列单片机无PWM输出功能,可以采用定时器配合软件的方法输出。对精度要求不高的场合,非常实用。MCS - 51系列典型产品8051具有两个定时器T0和T1。通过
7、控制定时器初值T0和T1,,从而可以实现从8051的任意输出口输出不同占空比由于PWM信号软件实现的核心是单片机内部的定时器,而不同单片机的定时器具有不同的特点,即使是同一台单片机由于选用的晶振不同,选择的定时器工作方式不同,其定时器的定时初值与定时时间的关系也不同。温度是一种最基本的环境参数,在工农业生产及日常生活中对温度的测量及控制具有重要意义。本设计将介绍一种基于单片机的温度控制直流电机转速系统。该系统采用AT89C51单片机为核心,通过AT89C51 单片机驱动数字温度传感器DS18B20,进行温度数据采集,通过温度的比较和温度范围设定的程序控制产生PWM(脉宽调制)信号;通过L298
8、驱动芯片来控制直流电机的启动、速度、方向的变化;通过LM016L显示温度。所谓脉冲宽度调制是指用改变电机电枢电压接通与断开的时间的占空比来控制电机转速的方法,称为脉冲宽度调制(PWM)。PWM驱动装置是利用全控型功率器件的开关特性来调制固定电压的直流电源,按一个固定的频率来接通和断开,并根据需要改变一个周期内“接通”与“断开”时间的长短,改变直流电动机电枢上电压的“占空比”来改变平均电压的大小,从而控制电动机的转速。因此,这种装置又称为“开关驱动装置”。对于直流电机调速系统,其方法是通过改变电机电枢电压导通时间与通电时间的比值(即占空比)来控制电机速度。本次设计可以作为简单控制向复杂控制的过度
9、,实现直流电机启动、正反转控制和顺序控制外,还要进行转速控制。为以后复杂控制设计做基础。关键词:PWM; 单片机;温度;控制IntroductionIn electrical times today, the electric motor continuously is playing the very vital role in the modernized production and the life. According to the material statistics, now some 90% above power supplies from the electric mot
10、or, the electric motor and peoples life are closely linked, inseparable. Along with modernized step forward, the people are getting higher and higher to the automated demand, make the motor control to the more complex control development. As the fast development of microcomputer, AC/DC speed control
11、 system for digitization has reached the applied stage overseas. Since the hardware circuit of digital control system centered by microprocessor possesses the advantages that it has higher standardization and lower cost, and it doesnt be influenced by temperature drift of devices. Single chip comput
12、er has been becoming theocrat of factory automatic and all kinds of controlling field because of its good function, small volume, and good reliability. Furthermore, the control software of digital control system can carry through logical judgment and sophisticated operation, and it has the control l
13、aws of optimality, adaptive trait, nonlinear and intelligence, which are different from the ordinary linear adjustability. In every aspect the function of digital control system has exceeded analog control system and is being used widely.Now the market generally motor controller is used mostly singl
14、e-chip microcomputer and DSP. But before the processing capacity of single chip, using the complex of limited feedback control system, due to the need to deal with large amount of data, real-time and accuracy is high, often cant meet the design requirements. In recent years is made up of many a sing
15、le-chip microcomputer, its performance improved, the price is much lower than the DSP. The relevant software and development tool is more and more, function also is more and more strong, but the price is in the coming down. Now, more and more manufacturers started to improve product performance to p
16、rice ratio by single chip microcomputer.This paper MCU is required to be used in the circuit design, and SCM part should display function with. The monolithic integrated circuit to a certain position to temperature monitoring, when the external temperature acuity 45, motor speed up are turning, when
17、 the temperature acuity 75, motor are turning at full speed; When the external temperature more than 10, motor speed up, when the temperature inversion more than 0, motor reverse at full speed; When the temperature back to 10 45 when gradually stopped turning between motor.AT89C51 is the production
18、of low voltage ATMEL company high performance CMOS8 a microcontroller, piece contains 4 K bytes of read only can be repeated rewrite of the program memory (PEROM) and 128 bytes of data random access memory (RAM), the device using the high density of the ATMEL company, non-volatile storage technology
19、 of production, emcee standard MSC-51 instruction system of built-in general 8 bits, the central processing unit (CPU) and Flash storage unit, powerful AT89C51 single-chip microcomputer can provide you with many high ratio of performance to applications can be flexibly used in different kinds of con
20、trol field.Temperature acquisition module can use a temperature sensor DS18B20, the sensor, can easily be measured directly read temperature, for conversion, circuit is simple, high precision, software and hardware are to achieve, and use the interface chip for the system to expand, and meet the des
21、ign requirements.Using SCM an I/O mouth the pins, through the software to the pins are constantly output high and low level to realize the output of PWM waves, 51 series microcontroller no PWM output function, can be used with the method of software timer output. On the occasion of the precision req
22、uirement is not high, very practical.MCS-51 series products are two typical 8051 T0 timer and T1. Through the control timer T0 and T1, the initial value, and it can realize from the 8051 outlets output of any different than empty because of PWM signal software realize the core is the timer chip, and
23、 different internal microcontroller timer has different characteristic, even if is the same a microcontroller as a result of chosen crystals, choose different timer work in different ways, the timing of the timer initial and timing of the relationship between time is different also.The temperature i
24、s one of the most basic environmental parameters,In industrial and agricultural production and daily life on the temperature measurement and control system has important significance. This system uses AT89C51, Through AT89C51 drive digital temperature sensor DS18B20, The temperature data collection,
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 基于 单片机 温度 控制 直流电动机 转速 系统 设计
限制150内