资源描述
自动洗碗机的控制系统设计摘要:基于自动洗碗机的功能要求,介绍了用单片机和键盘显示管理芯片设计的自动洗碗机的硬件控制系统的设计方法,给出了用控制键盘和显示的硬件电路,同时给出了系统软件和功能软件模块的流程图。该系统经过试验调试,可有效地实现洗碗机的自动控制,完成自动进水、加温、清洗、消毒等功能。关键词:洗碗机;控制器;键盘显示引言随着数字信息家用电器应用的普及,洗碗机已经广泛进入人民大众的家庭之中,从而使得人们能够从繁杂的家务劳动中逐步解放出来。作为一种家庭自动化设备,洗碗机一般需要实现诸如自动控制进水、自动加洗涤剂、冷洗、自动加温洗、清洗、排水、杀菌消毒,以及定时和故障报警等功能。从被控制量角度出发,一个洗碗机通常需要满足图所示的一些具体要求,其中涉及的开关量信号有两种,一种是传感器的高、低电平信号检测,如机门开关、水位高低、温度调节保护器和行程开关等;另一种开关信号经由固态继电器控制强弱电压信号的断开和加载,如进水电磁阀门的开合、恒温加热器的开合、瞬间加热器的开合、清洁剂控制盒和消毒剂控制盒的工作等。图中所涉及的模拟量信号主要用于实现以下几方面的功能:()用温度传感器实现水温消毒水温度检测;()通过人机接口的显示输出、键盘输入和声音输出等实现水温显示、洗涤过程显示以及故障类型显示等;()根据用户需要通过设置键选择洗涤模式,并通过功能键启动相关功能;()机器使用情况统计、清洁剂和消毒剂剂量的使用情况计数等;()故障报警以及、洗涤完成报告等。 洗碗机控制系统的硬件设计针对上述功能及可靠性、成本和方便使用维护等因素,笔者设计了图所示的洗碗机控制系统。单片机最小系统采用与兼容的-公司低功耗高性能芯片设计,其中片内字节在线可编程闪存用以存放系统程序,可通过接口来下载程序;而字节的则用以存放关键参数,如开机维护密码、产品的序列号、开机次数、洗涤设置参数等;字节的用来存放临时变量。鉴于本洗碗机有较多的开关量信号,故此,设计中使用并行芯片来扩展接口,以配合和口部分管脚的使用,其输出和输入的比例为,其中蜂鸣器由控制。从可靠性角度出发,输入和输出部分都采用光电隔离措施。考虑到部分驱动信号所要求的驱动电流较大,因此,本设计选用功率驱动器件来驱动。温度采集有两种方案:一是使用热敏电阻配合芯片进行转换,然后通过存放在程序存储器里的表格来求得当前温度;二是使用三端温度传感器进行采集,直接得到温度数据。相比之下,后一种方案较为经济简捷。键盘和显示选用来进行控制,其电路图如图所示。无需外围元件即可直接驱动位共阴式数码管;引脚对应位数字输出驱动;引脚和则对应于段及小数点的驱动输出;各位可独立控制译码不译码及消隐和闪烁等属性。该芯片共有三种类型的指令:第一种是条不带数据的位纯指令,如复位、测试、左右(循环)移位等;第二种是条位带数据指令,包括下载数据按方式译码、下载不译码、闪烁、消隐、段点亮、关闭等;第三种是读取键盘数据指令。它们均采用串行方式与进行通讯,串行数据从引脚送入芯片并由端同步。当片选信号变为低电平后,引脚上的数据将在引脚的上升沿时被写入的缓冲寄存器。 此外,片内含有去抖动电路,可控制键键盘矩阵。图中,元件为键盘接口,当有键按下时,引脚输出低电平,发光二极管发亮,该状态一直保持到按键松开。此时如果接收到“读键盘”指令,在指令前半段,引脚将处于高阻状态以接受来自微处理器的指令。而在指令后半段,引脚则从输入状态转为输出状态,用以输出所按下的键代码值。洗碗机控制系统的软件设计本系统功能模块按洗碗过程可分为六个阶段:进水过程、加温过程、注入清洁剂过程、控制电机旋转清洗过程、注入消毒水消毒过程和排水过程。同时为确保洗碗机正常工作,对容易出故障的过程,系统还设置了故障报警或停机功能。系统软件可按照洗碗机的工作流程进行编写。主要的软件模块有开机自检、状态初始化、显示当前默认状态,进入键盘扫描状态并等待操作键按下,以及根据操作键转入相应流程等,其主程序流程见图所示。 用户使用前,应首先检查洗碗机状态是否正常,若状态正常,按下弱电源开关,根据洗涤要求设置洗涤模式(或使用默认方式),将碗放入清洗室,然后关上机门,按下开始键。之后,控制器检测水位高低和水温,以决定是否进水与恒温加热,至此准备工作完成,启动电机进行清洗。接下来再把清洁剂注入清洗室,同时检测水位高低,若水位较低,则立即进水,以保证清洗效果。清洗完成后,等碗上的水空一段时间后,洗碗机再注入高温消毒水进行消毒。洗涤完成后,蜂鸣器鸣叫,表明洗涤完成,同时控制器回到用户初始设置模式。洗涤中每一过程和按键均对应有一发光二极管的亮灭,用以显示过程和按键的正常与否。洗涤完成后,用户打开机门,取出碗盘,然后断电即可结束整个洗碗过程。在该系统软件子程序中,需要对键盘显示管理模块进行说明,包括初始化子程序、发送子程序、接收子程序、中断子程序、显示子程序等。其中用户通过键盘设置模块可以设定洗涤模式、每一过程的时间长短以及洗涤剂量大小,也可随时按相应的功能键暂停或中止洗涤过程。技术维护人员可以通过键盘显示管理模块输入正确密码来查询机器的使用状况,如机器序列号、机器的使用次数等,也可对关键参数根据实际情况进行设置。 故障报警功能模块可在工作电压故障、进水阀故障、加热器故障、电机故障、清洁剂注入故障以及高温消毒水注入故障发生时用蜂鸣器报警,同时断掉强电控制信号,以确保系统安全。 结论该控制系统目前已经调试成功,试验性能良好,可实现本自动洗碗机所要求的功能,而且简捷实用。但还有需要完善提高的地方,如排水需要人工干预、人机接口可考虑选用效果更好的字符或图形、系统集成度有待提高等。Automatic dishwasher Control System DesignAbstract: Based on the functional requirements of the automatic dishwasher, introduced by SCM AT89LS8252 and keyboard / display management chip designed automatic dishwasher HD7279A hardware control system design methods, using HD7279 is given control of the keyboard and display hardware circuit, while the system is functional software modules and software flow chart. After debugging test of the system, which can effectively achieve the control dishwasher complete automatic water, heating, cleaning and disinfection, and other functions. Key words: dishwashers; controller; keyboard / display 1 Introduction As digital application of information appliances, dishwashers have broad access to masses of people in the family, so that people can work from home in the complex gradually liberated. MCU Sensor-MenciMagnetic water level sensorInfluent solenoid valveTemperature Control ProtectorSwitch 5 kw heater thermostat Cleaning agents control box Cleaning agents control box Electric motors Transmission trip switch 2Analog Xiaodaishui temperature Counter Display InterfaceMan-machine interface Keyboard Interface Ringing InterfaceFigure 1 Control of the dishwasher As a home automation equipment, such as dishwashers generally need to achieve automatic control influent, automatic detergent, cold wash, automatic temperature washing, cleaning, drainage, Disinfection, and the timing and fault alarm functions. From the point of view of control, a dishwasher usually need to meet Figure 1 shows some of the specific requirements, which involves the switching of signals there are two kinds of sensors is high, low signal detection, such as doors Switch , the water level and temperature regulation for the protection of trip switches, etc.; another solid-state relay switching control signals by the strength of the signal voltage disconnect and loading, such as electromagnetic inlet valve opening and closing, opening and closing the heater thermostat , and instantly the heater to create a control box cleaning agents and disinfectants control box, and so on. Figure 1 in the analog signal used to achieve the following major aspects of functions: (1) Temperature Sensor temperature / Xiaodaishui temperature detection; (2) through the man-machine interface display, keyboard input and output, such as voice achieve temperature, washing process shows that the fault type and display; (3) According to user needs by setting button to select washing mode, and through function keys launch-related functional; (4) the use of statistical machine, cleaning agents and the use of disinfectants dose counting; (5) Failure Alarm, as well as, washing complete the report. 2 dishwashers control system hardware design To address the above function and reliability, cost and ease of use factors such as maintenance, and the author of the design shown in Figure 2 dishwashers control system. SCM system is the smallest and MCS-51 compatible with the AT-MEL companies low-power high-performance CMOS chip design AT89LS8252, k-chip 8-byte programmable flash memory storage system for the procedures to be adopted by the SPI interface download programs; and 2 k bytes of EEPROM is used to store key parameters, such as the boot password maintenance, product serial number, the number of boot, washing setting parameters; 256 bytes of RAM used to store temporary variables. In view of the dishwashers have more of the switching signal, therefore, the use of parallel design chips 8255 to expand the I / O interface, and to meet some of P1 and P3 I pin the use of its input and output ratio of 21 / 14, which buzzer from P1.3 control. From the reliability point of view, part of the input and output using photoelectric isolation measures. Consider that part of the drive signal required by the larger drive current, therefore, the design uses power-driven devices ULN2803 to drive. There are two temperature acquisition programme: First, the use of thermal resistance with a MAX150 chip AD converter, and then deposited in the program memory in the form to achieve the current temperature; Second, the use of three-DS18B20 temperature sensor for acquisition, direct access to the temperature data . In contrast, after a simple programme more economical. LED display and keyboard use HD7279A 3 to control, the circuit shown in Figure 3. HD7279A without external components can directly drive a total of eight vaginal LED digital pipe; corresponding pin DIG0 0 3 digital output driver; pin SA SG and DP is a paragraph corresponding to g and the decimal point drive output can be independently controlled to decode / decoding and attributes such as blanking and scintillation. PO Bus Driver74LS245 DB 8255 Switch output CB BuzzerAddress buffer74LS573 AB Switch InputCPU AT89LS8252 Y8255 DB P2 Address decoding74LS138 YMAX150 AD samplingMAX150 CB Minimum System CB Read / write control Keyboard and Four 8-segment LEDcircuit continuity display management 4*4 keyboardP1Figure 2 controller hardware structureThe chip there are three types of instruction: The first one is without six of the eight data-orders, such as reduction, testing, left / right (cycle) and transposition; second is the 7 with 16 orders data , including downloading data by means 0 / 1 decoder, download not decoding, scintillation, blanking, paragraph lit, closed; third keyboard data is read instructions. Serial way they are used to communicate with AT89LS8252, DATA-pin serial data from the chip into by the CLK-synchronization. When the chip-select signal CS into low, the data on DATA-pin will be in the CLK pin at the rising edge of the buffer HD7279A was written into the register. In addition, the chip contains HD7279A to jitter circuitry, which can be controlled 64 key keyboard matrix. Figure 2, components for the 4 4 JKEY keyboard interface, when a key is pressed, the output pin LOW KEY, LED1 bright light-emitting diodes, the state has been key to the release. If at this time to receive the Reading keyboard commands 15 H, in the first half of the directive, DATA pin will be in a high-impedance state to receive instructions from the microprocessor. In the latter half of the directive, the DATA input pins from state to state output for the output value of the code by pressing the button. 3 dishwasher Control System Software Design Functional modules of the system by washing process can be divided into six stages: influent process, process heating, cleaning agents into the process, control motor rotating cleaning process, injected Xiaodaishui disinfection process and the drainage process. Dishwasher at the same time to ensure that the normal work of the process vulnerable to failure, the system also set up a fault alarm or shutdown feature. Dishwashers system software in accordance with the preparation of the work processes. The main software modules with power-on self test, state initialization, display the current default state, the state entered the keyboard scan button and wait for the press operation, as well as operating under the corresponding key into the process, and its main program flow as shown in Figure 3. Users, dishwashers state should first check whether it is normal, if normal, press the power switch weak, according to wash requested washing mode (or use the default mode), Add to bowl cleaning room, and then close the doors, press start button. , The controller of water level and water temperature, to determine whether the water temperature and heating, bringing the preparatory work completed, motor start cleaning. Next then cleaning agent into the washing room, high and low level detection at the same time, if the lower water level, water immediately, in order to ensure cleaning effect. Upon completion of cleaning, such as a bowl of water on the air after a period of time, dishwasher temperature to be injected Xiaodaishui were disinfected. Upon completion of washing, buzzer call that washing completed on time and the initial controller settings to user mode. In the washing process and the keys were each corresponding to one of the bright light-emitting diodes eliminate, the process and to indicate whether or not the normal keys. Washing completed, the user opens doors, remove dishes, and then power to end the entire washing process. In the system software subroutine, the need for keyboard / display module for the management, including the initialization subroutine, sent subroutine, receiving subroutine, interrupt subroutine, such as display subroutine. Keyboard settings through which users can be set washing mode modules, each process and the length of time washing dose, and may at any time by the corresponding button suspended or terminated washing process. Technical maintenance staff through keyboard / display module for entering the correct password to the use of machinery such as machine serial number, frequency of the use of machines, but also on the key parameters set according to the actual situation. StartPower-on self test state initialization / DisplayN Check whether there is a bond? Y Judge keysSet bond / Display Function keys Whether the closed doors? NNot influent Heating temperature YThermostat Temperature / Display Y Whether the low water level?N NWater temperature set to meet? Influent / Display Water enough, commissioner influentCompletion of the preparatory work at home signsDelay ready to start second grade dishwasherInjection cleaning agent Electric rotation began cleaning / DisplayTime to disconnect Time to stop motor Instantaneous heating 5 6 seconds High-temperature injection Xiaodaishui Narcotics / Display Finished washing dishes, Stop related functions, Related signs removedFigure 3 dishwasher Software Process Failure Alarm function module voltage fault in the workplace, into the valve failure, heater failure, electrical failure, cleaning agents injected into the fault and the fault Xiaodaishui temperature when used buzzer alarm, at the same time, cut-control signals, in order to ensure system security.4 Conclusion The control system has been successfully debugging, testing good performance can be realized by the automatic dishwasher required functions, and simple practical. But there are areas which require improvement, such as the drainage need manual intervention, man-machine interface can be considered more effective use of the characters or graphics LCD, the system needs to be raised, such as integration.
展开阅读全文