This repository contents a decision support system for intelligent irrigation in crops from a low-cost Agroclimatic station, based on Arduino, Raspberry and Machine Learning.
Repository folders:
/yourRoot -path
|-- Readme.md
|-- src # source codes
|-- Arduino # slave source codes
|-- Graphics # Graphics code
|-- Raspberry # master source codes
|-- Training # Training code
|-- Data
|-- ciclo_1.csv # dataBase file for cicle 1
|-- ciclo_2.csv # dataBase file for cicle 2
|-- ciclo_3.csv # dataBase file for cicle 3
|-- Validacion_1.csv # dataBase file validation for cicle 1
|-- Validacion_2.csv # dataBase file validation for cicle 2
|-- Validacion_3.csv # dataBase file validation for cicle 3
|-- Learning_models # trained clasifiers in .sav
- Agro-sensor system, developed at the University of Ibagué.
- Arduino Mega 2560
- Raspberry Pi 3
- Arduino IDE
- Libraries for arduino:
- TSL2561
- OneWire
- Wire
- DallasTemperature
- Raspbian OS
- Python 2.7 in this case I used Spyder
- Load on arduino mega 2560 the file
/yourRoot/src/arduino/AgroSensor_Code.ino
- Run the script:
/yourRoot/src/raspberry/web.py by using
sudo python web.py
- To access the interface:
- It must be connected to the same ethernet network of the raspberry Pi
- In your browser enter the IP address of your raspberry Pi, for example:
http://172.17.100.26:8000
or the default IP of the serverhttp://0.0.0.0:8000
- In the interface you will find the agroclimatic variables and the ON / OFF buttons to control the irrigation system
- If you want to start a data collection of irrigation cycles:
- Load on arduino mega 2560 the file
/yourRoot/src/arduino/AgroSensor_Code.ino
- Run the script
/yourRoot/src/raspberry/Agrosensor.py
by usingsudo python Agrosensor.py
- Load on arduino mega 2560 the file
- If you want to train supervised classifiers with the obtained data:
- Open the python editor and run the script
/yourRoot/src/training/Train.py
- The data file is loaded, for example,
Ciclo1.csv
, this must be in the/yourRoot/src/data/
folder - Once the code is executed, it will give you a
file.sav
of the classifier that was trained, this is generated in the folder/yourRoot/src/data/learning_models
- Open the python editor and run the script
- Load on Arduino mega 2560 the file
/yourRoot/src/arduino/AgroSensor_Smart.ino
- Before running, the code should load the
file.sav
of the classifier - Run the script
/yourRoot/src/raspberry/AgrosensorS.py
by usingsudo python AgrosensorS.py
Universidad de Ibagué - Ingeniería Electrónica Proyecto de Grado 2019/A
- Harold F. Murcia
- Daniel J. Jimenez