Wiznet makers

ankur608

Published October 31, 2022 © MIT license (MIT)

0 UCC

0 VAR

1 Contests

0 Followers

0 Following

Florabot: Giving voice to Plants

Open-source platform to monitor plant health and optimizing on agriculture through data and augmented speech.

COMPONENTS Hardware components

WIZnet - WizFi360-EVB-Pico

x 1


sparkfun - SparkFun Environmental Combo Breakout - CCS811/BME280 (Qwiic)

x 1


dfrobot - Gravity: Analog Capacitive Soil Moisture Sensor- Corrosion Resistant

x 1

Used Capacitive Soil Moisture Sensor v1.2


Raspberry Pi - Raspberry Pi 4 Model B

x 1

For running native Home Assistant Server.


dfrobot - Gravity Analog UV Sensor V2

x 1

Used GUVA-S12SD sensor.

Software Apps and online services

Arduino - Arduino IDE

x 1


Home Assistant Core Team and Community - Home Assistant

x 1


PROJECT DESCRIPTION

Farmers must meet the changing needs of our planet and the expectations of regulators, consumers, and food processors and retailers. There are increasing pressures from climate change, soil erosion and biodiversity loss and from consumers’ changing tastes in food and concerns about how it is produced. And the natural world that farming works with – plants, pests and diseases – continue to pose their own challenges. 

While modern agriculture provides a large number of solutions, the outcome is not always the same because each farm is unique: different landscapes, soils, available technology and potential yields.

THE CHALLENGES PLANTATION OWNERS FACE TODAY!

  • Many trips have to be taken in order to manually check the soil humidity on a regular basis.
  • It can be difficult to know the exact amount of water to give plants, thus causing stress for the crops by over or under-watering.
  • Over-watering plants and crops could lead to higher water costs than what is really needed.
  • It is sometimes difficult to know the optimal time to plant without data.
  • Manually measuring key data points about crops is often difficult, time-consuming, and more likely to be inaccurate.

To address the above-mentioned; FLORAbot was envisioned & developed to aid plantation owner, by giving plant-environment insights in a more user-friendly way.

 

Features of FLORAbot: 

FLORAbot allows plantation owners to instantly know several agricultural data points about their crop, such as;

  • Soil Moisture (VWC) 
  • UVA/B irradiance.
  • Ambient Climate Parameters (Temperature & Humidity) including CO2 and VOC concentration.

- thus, enabling better water conservation, less likely to over or under-water crops and save time and resources.

And, WHAT IF PLANTS COULD TALK? The answer is that we can know what they want, which will help us to respond to their needs accurately and precisely. For example, if the temperature rises, the moisture in the soil is decreased; as a result, plants need more water. If they are not watered at the right time, they will gradually wilt and eventually die. 

Still puzzled with that intriguing question, please follow further into this project and let’s jump on to further development.

Working Procedure:

The sensor is built around WizFi360-EVB-Pico board developed by WIZnet; which is a fabless IT company that provides Internet processors for the IoT and is globally recognised as the sole innovator to patent the hardwired TCP/IP technology into a microprocessor chip back in year 2001. Since, then multiple of its product-line have been used along many verticals.

WizFi360-EVB-Pico uses RP2040 microcontroller and WizFi360-PA module (built on W600 wireless SoC) that incorporates Wi-Fi capability (2.4GHz, 802.11 b/g/n and AT command configuration with FW Updates through UART and WLAN-OTA) to the board that makes it easy to develop on prototypes requiring connectivity (KC, CE, FCC, TELEC certified), easy integration and intelligence, moreover the design is open-source and is freely available.

WizFi360-EVB-Pico | WIZnet Document System

For our PoC development, FLORAbot sensor will allow user to interact directly with his/her plant through Alexa/Google Home Service, for this functionality the device utilizes Google Speech Engine Service to converse in a more human-friendly manner such as local weather updates, water requirement, daily-greets and n-things that can be done by user.

Developing the Hardware:

WizFi360-EVB-Pico board acts as the main controller and interfaces with Sparkfun Environmental Board (CCS811/BME280) over I2C [GPIO 12 & 13] and Capacitive Soil Moisture v1.2 probe & GUVA-S12SD UV sensor over analog ports [A0 & A1] respectively. 

Please do refer below diagram for connection details:

Feel free to test connections on breadboard, wiring, perf, milled CB or get your first batch of 4L–0.8mm FR4s from the chosen one; till everything works. I set on the path of Jedi (watching ANDOR S1.E3) and was lucky enough to electrically & mechanically shape the ideal HW for probe design, that will be housed in a sleek 3D printed enclosure.

And, quickly pulled off with designing enclosure after the hardware was vetted with realtime results [BEWARE: It’s no way back]. 

Plugged in the Ender (still FDM) and after minor changes (the 6σ fails eventually in your first iteration), was able to get a nice enclosure for our hardware (probably FLORAbot…. this is going to be repeated till eons).

Further developing on the Software:

For programming your WizFi360-EVB-Pico board though Arduino IDE, one can follow along instructions provided by Wiznet at following gitlink: Wiznet/WizFi360_arduino_library: Arduino library and examples for WizFi360 (github.com)

One must ensure to update the firmware to the latest version, that is continuously pushed on regular interval. Also, one should refer AT Command set exclusively released for WizFi360 for utilizing full functionality of hardware. 

After compiling and flashing the code to HW, you can verify the sanity of your sensor readings over serial terminal.

Please find the code attached/Github link (to modify with your soil-parameters and never ask how I got those calibration constants);

Do verify for the following lines in your code:

#include "WizFi360.h"

/* WizFi360 */
#define WIZFI360_EVB_PICO
#ifndef HAVE_HWSERIAL1
#include "SoftwareSerial.h"
SoftwareSerial Serial2(6, 7); // RX, TX
#endif

/* Baudrate */
#define SERIAL_BAUDRATE   115200
#define SERIAL2_BAUDRATE  115200

void setup() {
  // initialize serial for debugging
  Serial.begin(SERIAL_BAUDRATE);
  // initialize serial for WizFi360 module
  Serial2.begin(SERIAL2_BAUDRATE);
  // initialize WizFi360 module
  WiFi.init(&Serial2);
    // check for the presence of WiFi function.
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi functionality not present");
    // don't continue
    while (true);
  }

The device uses MQTT protocol to send data over to Raspberry Pi 4 with Home Assistant Server [Install using Pi-Imager] -- preinstalled support for Mosquitto service and parse your JSON data using YAML configuration.

Further, you can build dashboard and set automations, scenes and app notification service; configure echo and/or nest or Bluetooth speakers (for DIYers out there in wild west). I have built a simple UI dash with (!noticeable) FloraHome logo.

CASE STUDY: The Sustainable Fragrance

Sambac Jasmine or Arabian Jasmine (or Bela) is a tropical evergreen which produces a continuous show of fragrant flowers throughout the warmer months on well-established plants. These Jasmines are somewhat scandent shrubs that can produce long canes from time to time. Sambac Jasmine requires good quality well-draining somewhat acidic potting soil. The variety ‘Grand Duke of Tuscany’ is slower growing than the single flowered types which makes it a good choice for container culture and it has the advantage that it’s wonderfully fragrant (billing dollars into the perfume industry).

If you have too much soil it may stay too wet for too long of a period and can set the plant up for disease problems (sudo root-rot). Sambac Jasmines will grow under full sun conditions, as they are tropical plants, so do relish a certain amount of humidity, hence try to grow them outdoors at least during the warmer months of the year. When grown indoors, provide your Jasmines with as much direct sunlight as possible, since they can tolerate high UV-light conditions but will flower more and produce more vigorous and healthier plants with direct sunlight

Arabian Jasmine aka Bela has average water requirements & will sulk if kept too wet and can succumb to root rot if kept overly wet. The easiest way to determine if it's time to water them is by poking into soil with your finger to the depth of your first knuckle, if the soil feels dry at room temperature it is probably time to water, if the soil feels moist and cool, then it's not yet time to water.

In our condition, the plant had stopped producing flowers, even after taking few of the above-mentioned measures, ‘so only DATA can help!’, hence FLORAbot can prove to be of immense help in our use-case.

[+ADDITION+]: Few days after FLORAbot deployment, the project has intrigued me, more into gardening and lesser into coding, hence I started researching more on soil property and referencing it with accumulated sensor log. (BTW, it's been more than 5 days and FloraHome Server on Pi4 is continuously rigging without the heatsinks).

One of my botanist-friend while reviewing the project, marked - 'being a tropical plant, it requires moderate to least watering during the November, and cannot withstand waterlogged soil and requires defoliation and pruning, for a full bloom in spring'. 

Hence, necessary measures are taken as per recommendations and hope to see more foliage in next Spring.

Demonstration:

Conclusion Remarks:

In our future build, I would like to add PAR sensor to the FLORAbot and get research insight on residual carbon-dioxide exhaled by plant during the night-time. Also, I am going to scale-up the prototype tests to the crop-fields. Check on the OTA programming, add more automations and….

Thanks once again to the contest sponsors, for providing great hardware with equally great software support.

Documents
  • WorkCode_Florabot_v4

  • Connection_Diagram

  • Project Link: Github

Comments Write