krogk / AgroPi

Automated cultivation system for plants & mushrooms using Raspberry Pi
https://www.facebook.com/AgroPiOfficial
GNU General Public License v3.0
23 stars 11 forks source link
agriculture crops environment growth raspberry-pi real-time

AgroPi

Logo

Cultivate your plants and mushrooms with ease through a Raspberry Pi driven monitoring and controlling system.

Twitter YouTube Instagram Facebook

Contents

  1. About
  2. Getting Started
  3. Contributing
  4. License
  5. Contact
## About AgroPi is a flexible modular monitoring and actuating tool which allows user to control enviroment within a small chamber to provide the desired conditions for mushroom and plant cultivation. It is up to the user to decide what actuators fit the enviromental chamber needs best as the main swiching technology utilizes GPIOs controlling relay board.

Website interface enables user to easily display and control the conditions within enviromental chamber in real time. In addition AgroPi takes photos of your growth in constant intervals so you can show off your crops.

* [Tutorial](https://youtube.com)
[![Contributors](https://img.shields.io/github/contributors/krogk/AgroPi.svg?style=for-the-badge)](https://github.com/krogk/AgroPi/graphs/contributors) [![Forks](https://img.shields.io/github/forks/krogk/AgroPi.svg?style=for-the-badge)](https://github.com/krogk/AgroPi/network/members) [![Stars](https://img.shields.io/github/stars/krogk/AgroPi.svg?style=for-the-badge)](https://github.com/krogk/AgroPi/stargazers) [![Issues](https://img.shields.io/github/issues/krogk/AgroPi.svg?style=for-the-badge)](https://github.com/krogk/AgroPi/issues) [![License](https://img.shields.io/github/license/krogk/AgroPi.svg?style=for-the-badge)](https://github.com/krogk/AgroPi/blob/main/LICENSE)
### Software v0.2 Release allows you to view the following conditions on the website interface: * Temperature * Humidity * Light Intensity * [TVOC](https://en.wikipedia.org/wiki/Volatile_organic_compound) * eCO2 * Ethanol * Hydrogen

Logo

Dashboard

As well as easily set the target values for your environmental chamber.

Actuation

Control Panel
Camera also allows for basic seedlings detection

Actuation

Control Panel
[See Doxygen Documentation](https://krogk.github.io/AgroPi/software/docs/Doxygen/html/index.html)

### Hardware [Raspberry Pi 4 Model B](https://www.raspberrypi.org/products/raspberry-pi-4-model-b/)
Sensors: * [Raspberry Pi Camera Rev 1.3 Lens: P5V04A, Cable: AWM 20624]() * [Thermometer + Humidity - SHT31D](https://github.com/krogk/AgroPi/blob/main/hardware/SHT31D/Sensirion_Humidity_SHT3x_Datasheet_digital-767294.pdf) * [Light - VEML7700](https://github.com/krogk/AgroPi/blob/main/hardware/VEML7700/veml7700.pdf) * [Gas - SGP30](https://github.com/krogk/AgroPi/blob/main/hardware/SGP30/SGP30%20Datasheet.pdf)
Actuators - This is your choice as AgroPi is designed to control relay by changing state of the GPIO pins(make sure your relay module is compatible with 3v3 logic). For our demo the following are used: Switching Technology: * [Relay Board - Elego ](https://github.com/krogk/AgroPi/blob/Software_Release_1/hardware/Relay%20Board/4%20CHANNEL%205V%2010A%20RELAY%20MODULE.pdf) Actuators: * [Heating Element - Zerodis PTC Heating Element AC/DC 12V (80 ℃ 2—5W) ](https://www.amazon.co.uk/gp/product/B07FJZQLMK/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1) * [Water Pump](https://www.mybotic.com.my/products/Micro-Submersible-Water-Pump-DC-3V-5V/2778#:~:text=Suction%20Distance%3A%200.8%20meter%20) * [Fan - Coolermaster A12025-12CB-3BN-F1]() Schematics: * [System Schematic](https://github.com/krogk/AgroPi/blob/Software_Release_1/hardware/Schematic.svg)

Mushrooms

Example Setup
### Roadmap [x] Next Software Release (v0.2) - Actuation & Image Processing - Detecting Seedling/Mushroom - 20/04/2021 * [x] Camera Integrated * [x] Relay Board Driver * [x] Relay Board Integration * [x] Web-Server Improvments * [x] Gather Training Dataset * [x] Train neuralnet * [x] Test on real samples [] Software Release 3 Planning scheduled for september 2021(v0.3) ## Getting Started ### Prerequisites 1. Clone the repository ```sh git clone https://github.com/krogk/AgroPi ``` 2. Ubuntu Packages: ```sh chmod +x install.sh ./install.sh ``` 3. Server Depencencies: ```sh pip install -r requirements.txt ``` ### Installation 1.Build: ```sh mkdir build cd build/ cmake .. make test ARGS="-V" <- Optional Test Run, All sensors must be connected make ``` 2. Point Nginx File to AgroPi static website, modify the contents of /etc/nginx/sites-enabled/default ```sh server { listen 80; server_name localhost; location /favicon.ico { return 204; access_log off; log_not_found off; } location /sensor/ { include fastcgi_params; fastcgi_pass unix:/tmp/fastcgisocket; } location / { root pathToAgroPi/AgroPi/software/web/html; index dashboard.html; } location /static/ { root pathToAgroPi/AgroPi/software/web/app; } } ``` ### Usage To run the software: 1. Go to build directory and run application ```sh ./src/AgroPi ``` 2. Wait 15 Seconds for application to set up sensors. 3. Connect to webiste in your browser on your phone or pc ```sh (Rpi ip adress):80 ``` 4.Switch to control pannel, update your target values and enable your actucation heuristics. ## Contributing See `CONTRIBUTING` for more information. ## License Distributed under the GPL-3.0 License. See `LICENSE` for more information. ## Contact [Samuel Obosu - Web server & Network Programming](https://github.com/Samuel-Obosu)
[Andrew Scott-George - Image Processing, 3D design, & PR](https://github.com/andrewsg3)
[Kamil Rog - C++ Real-time Embedded Programming](https://github.com/krogk)