arduino智能浇花系统_自动浇花套件

自动浇花套件(SKU:KIT0003)

目录

1 概述

2 技术规格

3 配送清单

4 组装示意图

5 单盆花的浇灌制作步骤

6 Arduino 样例程序

6.1 数据测量

6.2 水泵测试

7 产品相关文档

概述

随着人们生活节奏的加快,即使是最爱的花草浇水也无法顾及,偶而出差、旅行、探亲也是很正常的事情,而家中花草谁来管?花草生长问题80%以上是由花儿浇灌问题引起;好不容易种植几个月的花草,因为浇水不及时,长势不好,用来美化家园的花草几乎成了“鸡肋”;对于广大DIY爱好者,我们要介绍一款可以自己编程、设置参数、自己动手组装的自动浇花控制器,这是一款基于Arduino的控制器,使用土壤湿度传感器对土壤湿度进行监测,通过温湿度传感器对室内温度、湿度进行测量,控制水泵或电池阀进行浇水,从而达到自动浇灌的目的。

技术规格

输入电源:6-12V

支持湿度传感器和碳棒检测土壤湿度

支持潜水泵和双稳态电磁阀浇水

具有室内温度和湿度检测

具有土壤湿度阀值调节

具有4个模拟口,5个数字口

支持xbee无线数传

支持USB接口下载程序

支持防水型DS18B20温度传感器

潜水泵额定电压:3.5-12V

潜水泵最大扬程:200cm

模块尺寸:70 x 60mm

配送清单

Free Life自动浇花系统控制器 1个

Micro USB线 1根

DHT11温湿度传感器 1个

土壤湿度传感器 1个

模拟接口转数字接口传感器连接线 2根

潜水泵 1个(注意:潜水泵必须在水中使用,不能露出水面!)

潜水泵电源连接线 1根

主板电源连接线 1根

橡胶水管 1米

塑料外壳 1个

2mm一字螺丝刀 1个

1号十字螺丝刀 1个

电子文档上位机软件 1份

组装示意图

单盆花的浇灌制作步骤

1、将Moisture Sensor与Arduino自动浇花系统控制器连接起来。Moisture Sensor连接到控制板的任意可用模拟口,用于采集土壤湿度参数(选择不同的模拟口,程序中需对应应模拟口设置),默认选择模拟口2(注意区分电源正负,红色为+,黑色为-),然后将Moisture Sensor插到土壤中(插入2/3即可)。

2、水泵连接到控制器的MOTOR插座上,注意区分正负(棕色为正,蓝色为负),将橡胶水管插到潜水泵的出水口上,另一端固定在花盆上。

3、将水装到水桶或水盆里,放在离花盆较近的位置,将潜水泵置于水桶或水盆内,保证蓄水充足&#x

  • 4
    点赞
  • 39
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,以下是一个基于 Arduino智能浇花系统的代码: ``` // include the library code: #include <LiquidCrystal.h> #include <Wire.h> #include <DS3231.h> #include <Wire.h> #include <Adafruit_Sensor.h> #include <Adafruit_BME280.h> // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // set the datetime library object RTClib RTC; // set the BME280 library object Adafruit_BME280 bme; // define the pins for the water pump and the soil moisture sensor int water_pump = 8; int soil_moisture = A0; // define the threshold values for the soil moisture reading int dry_soil = 800; int wet_soil = 400; void setup() { // set up the LCD's number of columns and rows lcd.begin(16, 2); // initialize the RTC and set the time and date RTC.begin(); RTC.adjust(DateTime(F(__DATE__), F(__TIME__))); // set the RTC datetime to the compile time // initialize the BME280 and print the sensor info to the LCD bme.begin(0x76); lcd.print("BME280:"); lcd.setCursor(0,1); lcd.print(bme.readTemperature()); lcd.print(" C "); lcd.print(bme.readHumidity()); lcd.print(" % "); lcd.print(bme.readPressure() / 100.0F); lcd.print(" hPa"); // set up the water pump pin pinMode(water_pump, OUTPUT); } void loop() { // read the current soil moisture level int current_soil_moisture = analogRead(soil_moisture); // print the current soil moisture level to the LCD lcd.setCursor(0,1); lcd.print("Soil Moisture:"); lcd.print(current_soil_moisture); // check if the soil is dry and activate the water pump if necessary if(current_soil_moisture > dry_soil) { digitalWrite(water_pump, HIGH); lcd.setCursor(0,0); lcd.print("Watering the soil "); } else { digitalWrite(water_pump, LOW); lcd.setCursor(0,0); lcd.print("Soil is wet "); } // delay for 1 minute delay(60000); } ``` 该代码使用了 Arduino、RTC、BME280 以及液晶显示器等组件,可以实现自动浇花系统。代码读取土壤湿度传感器的值,根据实际情况来判断是否需要开启水泵来浇水。同时,该代码还可以读取环境数据,并将其显示在液晶屏幕上。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值