摘 要
随着科学技术的高速发展,数字技术被广范应用于智能控制领域中。单片机以形体轻巧、控制功能完善、价格低廉、开发简便容易的优势受到广大自动开发控制市场的青睐。它适合于实时自动控制,亦可构成于工业生产需要的控制器、智能仪表、智能电器、智能武器装置以及通用测控单元等。
本文以AT89C51单片机为核心设计了全自动洗衣机控制器,本控制器实现了对洗衣机的整体洗衣过程的控制,包括用户选择输入、洗衣、脱水和结束报警四个阶段。控制系统主要电源电路、单片机控制系统和外部硬件电路三大模块组成。电源电路为单片机主控系统提供5V的直流电源;单片机主控系统负责控制洗衣机的工作控制,主要由AT89C51单片机、按键、蜂鸣器、液晶显示屏、继电器、重力感应器组成。
关键词:AT89C51;控制系统;用户选择;继电器
Abstract
With the rapid development of technology, digital technology has been widely used in the field of intelligent control. Single chip microcomputer with its small size, low cost, easy to develop advantages of many electronic systems designers favor. It is suitable for real time control, which can be used as industrial controller, intelligent instrument, intelligent electric appliance, intelligent weapon device and universal measurement and control unit.
The AT89C51 single-chip microcomputer as the core design the automatic washing machine control system, this system realizes the control of washing machine washing process, including the user to select input, washing, dehydration and the end of the alarm four stages. Control system main power supply circuit, SCM control system and external hardware circuit three modules. Power supply circuit for the MCU control system provides 5V DC power supply; MCU control system is responsible for the control of washing machine, mainly by AT89C51, buttons, buzzer, LCD display, a relay, a gravity sensor.
Key words: AT89C51; control system; user selection; relay
目录
第1章 绪论……………………………………………….. 1
1.1 课题开发背景………………………………………… 1
1.2 国内外现状及水平…………………………………….. 1
1.2.1 洗衣机的分类…………………………………… 1
1.3 设计的目的和意义…………………………………….. 2
第2章系统的总体设计……………………………………….. 3
2.1设计任务……………………………………………. 3
2.1.1 主要内容…………………………………….. 3
2.1.2主要功能……………………………………….. 3
2.1.3 洗衣机的设计方案……………………………….. 3
2.1.4洗衣程序……………………………………….. 3
2.1.5设计总方框图……………………………………. 4
2.2系统主控模块………………………………………… 4
2.2.1 AT89C51单片机的优点…………………………….. 4
2.2.2 AT89C51I/O口功能表……………………………… 5
2.3 液晶显示屏显示模块…………………………………… 6
2.3.1 LCD 1602基本特性……………………………….. 6
2.3.2引脚及接口说明………………………………….. 6
2.4电机模块……………………………………………. 7
2.4.1洗衣机类型的选择………………………………… 7
2.4.2洗衣机马达的选择………………………………… 7
第3章硬件电路设计………………………………………… 10
3.1电源电路…………………………………………… 10
3.2复位电路…………………………………………… 10
3.3 蜂鸣器报警电路……………………………………… 11
3.3.1电磁式蜂鸣器…………………………………… 11
3.4时钟电路…………………………………………… 11
3.5 用户选择板电路……………………………………… 12
3.6单片机的时钟电路……………………………………. 13
3.7水位开关与排水阀、电磁进水…………………………… 14
3.7.1排水阀、电磁进水……………………………….. 14
3.7.2水位开关………………………………………. 14
3.8重力检测电路……………………………………….. 15
3.8.1压力传感器特点…………………………………. 15
3.8.2压力传感器工作原理……………………………… 16
3.8.3重力检测电路…………………………………… 16
3.9电机控制电路……………………………………….. 17
3.9.1继电器的作用…………………………………… 17
3.9.2电动机控制电路的工作原理………………………… 17
3.10进水/排水电路……………………………………… 18
第4章 单片机模拟程序……………………………………… 20
4.1 主程序设计…………………………………………. 20
4.2 洗衣程序设计……………………………………….. 21
4.3 洗涤程序的设计……………………………………… 22
4.4 漂洗程序的设计……………………………………… 22
4.5 脱水程序的设计……………………………………… 23
4.6 LED指示灯程序的设计………………………………… 24
4.7 单片机编程…………………………………………. 25
总 结………………………………………………….. 32
致 谢…………………………………………………… 33
参考文献…………………………………………………. 34