Close
0%
0%

IoT to Feed the Next Billion

An opensource Web platform and cheap sensor hardware solution for the massification of Continuous-flow solution culture (hydroponics)

Similar projects worth following
Humans require food, water, and living space in order to survive. These do not exist in endless abundance, making humans dependent upon the optimization of land area. Population is predicted to expand from 7.0 billion to 9.5 billion within 40 years. A parallel increase in the demand for food is implied, and estimates claim that food production will need to double in order to compensate. Trouble is the consideration of productivity of current systems of agriculture and water harvesting. Hydroponics is a system of agriculture that utilizes nutrient-laden water rather than soil for plant nourishment. Because it does not require natural precipitation or fertile land, it presents people with an alternative to traditional farming, our Goal is to develop and release an opensource IoT solution (hardware + web platform) so that farmers can adopt and deploy faster means to monitor and control their hydroponic greenhouses by using MQTT, WIFI, OSHW uEnergy Sensors. lets feed the next Billion!

The recent explosion on the bast amount of development platforms for IoT can make it really hard to settle for one of them when planning to develop a new system, the very big differences between them makes planing ahead critical for developments since changing them mid project can result in huge set backs since there are still many big incompatibility between one or the other.

The basic goal of this project is to make a sensor monitoring platform for agriculture, intuitive enough so that farmers (not engnieers) can undertake the challenge of hydrophonic agriculture, which is a subset of hydroculture and is a method of growing plants using mineral nutrient solutions, in water, without soil. despite its many advantages over traditional agriculture, like better water conservancy since water is captures from rain and re flowed trouhg the system for long period of time, better efficiency in space use since production "beds" (where produce is grown) can be stacked in a vertical manner one above the other duplicating or triplicating production in the same space, and lower costs for production due to no need of pesticides or herbicides since produce is grown suspended above soil, so far hydroponics has not gone mainstream since it requires constant monitoring of various factors like Sun light, water temperature, water PH, Water salinity, PPM, etc. and higher degree of understanding (education) on how these factors interact between each other , this has limited the use of hydroponics despite its many advantages.

  • Frontend

    Kestler08/17/2015 at 19:01 0 comments

    Freeboard .io is a simple opensource dashboard framework that can be used to simply connect Mosquitti to dashboards and display data in real time. in a very easy way . all dashboards can be downloaded and exported and imported in JSON format witch can help a Group of disperse persons share dashboards easily with out having to to reconfigure the hole front end server.

    Mosquitto MQTT V 1.14 broker with Websockets support

    For that we need to make sure that cmake and uuid/uuid-dev are installed (For example: sudo apt-get install cmake uuid uuid-dev).

    Also we need to download the libwesockets library, compile it and install it:

    cd ~/IoTServer
    git clone git://git.libwebsockets.org/libwebsockets
    cd libwesockets
    mkdir build
    cd build
    cmake ..
    make
    sudo make install

    We then need to download and compile Mosquitto 1.4:

    cd ~/IoTServer
    wget http://mosquitto.org/files/source/mosquitto-1.4.tar.gz
    tar xvzf mosquitto-1.4.tar.gz
    cd mosquitto-1.4

    We need to edit the config.mk file and change the option WITH_WEBSOCKETS:=no to WITH_WEBSOCKETS:=yes
    And finally:

    make
    sudo make install

    To activate websocket support we need to edit the mosquitto.conf file located at /etc/mosquitto or some other directory and add the following lines, for example at the end of the file:

    listener 1883
    
    listener 9001 127.0.0.1
    protocol websockets

    Then we run it with:

    pcortex@cloudsrv:~/IoTServer$ mosquitto -c /etc/mosquitto/mosquitto.conf
    1424790588: mosquitto version 1.4 (build date 2015-02-24 14:38:47+0000) starting 
    1424790588: Config loaded from /etc/mosquitto/mosquitto.conf. 
    1424790588: Opening ipv4 listen socket on port 1883. 
    1424790588: Opening ipv6 listen socket on port 1883. 
    1424790588: Opening websockets listen socket on port 9001.
    

    Step 3: Installing freeboard.io dashboard

    We are almost at the end of this long post. For our infrastructure we need now to install the dashboard that will allow us to see the data in the browser.

    cd ~/IoTServer
    git clone https://github.com/Freeboard/freeboard.git

    For now I’ll just use apache to serve the freeboard dashboards that is installed in my server. Because freeboard is not installed on the root web directory we need to make the freeboard available to Apache. The easiest way to do this, as long as Apache has the FollowSymLinks option enabled for the document root, is to create a link to the freeboard directory on the web document root:

    sudo -s
    cd /var/www
    ln -s /home/pcortex/IoTServer/freeboard iot

    And now freeboard is available at the url http://myserveraddres/iot.

    We need now, and finally to add MQTT over Websockets support to freeboard… We are almost there. This posthttp://jpmens.net/2014/11/12/freeboard-a-versatile-dashboard/ shows how it’s done but I’ll repeat it here again:

    1st: Download the development version of mqtt.js here: (http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.javascript.git/plain/src/mqttws31.js?h=develop) and save it:

    cd ~/IoTServer/freeboard/plugins
    mkdir mqtt
    cd mqtt
    wget --output-document mqttws31.js http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.javascript.git/plain/src/mqttws31.js?h=develop

    We will now download the freeboard MQTT plugin:

    cd ~/IotServer
    git clone https://github.com/alsm/freeboard-mqtt
    cd freeboard/plugins/mqtt
    cp ~/IoTServer/freeboard-mqtt/paho.mqtt.plugin.js .

    We need to edit the paho.mqtt.plugin.js file and change the line:

                    "external_scripts" : [
                            "<full address of the paho mqtt javascript client>" 
                    ],

    to

                   "external_scripts" : [
                            "plugins/mqtt/mqttws31.js" 
                    ],

    and finally we need to change the index.html file from:

       <scripttype="text/javascript">
            head.js("js/freeboard+plugins.min.js", 
                    // *** Load more plugins here *** 
                    function(){

    to

       <scripttype="text/javascript">
            head.js("js/freeboard+plugins.min.js", 
                    "plugins/mqtt/paho.mqtt.plugin.js", 
                    // *** Load more plugins here *** 
                    function(){

    That’s it. We are finally ready. All infrastructure is done. We need now just to configure it.

    Final step: Testing it out with mosquitto websockets!:

    Let’s start Mosquitto: nohup mosquitto -c /etc/mosquitto/mosquitto.conf...

    Read more »

  • Backend

    Kestler08/17/2015 at 18:52 0 comments

    Back-end is made up of a database, mosquitto an opensource Mqtt Broker (web Sockets enabled) and some phyton code to catch the broker data and storing it in the database, Mongo was selected as database since it can handle JSON structures with out parsing data, witch makes data handling faster. and it also provides us to integrate other non structured data like General Weather forecasts from Publicly available APIs and also to serve our data to the community via API of our own.

    From Mosquitto to MongoDB

  • Nodes:ESP8266

    Kestler08/17/2015 at 18:21 0 comments

    ESP8266 was selected for node development since it has several advantages over other Dev Paltfoms, like an embedded 32bit 80Mhz CPU RAM 32Kb, DRAM 80Kb, Flash 200Kb (for SDK); as well as GPIO (upto 16), PWM (3), ADC (one) • UART, I2C, SPI.

    ESP Schematic

    ESP Board

  • system desing

    Kestler08/17/2015 at 16:50 0 comments

    Overall System Desing:

    -Nodes: ESP8266

    Sensors: Water PH, Water Temperature, Water Salinity, Water Conductivity, Environmental Humidity, Temperature, pressure, PAR sensor, 3/4 water Flow sensor.

    -Communications: Wifi

    -Message Format: JSON

    Protocol: MQTT

    -Backend

    Python

    Pub/Sub: Mosquitto

    DB: Mongo

    -Front end:

    python, Flask, nginx,

    dashboards: Freeboard.io


View all 4 project logs

Enjoy this project?

Share

Discussions

mvadrev wrote 12/25/2016 at 22:41 point

Nice.. Is is possible for us to collaborate? I am doing a lot on the greehouse and grow side of hydroponics. Maybe we could use your electronics. Looking into stuff like SQL logging 

  Are you sure? yes | no

Brent Kirkland wrote 12/28/2016 at 00:53 point

ditto

  Are you sure? yes | no

Nicolás Rodríguez T wrote 10/09/2015 at 14:48 point

Hi Edwin, which variables do you monitoring and control with your project and what  types of sensors have you included?

Greetings

  Are you sure? yes | no

Juanduino wrote 08/18/2015 at 08:58 point

Hey Kestler, check out this print https://hackaday.io/project/6995-icndy Would you beta test?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates