Currently this is what the functionality is:
- Reads soil moisture content
- Demonstrates use of MCP3004 ADC on LinkSprite Mezzanine
- Controls 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: Low Level Skeleton Library for I/O Communication on GNU/Linux platforms. This is the recommended 96Boards I/O library.
- UPM: 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.
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 Dragonboard410c
- Build MRAA
- Build UPM
- Calibrate Senor
- Insert sensor into dry and then wet soil and modify the
in_min
andin_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 Percentage
- The target moisture percentage can also be modified by editing line 127 and 133.
- 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.
Comments