51单片机温控风扇仿真原理图 C语言程序,AT89C51单片机的电风扇控制系统设计+流程图+仿真图.doc...

基于AT89C51的温控电风扇系统设计,利用温度传感器采集信号,实现风扇转速自动调节。系统包括单片机、按键、温度传感、显示、蜂鸣器、电机驱动及控制电路。提供三种工作模式,自动模式下根据温度调整转速,支持15℃至40℃的温度范围控制。
摘要由CSDN通过智能技术生成

AT89C51单片机的电风扇控制系统设计流程图仿真图

AT89C51单片机的电风扇控制系统设计+流程图+仿真图

摘 要:本文设计了以AT89C51为控制核心的温控电风扇系统。由温度传感器采集的温度信号,通过数字转化转化成单片机能够识别的数字信号,作为控制信号输入单片机,实现对风扇的控制。系统集成了单片机系统、按键输入电路、温度传感电路、显示电路、蜂鸣器电路、电机驱动电路以及电机控制电路。克服了普通电风扇无法根据外界温度自动调节转速困难,控制更加灵活。4957

关键词:AT89C51单片机;控制系统;电机

Design of Fan Which Based on the Intelligent Control of the MCU

Abstract: This system of temperature controlling fan is designed on AT89C51 as the control core, Collected by the temperature sensor which can convert temperature signal into the digital signal as a control signal inputting chip, to achieve the control of the fan. System integrates SCM system, the key input circuit, the temperature sensing circuit, display circuit, buzzer circuit, motor drive circuits and motor control circuits. The system can overcome the common fan automatically which can not adjust the speed according to the out

#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、付费专栏及课程。

余额充值