欢迎来到三一文库! | 帮助中心 三一文库31doc.com 一个上传文档投稿赚钱的网站
三一文库
全部分类
  • 研究报告>
  • 工作总结>
  • 合同范本>
  • 心得体会>
  • 工作报告>
  • 党团相关>
  • 幼儿/小学教育>
  • 高等教育>
  • 经济/贸易/财会>
  • 建筑/环境>
  • 金融/证券>
  • 医学/心理学>
  • ImageVerifierCode 换一换
    首页 三一文库 > 资源分类 > DOC文档下载  

    本科毕业论文-基于MCS-51单片机的智能电风扇控制系统.doc

    • 资源ID:3935443       资源大小:832.50KB        全文页数:22页
    • 资源格式: DOC        下载积分:6
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录 QQ登录   微博登录  
    二维码
    微信扫一扫登录
    下载资源需要6
    邮箱/手机:
    温馨提示:
    用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP免费专享
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    本科毕业论文-基于MCS-51单片机的智能电风扇控制系统.doc

    XINYU UNIVERSITY 毕业设计(论文) (2014届) 题 目 基于MCS-51单片机的智能电风扇控制系统 二级学院 机械工程学院 专 业 机械制造及自动化 班 级 11级机制二班 学 号 学生姓名 指导教师 基于单片机的智能电风扇控制系统 目 录摘要1第一章 单片机智能系统概述及设计内容 31.1 智能电风扇控制系统概述31.2设计任务和主要内容3第二章 系统主要硬件电路设计 32.1总体硬件设计 32.2 数字温度传感器模块设计 42.2.1温度传感器模块组成 42.2.2 DS18B20的温度处理方法52.3电机调速与控制模块设计62.3.1 电机调速原理6 2.3.2 电机控制模块硬件设计 72.4 温度显示与控制模块设计 8第三章 系统软件设计 83.1 数字温度传感器模块程序设计83.2 电机调速与控制模块程序流程13 3.2.1 程序设计原理133.2.2 主要程序14结论 16参考文献 17致谢 18 摘 要随着科技的发展和人们生活水平的提高,家用电器产品趋向于自动化、智能化、环保化和人性化发展,我们可以设计一种智能电风扇控制系统来解决这些问题。以MCS-51单片机为核心,通过温度传感器对环境温度进行数据采集,从而建立一个完善的控制系统,使电风扇随空气中温度变化而自动变换档位,实现“温度高,风力大,温度低,风力弱”的性能。另外,风速设为从高到低5个档位,当温度每升高2则电风扇风速自动上升一个档位;当温度每降低2则电风扇风速自动下降一个档位。通过键盘手动设定,可以在一定范围内设置电风扇的最低工作温度,当温度低于所设置温度时,电风扇将自动关闭,当高于此温度时电风扇又将重新启动系统。做到降低工作成本提高工作效率,实现现在国家所提倡的节能减排口号。关键词:MCS-51单片机;自动换挡;温度控制;按键控制AbstractWith the development of science and technology and the increase of people's living standard, household appliances products tend to automation, intelligent, environmental protection and development of human nature, we can design a kind of intelligent electric fan control system to solve these problems. MCS-51 single chip microcomputer as the core, through the temperature sensor to the environment temperature data collection, and establish a perfect control system, the electric fan automatic transmission gear with the air temperature change, achieve "low temperature, wind, temperature, wind weak" performance. In addition, the wind speed is set to 5 from high to low gear, when temperature is rising every 2 electric fan speed automatically up a gear when temperature is every 2 below the fan speed automatic down a notch. By keyboard manual set, electric fan can be set to a certain range of the minimum operating temperature, when the temperature is lower than the set temperature, the fan will automatically shut down, when the temperature is higher than the electric fan and will restart the system. Now do to reduce the working cost efficiency, the realization of national advocate energy conservation and emissions reduction.Key words: MCS-51 single chip microcomputer; Automatic shift; Temperature control; The key control 第一章 单片机智能系统概述及设计内容1.1 智能电风扇控制系统概述 传统电风扇是220v交流电供电,电机转速分为几个档位,通过人为调整电机转速达到改变风力大小的目的,每次风力改变,必然有人加以操作,这样势必带来诸多不便。 本设计中的智能电风扇控制系统,是指将电风扇的电机转速作为被控制量,由单片机分析采集到的数字温度信号,在通过可控硅对风扇电机进行风速控制,从而达到无须人为控制便可自动调整风力大小的效果。1.2 设计任务和主要内容 本设计以MCS-51单片机为核心,通过温度传感器对环境温度进行数据采集,从而建立一个控制系统,是电风扇随温度的变化而自动变换档位,实现“温度高,风力大,温度低,风力弱”的性能,当温度低于所设置温度时,电风扇将自动关闭,当高于此温度时电风扇又将重新启动。本设计主要内容如下:1、风速设为从高到低5个档位,可由用户通过键盘手动设定。2、当温度每降低2这电风扇风速自动下降一个档位。3、当温度每升高2则电风扇风速自动上升一个档位。4、用户可设定电风扇最低工作温度,当低于该温度时,电风扇自动停转。 第二章 系统主要硬件电路设计2.1 总体硬件设计系统总体设计框图如图所示3 系统原理框图 对于单片机中央处理系统的方案设计,根据要求,我们可以选用具有4KB片内E2PROM的AT89C-51单片机作为中央处理器。作为整个控制系统的核心,AT89C51内部已包含了定时器、程序存储器、数据存储等硬件,其硬件能符合整个控制系统的要求,不需要外接其他存储器芯片和定时器件,方便地构成一个系统。整个系统结构紧凑,抗干扰能力强,性价比高。是比较合适的方案。2.2 数字温度传感器模块设计 温度传感器可以选用LM324A的运算放大器,将其设计成比例控制调节器,输出电压与热敏电阻的阻值成正比,但这种方案需要多次检测后方可使采样精确,过程过于烦琐。所以我采用更为优秀的DS18B20数字温度传感器,它可以直接将模拟温度信号转化为数字信号,降低了电路的复杂程度,提高了电路的运行质量。2.2.1 温度传感器模块组成 本模块以DS18B20作为温度传感器,AT89C51作为处理器,配以温度显示作为温度控制输出单元。整个系统力求结构简单,功能完善。电路图如下所示。系统工作原理如下: DS18B20进行现场温度测量,将测量数据送入AT89C51的P3.7口,经过单片机处理后显示温度值,并与设定温度值的上下限值比较,若高于设定上限值或低于设定下限值则控制电机转速进行自动调整。 2DS18B20温度计原理图2.2.2 DS18B20的温度处理方法DS18B20直接将测量温度值转化为数字量提交给单片机,工作时必须严格遵守单总线器件的工作时序。 部分温度值于DS18B20输出的数字量对照表2.3 电机调速与控制模块设计 电机调速是整个控制系统中的一个重要的方面。通过控制双向可控硅的导通角,使输出端电压发生改变,从而使施加在电风扇的输入电压发生改变,以调节风扇的转速,实现各档位风速的无级调速。2.3.1 电机调速原理 可控硅的导通条件如下: 1)阳-阴极间加正向电压; 2)控制极-阴极间加正向触发电压; 3)阳极电流IA大于可控硅的最小维持电流IH 电风扇的风速设为从高到低5、4、3、2、1档 ,各档风速都有一个限定值。在额定电压、额定功率下,以最高转速运转时,要求风叶最大圆周上的线速度不大于2150m/min。且线速度可由下列公式求得: 式中,V为扇叶最大圆周上的线速度(m/min),D为扇中的最大顶端扫出圆的直径(mm);n为电风扇的最高转速(r/min)。代入数据求得5n1555r/min,取n5=1250 r/min.又因为: 取n1=875 r/min.则可得出五个档位的转速值: 5n=1250r/min 4n=1150r/min 3n=1063r/min 2n=980r/min 1n=875r/min 又由于负载上电压的有效值: 其中,u1为输入交流电压的有效值,为控制角。解得: 以上计算出的是控制角和触发时间,当检测到过零点时,按照所求得的触发时间延时发脉冲,便可实现预期转速。2.3.2 电机控制模块硬件设计 电路中采用了过零双向可控硅型光耦MOC3041,集光电隔离、过零检测、过零触发等功能于一身,避免了输入输出通道同时控制双向可控硅触发的缺陷,简化了输出通道隔离2驱动电路的结构。所设计的可控硅触发电路原理图,其中RL即为电机负载,其工作原理是:单片机响应用户的参数设置,在I/ O口输出一个高电平,经反向器反向后,送出一个低电平,使光电耦合器导通,同时触发双向可控硅,使工作电路导通工作。给定时间内,负载得到的功率为: 式中:P为负载得到的功率KW为给定时间内可控硅导通的正弦波个数;N为给定时间内交流正弦波的总个数; U为可控硅在一个电源周期全导通时所对应的电压有效值,V;I为可控硅在一个电源周期全导通时所对应的电流有效值A。由式可知,当U , I , N为定值时,只要改变n值的大小即可控制功率的输出,从而达到调节电机转速的目的。 电机控制原理图2.4 温度显示与控制模块设计 通过HD7279A控制芯片组建一个单片机键盘输入与显示模块,其中包括一个2*8的键盘矩阵和8段动态扫描数码管显示。与单片机通过接插件连接,可以用于系统的控制和输出,其原理图如图所示: HD7279A 键盘和显示器控制模块电路原理图第三章 系统软件设计3.1 数字温度传感器模块程序设计 本系统的运行程序采用汇编语言编写,采用模块化设计,整体程序由主程序和子程序构成。 数字温度传感器模块程序流程图如图所示,主机控制DS18B20完成温度转换工作必须经过三个步骤:初始化、ROM操作指令、存储器操作指令。单片机所用的系统频率为12MHz。根据DS18B20初始化时序、读时序和写时序分别可编写4个子程序:初始化子程序、写子程序、读子程序、显示子程序。 DS18B20芯片功能命令表主要程序如下:MAIN: ;初始化LCALL RST_DS18B20LCALL GET_TEMPERMOV A,20HMOV C,08HRRC AMOV C,09HRRC AMOV C,10HRRC AMOV C,11HRRC AMOV 20H,ALCALL DISPLAYAJMPMAINRST_DS18B20:SETB P3. 7NOPCLR P3. 7MOV R1, #3RST1:MOV R0, #110DJNZ R0, $DJNZ R1,RST1SETB P3. 7NOPNOPMOV R0, #25HRST2:JNB P3. 7,RST3DJNZ R0,RST2LJMP RST4RST3: SETB FLAGLJMP RST5RST4:CLR FLAGLJMP RST7RST5:MOV R0, #115RST6:DJNZ R0, $RST7: SETB P3. 7RETWR_DS18B20: ;写数据子程序MOV R2, #8CLR CWR1: CLR P3. 7MOV R3, #6DJNZ R3, $RRC AMOV P3. 7,CMOV R3, #25DJNZ R3, $SETB P3. 7NOPDJNZ R2,WR1SETB P3. 7RETRD_DS18B20: ;读数据子程序MOV R4, #2MOV R1, #20HREAD1:MOV R2, #8READ2:CLR CSETB P3. 7NOPNOPCLR P3. 7NOPNOPNOPSETB P3. 7MOV R3, #9READ3:DJNZ R3,READ3MOV C, P3. 7MOV R3, #23READ4:DJNZ R3,READ4RRC ADJNZ R2,READ2MOV R1,AINC R1DJNZ R4,READ1RET3.2 电机调速与控制模块程序流程3.2.1 程序设计原理 采用双向可控硅过零触发方式,由单片机控制双向可控硅的通断,通过改变每个控制周期内可控硅导通和关断交流完整全波信号的个数来调节负载功率,进而达到调速的目的。 由于INT0信号反映工频电压过零时刻,因此只要在外中断0的中断服务程序中完成控制门的开启与关闭,并利用中断服务次数对控制量n进行计数和判断,即每中断一次,对n进行减1计数,如果n不等于0,保持控制电平为“1”,继续打开控制门 ;如n=0,则 使 控 制 电 平 复位“0”,关闭控制门,使可控硅过零触发脉冲不再通过。这样就可以按照控制处理得到的控制量的要求,实现可控硅的过零控制,从而达到按控制量控制的效果,实现速度可调。 1)回路控制执行程序。主回路控制执行程序的任务是初始化数据存储单元,确定电机工作参数NminNmax,并将其换算成“有效过零脉冲”的个数;确定中断优先级、开中断,为了保证正弦波的完整,工频过零同步中断INT0确定为高一级的中断源。 2)断服务程序,执行中 断服务程序时,首先保护现场,INT0中 断标志置位,禁止主程序修改工作参数,然后开始减1计数,判断是否关断可控硅,最后INT0中断标志位清零,还 原初 始化数据,恢复现场,中断返回。(设1秒钟通过波形数N=100) 中断流程图如图所示: 电机控制模块中断响应流程图3.2.2 主要程序外中断INT0的部分中断响应程序如下:ORG 0003HINTD0:PUSH ACCPUSH PSWPUSH DPHPUSH DPLSETB 24H.0MOV A, 5FHJZ TING1DEC AMOV 5FH,ALJMP FAN2TING1: FAN2:MOV A, 5BHJZ TING2DEC AMOV 5BH, ALJMP ZONGTING2:ZONG:MOV A, 59HJZ KAIDEC AMOV 59H, ALJMP EXITKAI:CLR 24H.0JB 26H.0, KAI2KAI2:MOV A, 66HJZ EXIT1EXIT1:MOV 5FH,5AHMOV 5BH,66HMOV 59H,#100EXIT:POP DPLPOP DPHPOP PSWPOP ACCRETI 结 论 通过这次毕业设计我在很大程度上提高了自己的独立思考能力和关于单片机知识的掌握,我们正处在节能化和智能化高速发展时代,发展单片机是未来的趋势。在机械加工生产领域中想要得到有效率的生产能力和可观的效益,单片机在这方面是个不可缺少的课题,它的很多知识都应用在机电一体化中。现代人类生活中所用的几乎每件电子和机械产品中都会集成有单片机。 我们通过用MCS-51单片机为核心,通过温度传感器对环境温度进行数据采集,从而建立一个完善的控制系统,实现电风扇随空气中温度变化而自动变换档位,可以再一定范围内设置电风扇的最低工作温度,当温度低于所设置温度时,电风扇将自动关闭,当高于此温度时电风扇又将重新启动的系统。进一步实现了降低工作成本提高工作效率,响应了国家所提倡的节能减排口号。 参 考 文 献1楼然苗 李光飞.51单片机设计实例M .北京航空航天大学出版社 2003.32余永权 汪明慧.单片机在控制系统中的的应用.电子工业出版社 2003.103陈伯时 .电力拖动自动控制系统 .机械工业出版社 2010.54杨靖用 .单片机控制的直流电机调速系统机床电路 2008.15陈正义 .单片机控制实习.人民邮电出版社 2006.76张鑫 .单片机原理及应用.电子工业出版社 2006.57明德刚 .DS18B20在单片机温控系统中的应用 2006.8黄朝民.肖明清.吴志强 .单片机原理与应用.现代电子技术 2006.129刘进山 .基于MCS-51电风扇只能调速器的设计.电子质量 2004.610陈杰.黄鸿等 .传感器与检测技术.北京高等教育出版社 2002.811陈丽芳 .单片机原理与控制技术.东南大学出版社 2003.112刘迎春,叶湘滨 .传感器原理设计与应用.国防科技大学出版社 2003.513何立民 .单片机应用技术编选.北京航空航天大学出版社 2004.914基维百科网站 www.wikipedia.com15百度网站 www.baidu.com 致 谢 非常感谢彭小军导师对我们的耐心指导,这次毕业设计不只是我们智慧的产物更饱含了彭老师对我们的深情教导和知识点拨,让我们能把这次毕业设计顺利完成。通过这次毕业设计我对单片机又有了更深的了解,发现我们的很多机械产物都和单片机有着息息相关的联系。再次感谢我的导师彭小军对我论文的构思以及内容不厌其烦的指导和细心指点,使我在完成论文的同时也深受启发和教育给予我很多教益。虽然只有短短的三年,但是在学校却让我感受到了家的温暖,让我对人生进一步有了明确的目标。您好,为你提供优秀的毕业论文参考资料,请您删除以下内容,O(_)O谢谢!A large group of tea merchants on camels and horses from Northwest China's Shaanxi province pass through a stop on the ancient Silk Road, Gansu's Zhangye city during their journey to Kazakhstan, May 5, 2015. The caravan, consisting of more than 100 camels, three horse-drawn carriages and four support vehicles, started the trip from Jingyang county in Shaanxi on Sept 19, 2014. It will pass through Gansu province and Xinjiang Uygur autonomous region, and finally arrive in Almaty, formerly known as Alma-Ata, the largest city in Kazakhstan, and Dungan in Zhambyl province. The trip will cover about 15,000 kilometers and take the caravan more than one year to complete. The caravan is expected to return to Jingyang in March 2016. Then they will come back, carrying specialty products from Kazakhstan A small art troupe founded six decades ago has grown into a household name in the Inner Mongolia autonomous region. In the 1950s, Ulan Muqir Art Troupe was created by nine young musicians, who toured remote villages on horses and performed traditional Mongolian music and dances for nomadic families. The 54-year-old was born in Tongliao, in eastern Inner Mongolia and joined the troupe in 1975.He says there are 74 branch troupes across Inner Mongolia and actors give around 100 shows every year to local nomadic people. "I can still recall the days when I toured with the troupe in the early '80s. We sat on the back of pickup trucks for hours. The sky was blue, and we couldn't help but sing the folk songs," Nasun says. The vastness of Inner Mongolia and the lack of entertainment options for people living there, made their lives lonely. "The nomadic people were very excited about our visits," Nasun recalls. "We didn't have a formal stage. The audience just sat on the grass. Usually, the performances became a big party with local people joining in." For him, the rewarding part about touring isn't just about sharing art with nomadic families but also about gaining inspiration for the music and dance. Ulan Muqir literally translates as "red burgeon", and today's performers of the troupe still tour the region's villages and entertain nomadic families, but their fame has spread around the world. On May 16 and 17, nearly 100 singers and dancers from the troupe performed at Beijing's Poly Theater. Their show, titled Ulan Muqir on the Grassland, depicted the history and development of the art troupe. "Being from the region allowed me to embrace the culture of Inner Mongolia and being a member of the troupe showed me where I belonged," Nasun, the art troupe's president, who is also a renowned tenor, tells China Daily. During a tour in 1985, he went to a village and met an elderly local man, who told him a story about his friendship with a solider from Shenyang, capital of Northeast China's Liaoning province, decades ago. The solider gave the old man a handmade saddle when they bid farewell. The story inspired Nasun to write Carved Saddle, a song that later became one of his most popular numbers. Now, every year, Nasun recruits young singers and dancers for the troupe. The troupe has also designed a new repertoire, which is mostly based on the daily lives of Mongolian people, especially the lives of nomadic families, and has combined contemporary musical elements with folk songs of the region. Haimu, a 25-year-old khoomei (a local variant of overtone singing) singer, joined the troupe three years ago. Along with a six-member band, he performs fast songs and soft ones that he writesall while playing the horse-head fiddle."Although I learned the piano since childhood and grew up listening to various kinds of music, to me, the folk music of Inner Mongolia is the root," he says. "Performing in remote villages is pleasant. I feel at home on the boundless grasslands, and the warm people there make me feel fulfilled." The first round of spring auction season in Beijing ended last week, but it failed to create much spring in the art market. Although two pieces of Chinese painting fetched more than 100 million yuan, the decline in trading volume and sale rate showed a downturn this year. In the “Grand View: Chinese Painting Highlight” session at China Guardian 2015 spring auctions, Pan Tianshous representative work Eagle, Rock and Flora hit a record auction price of 279 million yuan, while Li Kerans masterwork Jinggang Mountain fetched 126.5 million yuan, an unexpected high in recent years. However, the trading volume fells to 1.87 billion yuan from 2.22 billion yuan in the same period the year before. The Huangchen 2015 Spring Auctions, which recorded 42.5 million yuan in total sales, experienced the same. The section number went down to 5 from 12 compared to last year. According to expert Shao Jianwu, the art market did not attract much excitement this year due to the booming stock market and the persistent problems of forgery and fake deals. The two pieces of Chinese painting notched up high price this spring due to their own value not due to a revival in the market. "The successful transaction of two works with a hammer price of more than 100 million yuan once again confirms that valuable and rare works of high quality always earn the long-lasting high price. Chinese painting and calligraphy is still the pillar of the market. However, the overall sales rate has dropped slightly, which reflects the demand for the ordinary auction goods has weakened,” said the president of China Guardians Hu Yanyan. "Besides, the entry of new buyers also makes certain changes to the dir

    注意事项

    本文(本科毕业论文-基于MCS-51单片机的智能电风扇控制系统.doc)为本站会员(小小飞)主动上传,三一文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三一文库(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    经营许可证编号:宁ICP备18001539号-1

    三一文库
    收起
    展开