Currently this is what the functionality is: Reads soil moisture content Controls Water pump when the soil starts to run dry.
Things used in this project
Hardware components
Story
Automated Indoor Irrigation
Currently this is what the functionality is:
Reads soil moisture contentDemonstrates use of MCP3004 ADC on LinkSprite MezzanineControls Water pump when the soil starts to run dry.Displays Status on I2C 16x2 LCD Character Display
Notable Python and External Libraries and Programs
MRAA: [https://mraa.io/] Low Level Skeleton Library for I/O Communication on GNU/Linux platforms. This is the recommended 96Boards I/O library.UPM: [https://upm.mraa.io/] UPM is a sensor library with high-level APIs that make it easy to connect and use sensors and actuators in IoT solutions. It is based on MRAA.
Source The source for this project is available at: https://github.com/96boards-projects/automated-indoor-irrigation
1) Hardware Setup
Plugin the LinkSprite Mezzanine on the CE Board.Plug in the LCD scree to the LinkSprite Mezzanine as follows:
Plug in the Soil Moisture Sensor to the LinkSprite Mezzanine as follows:
Plug in the L298n Motor Controller to the LinkSprite Mezzanine as follows:
Plug in the L298n Motor Controller to the 5v Pump as follows:
And bury the Probes of the Soil Moisture sensor in the Pot.
2) Software
This guide assumes that Debian OS is running on a Dragonboard410c. How ever the instructions hold true for other 96Boards CE Boards running Debian.
This project is compatible with other Linux based OS, but they might have to be tweaked accordingly.
2.1) Setup Environment
Enable spidev as shown here: Enabling SPIDEV on Dragonboard410cBuild MRAABuild UPM
2.2) Code Customization Options
Calibrate SenorInsert sensor into dry and then wet soil and modify the in_min and in_max values here:line 119: water_level = map(adc_value, 550, 10, 0, 100);Do this till dry soil reads 0% and wet soil reads 100%
Soil Moisture PercentageThe target moisture percentage can also be modified by editing line 127 and 133.
2.3) Running the Irrigation System
Build Project:gcc src/pot.c -o pot -lmraa -lupmc-lcm1602 -lupmc-utilities -I/usr/include/upm
The LCD screen should now show the current Pump status and Moisture Level in the soil. And the pump should start pumping water once the moisture level drops.
Code
Github
https://github.com/96boards-projects/automated-indoor-irrigation
The article was first published in hackster, April 25, 2023
cr: https://www.hackster.io/ric96/automated-indoor-irrigation-73dc09
author: Sahaj Sarup