摘 要
随着社会的不断进步,物质的不断丰富,人们对生活品质的要求越来越高。在家里养盆花,种绿植逐渐成了一种时尚.养花种绿植不仅可以陶冶情操,丰富生活;同时许多花木还可吸收空气中的有害气体,因此可以净化室内空气;而且会增加室内空气中阴离子聚积的数量,使得室内空气特别清新.越来越多的人们喜欢在办公室、阳台等地方养殖盆栽等小型的植物。然而,自动浇花系统的出现,给人们的日常生活提供了很大的方便,它可以通过单片机的程序控制来解决给植物浇水的问题。
本系统主要由AT89C51单片机、电源、电磁继电器、YL-69土壤湿度传感器、LCD1602显示屏五大模块组成。首先由YL-69土壤湿度传感器把检测到的土壤湿度值发送给AT89C51单片机,然后用LCD1602显示屏来显示当前数值,再经AT89C51单片机将湿度传感器输入的数据与提前设定好的湿度上下限阈值做比较;若土壤湿度值低于设定的"最小阈值",蜂鸣器发出蜂鸣警报土壤干燥需要浇灌,此时单片机输出口给继电器发出信号让线圈通电,常开触点闭合,水泵电路的电源导通,开始对植物进行浇灌。当浇水到一定程度后,土壤当前湿度值大于我们设定的湿度"最大阈值"时,单片机会输出信号使继电器的常开触点断开,水泵电路电源关闭,停止对植物浇灌。
关键词:AT89C51单片机;浇花系统;智能浇花;采集显示;LED
ABSTRACT
With the continuous progress of society and the enrichment of materials, people's requirements for the quality of life are becoming higher and higher. Raising potted flowers at home, planting green plants has gradually become a fashion. Planting flowers and plants can not only cultivate sentiment and enrich life; at the same time, many flowers and trees can also absorb harmful gases in the air, so they can purify the indoor air, but also increase the amount of anion accumulation in the indoor air. Make indoor air particularly fresh. More and more people like to raise small plants such as potted plants in offices, balconies and other places. However, the appearance of automatic flower watering system provides great convenience for people's daily life. It can solve the problem of watering plants through the program control of single chip microcomputer.
The system is mainly composed of five modules: AT89C51 single chip microcomputer, power supply, electromagnetic relay, YL-69 soil moisture sensor and LCD1602 display screen. The detected soil moisture value is first sent to the AT89C51 MCU by the YL-69 soil moisture sensor, then the current value is displayed by the LCD1602 display screen, and then the data input by the humidity sensor is compared with the upper and lower humidity threshold set in advance. When the current humidity value of the soil is greater than the "maximum threshold" of the humidity set by us after watering to a certain extent, the single opportunity output signal disconnects the normal open contact of the relay, the power supply of the pump circuit is turned off, and the plant irrigation is stopped.
Keywords: AT89C51 single chip microcomputer; watering system; intelligent watering; collecting and displaying; LED