基于51单片机的全自动洗衣机控制器设计

基于单片机的全自动洗衣机控制系统

摘 要

随着数字技术的快速发展,数字技术被广泛应用于智能控制的领域中。单片机以体积小、功能全、价格低廉、开发方便的优势得到了许多电子系统设计者的青睐。它适合于实时控制,可构成工业控制器、智能仪表、智能接口、智能武器装置以及通用测控单元等。

本文以AT89S51单片机为核心设计了全自动洗衣机控制系统,本系统实现了对洗衣机整个洗衣过程的控制,包括用户参数输入、洗衣、脱水和结束报警四个阶段。控制系统主要由电源电路、单片机控制系统和外部硬件电路三大模块组成。电源电路为单片机主控系统提供5v的直流电压;单片机主控系统负责控制洗衣机的工作过程,主要由AT89S51单片机、数码管、按键、蜂鸣器、LED指示灯组成;外部硬件电路有继电器、三极管、LED灯组成。

本系统的电路并不复杂,给AT89S51单片机载入软件程序后,能够实现全自动洗衣机的基本功能。虽然不能与电器市场上的洗衣机控制系统媲美,但也具有一定的实用性。

关键词: AT89S51;用户参数;继电器;控制系统; LED

1

Abstract

With its rapid development, digital technology is widely used in the field of control system. Single chip microcontroller is favored by many electronic system designers for its smallness, full function, low price and easy application. Its pretty fit for real-time control as a core in industrial controller, intelligent apparatus, intelligent interface, intelligent weapon device, universal measure control unit, etc.

This article designs a full-automatic washing machine control system with AT89S51 as core. This system realizes whole working course of full-automatic washing machine, including four parts: user parameter input, wash, dehydrate and ending music play. Hardware system is made up of three modules: power supply circuit, digital control circuit and machine control circuit. Power supply circuit provides steady DC 5V voltage for digital control circuit and AC 220V for motor. Digital control circuit takes charge of controlling the working course. It consists of AT89S51, double-figured common-cathoded numeral display, buttons, buzzer, LED. Machine control circuit realizes the functions of water level detect, motor driven, water import and export, it consists of water level detector, motor, transmission system components and penstocks.

After downloading the program to AT89S51, this circuit can realize basic functions of full-automatic washing machine. It seems hard for this control system to compare with perfect ones in the electrical appliance market, but it has certain practicability.

Keywords: AT89S51 ; User parameter input ;water level detector ; Control system ;LED

2

目 录

摘 要 ................................................................................................................................................ 1 Abstract.................................................................................................................................................... 2 引 言 ................................................................................................................................................ 5 第1章 绪 论 ................................................................................................................................... 6

1.1 课题开发背景 ........................................................................................................................... 6 1.2 设计的目的和意义 ................................................................................................................. 6 1.3 国内外现状及水平 ................................................................................................... 6

第2章 设计方案 .............................................................................................................................. 9

2.1 设计任务 .................................................................................................................................... 9 2.2 洗衣机的设计方案 ................................................................................................................. 9

2.2.1 按键 ................................................................................................................................. 9 2.2.2 洗衣程序 ........................................................................................................................ 9 2.2.3 设计总方框图 ............................................................................................................. 10 2.3 控制系统的功能 .................................................................................................................... 10

第3章 硬件设计 ............................................................................................................................ 11

3.1控制系统的电路组成 ............................................................................................................ 11 3.2 电源电路 .................................................................................................................................. 11 3.3 单片机控制电路 .................................................................................................................... 12

3.3.1 AT89S51单片机主控系统 ...................................................................................... 12 3.3.2 单片机的复位电路 .................................................................................................... 15 3.3.3 单片机的时钟电路 .................................................................................................... 16 3.3.4 显示电路 ...................................................................................................................... 17 3.3.5 蜂鸣器报警电路 ......................................................................................................... 18 3.3.6 电动机的控制电路 .................................................................................................... 19 3.3.7 进水/排水电路 ........................................................................................................... 20

第4章 软件设计 ............................................................................................................................ 21

4.1 主程序设计 ............................................................................................................................. 21 4.2 标准洗衣程序设计 ............................................................................................................... 22 4.3 洗涤程序的设计 .................................................................................................................... 22 4.4 漂洗程序的设计 .................................................................................................................... 23 4.5 脱水程序的设计 .................................................................................................................... 24

3

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4