家用风扇控制系统c语言程序设计,智能风扇控制系统设计.doc

- PAGE IV -

摘 要

由于当今信息技术的高速发展,温度的测量与控制系统在工业和农业以及人们的日常活动中充当着一个日趋重要的角色,它对我们的日常生活具有诸多的影响,因此温度的采集以及其控制系统的开发与研究有十分重要的意义。所以温度控制现在的社会中的生产制造对风扇的运用以及人们的生活和活动中都有应用和涉及,比如在大量的工业生产制造中生产机械的散热所需要用到风扇、又例如我们日常用的笔记本电脑上的CPU风扇、家庭日常生活中用的风扇等等。伴随着我们的生活与活动中对温度需要精确控制的要求不断的增加,风扇的智能控制的应用也越发广泛,因此一件可以通过自身系统智能的对温度变化做出相应控制的智能风扇控制系统越来越成为发展的需要。因此从此目的出发,我该篇论文介绍的主要是一类基于AT89C51单片机基础上的风扇根据温度智能调控速度的设计,本设计项目以AT89C51单片机为核心点,运用到能及时并且精确的采集环境温度的温度传感器电路,同时采用了双向晶闸管对电动机加以无级调速,通过将风扇的控制中加以智能控制技术,利用周围生活或者生产的环境中的温度对风扇进行温度控制。并且可以通过收集到的外部温度,通过达林顿反向驱动装置来驱动风扇电机转动。利用检测到的外界温度与人们一开始系统中设定温度来对风扇电机的启动和停止进行智能化得控制,同时能够根据环境温度的改变智能的改变风扇的转速,以实现对温度的控制要求。同时我们还运用到LED数码管对检测到的温度与设定的温度进行显示,更有利于度温度控制的掌控,以实现对环境温度的智能控制,并做出相应的措施来控制温度变化。

关键词:

单片机;

DS18B20温度传感器;

温控风扇;

Abstract

Due to the rapid development of modern information technology today, the temperature measurement and control system in industry and agriculture and People's Daily activities plays an increasingly important role, it has many effects on our daily life, so the temperature acquisition and control system of its research and development has the very vital significance. So the temperature control fan in today's society in the production and life activities of each people all have a wide range of applications and involve, for example, in most of the industrial production of large production machinery of the cooling fan, and in the system such as everyone's laptop on the application of intelligent CPU fan, family daily life with the fan, and so on. Along with our life and activity of requires precise temperature control requirements unceasing increase, the application of intelligent control fan more widely, so one can through to its own system of intelligent control of temperature change accordingly more and more become the needs of the development of smart fan control system. Purpose so from now on, I this paper introduces the main is a kind of based on AT89C51 single chip microcomputer based on fan according to the design of the temperature intelligent control speed, the

#include //#include #include"18b20.h" #include"12864.h" #include"ds1302.h" #include"风型.h" //#include"测速.h" #define uchar unsigned char #define uint unsigned int void Temperature(); void disp(uchar i,uchar j,uchar k,uchar x,uchar y,uchar z,uchar aa); void LcmClearBMP(); void LcmInit(); void zscl(uchar zsdata); void pwmmain(); void pwmkey(); void get_time(); void ds1302_init(); void set_time(); void set_ytime(); void d1(); void TEM(); void main() { uchar z,secs,secg,mins,ming,hours,hourg; TMOD=0x15; EA=1; ET1=1; EX1=1; IT1=0; TR0=1; TR1=1; pwmmain(); LcmClearBMP(); LcmInit(); ds1302_init(); set_time(); set_ytime(); PutStr(0,0,str2); FINT0=0; while(1) {while(!(FINT0)) { for(z=0;z<10;z++) { get_time(); secs=secsw(); secg=secgw(); mins=minsw(); ming=mingw(); hours=hoursw(); hourg=hourgw(); disp(hours,hourg,mins,ming,secs,secg,1); } TEM(); } while(FINT0) { if(jianzhi[0]==1) {if(jianzhi[1]==0) {TR0=0; TR1=0; LcmInit(); PutStr(0,0,str2); switch(jianzhi[3]) { case 0:{ WriteCommand(0x85); WriteData('0'); qq=zz=rr=1; } break; case 1:{ WriteCommand(0x85); WriteData('1'); rr=0; qq=zz=1; } break; case 2:{ WriteCommand(0x85); WriteData('2'); zz=0; qq=rr=1; } break; case 3:{ WriteCommand(0x85); WriteData('3'); qq=0; zz=rr=1; } break; } } else if(jianzhi[1]==1) { TR0=1; TR1=1; LcmInit(); PutStr(0,0,str4); //自然风 } else if(jianzhi[1]==2) { TR0=1; TR1=1; LcmInit(); PutStr(0,0,str5); //睡眠风 } } TEM(); if(P3_3)FINT0=0; } } } void TEM() {uchar Tsw,Tgw,Txs; Temperature(); pwmkey(); Tsw=isean(); Tgw=jsean(); Txs=ksean(); disp(Tsw,Tgw,Txs,0,1,2,0); }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值