Truffle is a fungi which grows in symbiosis with certain tree species. More specifically, near tree roots. Furthermore they can be found only on very specific soils and locations where water supply can be limited. All this makes them delicate to grow and very valuable.
Truffle farm consists from trees infected with mentioned fungi. To keep farm healthy it is needed to control humidity of the soil in which truffles grow. This part can be often challenging due to location and missing public infrastructure.
Our goal was to develop a system which works off the grid, controls water on the farm and informs farmer about possible need for resupply of it. We are calling this project Igrow!
Igrow infrastructure keeps farmer notified regarding the state of the water and reduces the amount of it brought to the site. This brings cost of farming down and reduces the workload on the farmer.
Igrow is controlling and monitoring water quantity on truffle fields as they are usually on remote locations with limited water supply. There are multiple tanks but only one has rainwater supplied from nearby roof. Igrow constantly calculates average consumption over N days and checks weather forecast to give warning before you run out of water. This gives a user clear notice when additional water needs to be transported.
Igrow is controlling two water tanks. For this purpose we designed two electronic modules. One for main watering tank, tank from which water is used for flowering and module for control of secondary water storage tank.
For control of main watering tank small low power module was developed. Its core is atmega328p micro-controller supplied by li-ion 18650 battery. Whole PCB and code is optimised for ultra low power consumption. Atmega is mostly in power-down state and wakes up every 16s. On wake up ultrasonic sensor and NRF24L01 transceiver is enabled. Water tank is measured and sent via NRF24L01. Module goes back to sleep. Module battery life is around a year. To make it really "set it and forget" additional solar charger circuit was added. This enables infinite battery life.
Secondary water storage tank electronics needs to be capable of transferring water to a main tank. For this reason bigger energy source is needed, like 12V car battery. Having this in mind Igrow secondary storage tank electronics is designed to be supplied from bigger 6V+ source. This enabled us to use Arduino mega board with ultrasonic sensor and NRF24L01, SIM800 transceivers. Arduino mega acts as a "master" of Igrow system. It itself measures water level of the secondary storage tank and listens for water level information send from main watering tank module via NRF24L01 modules. Additionally it is connected to a Igrow server using GSM module SIM800L and GPRS.
To establish wan communication SIM800L module is used. It establishes GPRS and communicates via server using http protocol. There is prepaid SIM card inserted into the on-field module. On set time intervals GPRS session is established on GSM existing network. Basic state of the system is send to the server using POST command. In case of success server responds latest data from UI is returned. This data is processed and internal settings of the hardware are adjusted.
MAIN FLOWERING TANK MODULE BATTERY MANAGEMENTFor Igrow custom module power source we implemented Li-ion battery. It supplies 4.2-2.5V which are further regulated to constant 3.3V using buck-boost converter. Essential sub part is li-ion protection using DW01 IC to protect the battery against over-current, over-voltage and under-voltage event. In any such case power to a board is cut. Furthermore charging feature is implemented using TP4057 IC. This enables us to supply external power from 3-5v solar panel for charging the battery. Using 2500mAh Li-ion battery redundancy is expected to be in few months to a year range.
Water level is measured using SR04T waterproof ultrasonic sensor. Measuring is done every 16s and recalculated by the processor. In total we have two sensors. One is located on watering and one on storage tank.
For LAN communication transceiver NRF24L01 is used. Main flowering tank module includes upgraded 100mw transmission power version for open air range of few hundred meters. This is essential to allow reliable connection no matter the distance between modules. Communication between modules is one-way for ease of implementation. Every 16s main flowering module wakes up and sends data packet in the air. Arduino mega listens and acknowledges the packet. Solution enables superb range and minimal energy requirements.
For backend we established linux server on a virtual machine in Okeanos educational platform with LAMP stack. We have written PHP script to get data from SIM800 module. Transmitter sends HTTP POST request with data on to the server. Later PHP script saves sent data on MySQL server. PHP script to access data from the server to display it on UI was also created.
In MySQL we have made multiple tables to handle data to and from transmitter module. One table handles "status" data and the other one handles "set" data. Status data gets data from transmitter, and set data gets data to transmitter. There are also extra tables for different settings of the system.
WEB APPWeb app includes a login page for each individual user, that would like to login to his admin page.
User is then greeted with control page which has information about the device on site. The most important is the level of water in both tanks. UI shows percentage of water in each tank. The site also shows weather forecast using OpenWeatherAPI, for the next 2 following days. User has few additional options like setting the desired level of water or manually starting the pump.
Besides water UI also shows 12V battery state and the recommendations panel with predictions. One of the predictions is the time when additional water needs to be delivered to the field.
In settings user fills in the data about how many truffles does he has and how much water would he like to use per one plant per day. The user also adds the data about roof size for system predictions.
After data is received system calculates for how many days water should last and how much additional water is expected from the rain. Weather is received from OpenWeather as mentioned above. Lastly the number of days till when water will last is shown on the first page under recommendations.
Comments