鱼缸智能控制系统的研究与设计 下载本文

内容发布更新时间 : 2024/5/2 8:42:44星期一 下面是文章的全部内容请认真阅读。

摘 要

本文设计了一个鱼缸智能控制系统。目前各式各样的观赏鱼缸之类的工艺产品逐渐进入了家庭和宾馆、商场等公共场所,由于现有的观赏鱼缸的水温检测、液位控制、水循环等操作都需要人为的手工进行,这就给人们带来了很大的不便。本文通过对目前大多数鱼缸控制设备应用现状的分析和研究,提出了一种鱼缸智能控制系统的设计方案。

针对目前大多数鱼缸控制设备价格昂贵、安装繁琐、运行费用高,一般的用户难以使用的情况,结合单片机强大的开发技术,设计制作了一种以单片机为控制核心,结合传感器技术,可以实现鱼缸温度自动检测、温度显示、鱼缸水位控制、水泵自动给水、智能控制灯光开关的鱼缸智能控制系统。此系统的硬件部分主要包括单片机主控制模块、温度检测模块、温度显示模块、水位控制模块、继电器控制模块和供电模块。软件部分主要运用C语言程序编写,主要包括主控制程序、温度检测程序、温度显示程序、时钟设置程序。

通过较长时间的运行测试,结果表明该智能控制系统运行稳定可靠、操作简单方便、具有多种节电工作模式。同时该系统设计灵活、结构简单、成本低廉,可广泛用于安装鱼缸的场所。

关键词:鱼缸;单片机;智能控制;

Abstract

With the aim to improve the deficiency of current aquarium control system, a design of intelligent control system of aquarium is stated in the thesis. Nowadays, various aquariums are commonly seen in families, hotels, and other places like supermarkets. However, many operations such as water temperature detection, water level control, water circulation have to be manually operated, thus bringing much inconvenience. Based on the studies and analysis of current situation of the application of aquarium control facilities, a set of design of aquarium intelligent control is proposed in the thesis.

The intelligent control system is designed to cope with the problems existing in aquarium maintaining, such as expensive facilities and maintenance cost, cumbersome installation, and poor user-friendliness. Combined with the strong development technologies of microcontroller, taking chip microprocessors as the control core and combining sensor technology, has realized multifunctions, several models are included in the system, automatic control of aquarium temperature and light, temperature display ,water level control, automatic water supply pump, etc. The hardware of the system consists of main control module of the micro control, temperature detection module, temperature display module, water level control module, relay control module and electricity supply module; while the software program is compiled by C language, consists of main control program, temperature detection program, temperature display program, clock setting program.

After a comparably long period of working test, it is proved that the system functions reliable with multiple electricity saving models available. Meanwhile, the system outstands with advantages of its flexible design; convenient operation, simple construction and low cost, making it easy to be manufactured on a large scale. This system can be applied in aquariums of different places.

Keyword: aquarium ; microcontroller; intelligent control;

目 录

引言 ????????????????????????????1 1 绪论 ……????……?????????????????…2

1.1 选题背景 ?????????????????????????????2 1.2 国内外研究现状及发展趋势 ?????????????????????3 1.3 相关参数分析 ???????????????????????????3

2 鱼缸智能控制系统总体设计 ????????????????5

2.1 概述 ???????????????????????????????5 2.2 系统设计要求 ???????????????????????????5 2.3 鱼缸控制系统的功能组成 ??????????????????????5 2.4 系统控制参数 ???????????????????????????5 2.5 主要元器件的选取 ?????????????????????????6

3 系统硬件设计 ??????????????????????24

3.1 主电路控制模块设计 ????????????????????????24 3.2 时钟电路模块设计 ?????????????????????????24 3.3 温度检测模块设计 ?????????????????????????24 3.4 温度显示模块设计 ?????????????????????????25 3.5 继电器控制模块设计 ????????????????????????26 3.6电路原理图及电路板设计的原则和体会 ????????????????24

4 系统软件设计 ??????????????????????27

4.1软件设计方法 ???????????????????????????29 4.2 主电路控制模块程序?????????????????????????30 4.3 温度检测模块程序??????????????????????????31 4.4 温度显示模块程序 ?????????????????????????32

5 结论 ???????????????????????????36 谢辞 ????????????????????????????37 参考文献 ??????????????????????????38 附录 ????????????????????????????39

引言

随着人们生活水平的不断提高,家居环境和休闲娱乐场所都安装各种各样的鱼缸,而保持一个适宜水族生活的环境是一件非常耗费精力的工作。针对水族生活环境的净化和改善的设备有很多,目前市场上常用的鱼缸控制系统有:过滤器、加热器、加氧泵等改善水质的设备,但是它们大多是非智能化的、单独工作的器件。如果仅仅把多个单独的设备组成一套多功能的鱼缸控制系统,需要投入的费用较大,同时多个单一器件机械化的组装之后,也存在一定的资源浪费。本系统则是从系统集成开发的角度进行设计和开发,根据当前市场上的需求,形成了一套集鱼缸温度自动检测、鱼缸水位控制、水泵自动给水以及灯光自动开关为一体的鱼缸智能控制系统。系统以AT89S52单片机为核心,实现对鱼缸的集中控制和管理,能够对鱼缸温度进行自动检测,检测系统要有足够高的灵敏度;能够手动调整被检测温度的促发值,温度实时显示用LCD实现。用水位传感器或碳棒监测水位情况,用单片机控制水泵自动工作,电路具备一定的容错功能。该系统设计控制器使用单片机AT89S52,测温传感器使用DS18B20,用1602液晶以串口传送数据,实现温度显示。

下面从鱼缸智能控制系统总设计、硬件设计以及软件设计等方面加以描述。

1