The Controller of the Domestic Electric Water-Heater
1. The perspectives of appliance
Water-heater is a kind of domestic electric appliance which can be used in bathroom, wash room and kitchen. The types of water-heater available in the market at present includes: electric water-heater, solar water-heater, gas water-heater. To be specifically in China, the use of solar water-heater is limited by the weather and the scope for use is narrow while gas water-hater is fueled by petrol and gas, the supply of which will be difficult to meet the increasing demands and bad for environment. So the electric water-heater has become more and more popular among customers. According to statistics from Chinese commercial federation not long ago, the market share of electric water-heater in sales volume and sales revenue has surpassed the gas water-heater which keeps ahead for along time. It is predicted by this federation that driven by the larger-scale reconstructing of the electric network in the city and the extensive startup of the housing market in the city, the market for electric water-heater will present the strong growth tendency in the next few years.
2. The Goal for Design
There are two kinds of electric water-heaters available in the market at present: the continual fluent type and water storage type. Considering the special demand of the moist working conditions on single chip, we adopt the newly promoted MC68HC08 single chip by Motorola to be the control center. With its high resistance to interference, steady working, flash memory and so on, this single chip can satisfy the demand of the electric water-heater with high performance. Also considering the fierce competition in domestic appliances industry, we will realize these functions by using components as simple as possible to reduce the cost. We will make full use of the internal and outer functions to enhance the performance-to-price ratio. With few improvements, it can be produced massively with low cost in practice.
3. The LZC-CI Hardware Design
3.1 Technology Standards and Characteristics
The main function of the controller is to control the temperature. Besides that, it has to realize the following functions:
To display the real-time temperature of water, the range is 0~99℃.
To set the temperature of water arbitrarily within 20~80℃.
Have the function of appointment which enables 24 hour turning on setting willfully.
Have LTD to display real-time temperature digitally. When setting, the temperature and the time set will be displayed by flicker and the controller will have instructions of appointment, heat preservation and heating.
Able to look over and revise the time of system.
Equipped with remote controller, the control will be easy and simple.
Cut the power swiftly when temperature is too high and alarm.
When electricity leaks, cut the power swiftly and propose alarming.
When the power is cut, the data set can be preserved.
3.2 The Structure of the System
The system consists of two main parts: the main controller of water-heater and the remote controller, realized by two pieces of 68hc908gr8 respectively.
3.2.1 The Power Supply and the Clock Circuit
The power circuit consists of the transformation bridge, the rectification bridge, the filter resistance, the pressure sensitive resistance and integration voltage-stabilizer circuit MC7812T and MC7805T, which can provide 5V and the 12V power source for the controller. OutsideOSC1 and OSC2, 8 kHz crystal oscillator is connected with the circuit.
3.2.2 The Keyboard
The function of controlling and the enactment of parameters are realized by the pressing the keys. The two keys of the systemrsquo;s main controller complete directly the functions of heating and the inquiring of the water level, using the keyboard severance pattern and PTA2, PTA3 as the input entrance of the pressing. The keyboard of the remote controller is designed into matrix type. The pressing of the keys will initiate the keyboard severance, by scanning from line to line; the number of the key can be judged and then sent to the register for preservation and the delivering. The main procedure will deal with it in the keyboard procedure after receiving the number of the key. Since there will be vibration at the moment of turning on and off, the design uses software time delay to eliminate the vibration.
3.2.3 The Display Circuit
Considering that the working environment is humid, the main controller takes LED Nixie tube to display. It takes the main way of SPI to expand two piece of 74LS164 as the output orifice of the static demonstration of the seven-segment display. When there is no pressing, the main controller will display the current temperature of water and the remote controller will display the current time; when setting or inquiring, the remote controller and main controller will flash to display the information set or inquired while when stopping pressing, the display will automatically back to normal.
3.2.4 The Real-time Temperature of Water and the Circuit of Water-Level Detecting
The thermistor will transmit the temperature information into the voltage information and then will be input into CPU by the PTB0 A/D transformation module. After checking, the real-time temperature will be deduced. The circuit of water-level detecting consists of the parallel connection of three resistances with different resistance value. The electricity of the electrode is small (only several microamperes), thus the erosion is little which suits the wide range variety of the resistance of water(10K一100K O). When the water of level of certain resistance doesnrsquo;t arrive where the resistance is, the resistance will not work; when the water-level arrives, the three resistances are linked into parallel connection. The information of water-
剩余内容已隐藏,支付完成后下载完整资料
智能家用电热水器控制器
1. 应用前景
热水器是一种可供浴室,洗手间及厨房使用的家用电器。目前市场上热水器主要品种有:电热水器、太阳能热水器、燃气热水器。就中国的具体情况而言,由于太阳能热水器的使用受天气原因的限制,使用范围狭窄,燃气热水器由于以石油、天然气为燃料,而燃料供应量又难以满足人们日益增长的需求,且不利于环境,因此电热水器越来越受到消费者的青睐。根据中国商业联合会前不久的统计,电热水器的市场份额在销售数量和销售收入两个方面都已经超过了长期以来占优势的燃气热水器。该中心预计,在城市电网更大范围改造和城市住房市场大规模启动的带动下,今后几年我国电热水器市场将呈现强劲增长势头。
2. 设计目标
目前市场上的电热水器有两种,连续水流式和贮水式。由于考虑到热水器的潮湿的工作环境对单片机的特殊要求,我们采用了摩托罗拉新推出MC68HC08系列的单片机作为控制中心。它具有抗干扰能力强,工作可靠稳定,自带flash闪存等特点,完全满足高性能的电热水器的控制要求。同时考虑到家电业的激烈竞争,节约生产成本,我们用尽量简单的器件实现这些功能,并充分利用内外围功能,以提高产品的性价比,稍加改进,便能以较低成本应用于实际批量生产中。
3. LZC-CI硬件设计
3.1 技术指标及特点:
控制器的最主要目的是对水温进行控制,除此之外还实现下述功能:
实时显示水温,范围为0~99℃
可在20~80℃范围任意设定水温
具有预约功能,24h任意设定开机时间
具有LED数码显示实时温度,进行设定操作时闪烁显示设定水温、时间,并有预约、保温/加热指示
可随时察看和校正系统时钟
配有遥控器,控制更加简单方便
超温断电保护并报警功能
出现流故障时,迅速切断电源并提示报警功能
系统断电能保护设定数据
3.2 系统结构
系统分两个主要部分:热水器主控制器与遥控器,采用两片68hc908gr8分别实现。
3.2.1 电源与时钟电路。
电源电路由变压桥、整流桥、滤波电阻、压敏电阻和集成稳压电路MC7812T及MC7805T组成,可为控制器提供 5V和 12V电源。OSC1,OSC2外接8kHz晶体振荡器。
3.2.2 键盘。
控制器的功能及参数设定都是通过按键来实现,本系统主控制器两个按键完成直接加热及查询水位的功能,采用键盘中断模式,PTA2,PTA3作为按键的输入口。遥控器键盘采用矩阵式,当有按键按下是引发键盘中断,通过逐行扫描判断所按键号,送寄存器保存并发送,主程序接收到键号后在键盘处理程序中进行处理。机械式开关在断开和闭合瞬间有抖动过程,程序设计中采用软件延时消抖。
3.2.3 显示电路
考虑到使用环境空气湿度较大,故主控制器显示采用LED数码管进行显示。采用SPI主方式扩展两片74LS164,作为七段显示器静态显示的段数据输出口。在无按键状态下,主控制器显示当前水温,遥控器显示当前时间;当进行设定或查询时,遥控器lcd及主控制器led均闪烁显示设定或查询信息,按键放开一定时间后自动返回一般状态。
3.2.4 实时水温及水位检测电路。
热敏电阻将温度信息转换为电压信息,经A/D转换模块中PTB0输入CPU,查表后得到实时水温。水位检测为三个并联的不同阻值的电阻,电路的电极电流较小(几个微安),电腐蚀小,适用水电阻变化范围大(10 K一100K欧)。某电阻所在水位未到达,电阻截止;水位到达,电阻导通,组成并联电路。将不同阻值所分得的电压经PTB1转换后,可判断出水位信息(高、中、低、干烧)。
3.2.5漏电检测及报警电路
热水器工作环境潮湿,为了保证使用者安全,控制器应具备漏电检测功能。在正常情况下,流过磁环的电流大小相等,方向相反,磁环检测线圈无感应电流信号,漏电检测集成电路输出低电平。当出现漏电电流时,由于流过磁环的电流不平衡,于是磁环检测线圈感应出漏电信号,经集成电路M54123L 放大输出高电平,经三极管倒相后输出至CPU。CPU接收到漏电信号,则停止加热保温及键盘操作,结束工程程序并发出报警信号,电源指示灯闪烁警示,蜂鸣器连续呜响。
正常情况下,CPU 每隔10ms就发出一个漏电保护可靠性自检脉冲,代替普通漏电开关的试验按钮,控制晶体管导通,于是磁环流过一个大于10mA 的电流,该电流作为模拟漏电信号被磁环检测,经M54123L放大及三极管倒相后,输出至CPU。CPU自动判断是否为自检信号以及自检是否合格,有信号则自检合格,继续执行程序;无信号则自检不合格,自动停止加热保温及键盘操作,结束工作程序并发出报警信号,电源指示灯闪烁警示,蜂鸣器连续呜响,从而确保电热水器的安全使用。在漏电保护及自检不合格情况下,只有关闭电源及排除故障后,重新接通电源才能工作。
3.2.6 加热及继电器失控保护电路:
电热水器正常工作状态下,二继电器触点对加热管的电源能执行双极断开,可有效地保证当停止加热时,加热系统可完全与外电隔离.两只继电器同时出现故障的几率是极低的,但在热水器正常寿命期间,单只继电器出现此故障却是极有可能的,而且,此时如不及时处理解决,另一继电器很有可能不久后也跟着产生此类故障而导致真正的危险。因此,解决问题的关键是必须在有一继电器出现此故障后,系统可以及时检测到,并依靠另一暂时尚可以正常工作的继电器执行系统的安全保护措施,可以有效地检测到两个继电器中任一个或同时两个触点出现粘死、断开故障时的情况。
3.2.7 遥控器
遥控部分采用简单控制电路,又不会减少功能,将有些硬件电路用软件实现,并且充分考虑到了抗干扰问题。整个遥控器由于电池供电需要节省能量,采用低功耗模式,系统不工作时处于stop状态,用键盘信号中断低功耗模式进入正常模式(按键唤醒系统),低压复位采用MC34064复位。键盘接入采用双列矩阵式,接入PTA0~PTA3口,设置为keyboard状态,这样键盘一按下马上产生键盘中断,使系统由stop状态退出进入正常状态。晶振为6MHZ。红外信号输出采用软件编码方式,主控制器软件解码。为节省成本,显示采用LCD 定制显示方式,驱动使用4543驱动+译码。
4. 软件设计
统软件由主程序,中断服务程序及若干功能模块子程序组成。其中主控制器子程序包括A/D转换子程序(水位、水温),键盘处理及显示子程序,加热控制子程序(使用输出比较功能),红外信号接收子程序(使用输入捕捉功能),漏电、干烧保护子程序,TBM模块日历钟子程序,数据保存子程序,延时子程序等组成。中断主要有定时中断,键盘输入中断,TIM输入捕捉中断,TBM模块中断等。遥控器子程序主要有按键处理子程序,红外信号发射子程序,LCD显示子程序,TBM模块日历钟子程序。
4.1 主程序。主程序要先初始化系统的工作参数,主要是CPU的定时器,COP模块、A/D转换、端口、键中断等的工作模式参数设定。之后系统主程序循环调用各个功能模块子程序。对相关事件的处理依靠标志位和判断标志位实现。
4.2 键盘处理及显示子程序。此程序主要是判断I/O口的高低电平进行的。有按键按下进入键中断置标志位,等松开后再进行相应的处理。在进行设置及查询操作时会闪烁显示设置及查询结果,否则显示实时水温。
4.3 加热控制子程序。判断标志位有否预约、加热标志。之后依流程进行处理。为防止加热丝频繁启动,加热控制采用回差控制,停止加热后只有实时水温低于目标温度一定温度后,才会再次启动加热丝工作。为满足不同功率要求,加热方式有快速加热和普通两种,在一般情况下及预约状态下均采用普通方式,以控制用电功率。
4.4 遥控信号处理子程序。发送:当遥控器按键按下,设置标志位,并通过动态扫描方式读取键号,之后按标志位及键号利用输出比较进行编码发送。接收:利用输入捕捉功能获得信号,接受成功后设标志位并读取键号供主程序进行处理。
4.5 延时子程序。所有工作多处用到定时及延时子程序:键盘判断消抖延时,闪烁显示时的显示及消隐延时,输入捕捉,日历钟等。
4.6 安全保护子程序。在正常情况下,漏电检测电路输出低电平。一旦出现漏电现象,漏电检测电路输出高电平,引起中断,并以最快速度使漏电保护电路切断整个电源电路,保证使用者安全。当温度过高或水位过低时,自动关加热并开启蜂鸣器向主人报警有异常情况发生。
5. 设计扩展
随着信息技术的发展,智能化的家用电器将逐渐走进人们的家庭。在该设计基础上,利用68HC908GR8丰富的片上资源及SCI、USB模块通过电话线或网线和家用电脑及因特网相连,可实现对家用电器的远程集中控制,从而使人们的生活更加轻松方便。
剩余内容已隐藏,支付完成后下载完整资料
资料编号:[32232],资料为PDF文档或Word文档,PDF文档可免费转换为Word
课题毕业论文、文献综述、任务书、外文翻译、程序设计、图纸设计等资料可联系客服协助查找。