基于单片机控制的快热式家用电热水器的设计
摘要
随着人们生活水平的不断提高,单片机控制无疑是人们追求的目标之一,它所给人带来的方便也是不可否定的,其中家用电热水器就是一个典型的例子。在本设计中采用单片机AT89C51作为控制器来控制电路。本设计分别对硬、软件进行设计说明。硬件包括加热控制电路,温度检测电路,LED数码管及指示灯显示电路及报警器驱动电路等的设计,比如,利用热敏电阻对热水器出口温度进行检测;用温度频率转换电路通过单片机的检测间接测出温度值;用单片机通过光耦给可控硅触发信号,控制可控硅的导通角而控制电热丝的有效加热功率;用继电器来控制加热电源,使其在关机和超温保护的状态下可靠的关断;用在继电器线圈回路中串联105℃的熔丝来防止温度过高时加热管干烧。软件部分给出了部分程序流程图的设计,包括主程序的设计、显示扫描子程序的设计、按键扫描处理子程序的设计、加热和控制程序流程图的设计、温度检测程序的设计、频率测试程序的设计。软件编程采用C语言编写,因为其简洁、使用方便灵活、容易实现程序的模块化和结构化。
关键词:单片机;电热水器;温度频率转化测温;二分查找法
Desig
ofrapidheati
gtypehouseholdelectricwaterheaterbasedo
si
glechipmicrocomputerco
trol
fAbstract
Aspeoplelivi
gsta
dardriseceaselesslythesi
glechipmicrocomputerco
trolisu
doubtedlyo
eofthegoalsofthepeopletopursueitbri
gsco
ve
ie
ceis
ot
egativehouseholdelectricwaterheaterisatypicalexampleofitI
thisdesig
usesAT89C51microco
trollerastheco
trollertoco
trolcircuitThedesig
ofhardwarea
dsoftwarerespectivelydesig
a
dexplai
sHardwarei
cludi
gheati
gco
trolcircuittemperaturedetectio
circuitLEDdigitalpipea
di
dicatorshowscircuita
dalarmdrivercircuitdesig
forexampleusi
gthermalresista
ceofthewaterheateroutlettemperaturetesti
gUsetemperaturefreque
cyco
versio
circuitismeasuredbysi
glechipmicrocomputerdetectio
i
directtemperatureWithsi
glechipmicrocomputerco
trolledbylightcouplertotriggersig
alCo
troltheco
ductio
a
glesoftheSCRa
dco
troloftheresista
cewireeffectiveheati
gpowerUserelaytoco
troltheheati
gpowersothattheshutdow
a
dovertemperatureprotectio
u
dertheco
ditio
ofreliableshutoffUsedi
relayscoilloopi
ta
dem105℃meltsilkofhightemperaturetopreve
tdryheati
gtubewhe
bur
tSoftwarepartgivespartoftheprogramflowcharti
cludi
gthedesig
ofmai
programdesig
thedesig
ofsubrouti
esthatdisplaysca
i
gbutto
ssca
i
gprocessi
gproceduredesig
heati
ga
dco
trolprogramflowchartdesig
temperaturedetectio
pr