The task of our project is to sense environmental parameters, like temperature, luminance, moisture, humidity, and to transmit them to an IoT platform, in order to monitor the vital parameters of a plant.
For the implementation of this project, we use a lively Agrumino and a humidity sensor with an I2C interface. We decided to use Thingspeak as the IoT platform to receive the data measured by the sensors.
Thingspeak setupThingspeak is an IoT platform, which allows to monitor, store and analyse live data streams collected from sensors or connected devices.
In order to be able to use this platform, we need to go to https://thingspeak.com/ and create a Thingspeak account.
Once we log in, we need to create a new channel, which allows us to collect all the data associated with our project.
In our case, the "fields" (data) that we want to include and visualize in the channel are the battery voltage and the battery level of Agrumino, the soil moisture (expressed in % and in mV), the air humidity, the luminance and the environmental temperature sensed by Agrumino.
In the newly created channel, two API Keys are provided: one needed to read the data sent from Agrumino and one hypothetically needed to send data.
The moisture sensor should be connected to the Agrumino board on the indicated port in the figure, and it interfaces with the board using the I2C protocol.
The I2C address of the humidity sensor is 0x40.
As shown in the figure, the red wire is connected to the power supply, the black wire is connected to the ground, the yellow wire is connected to the SCL signal, and the white wire is connected to the SDA signal.
The communication between Agrumino and the humidity sensor has been implemented using a library that can be downloaded from the following GitHub link.
Code setupFirst, you need to download the code from the provided link. Once opened, you have to insert your WIFI SSID in the "SSID_NAME" string and the password in the "SSID_PASSWORD" string. Also, replace your API KEY in the "writeAPIKey" constant.
After this, you can start using your Agrumino to monitor the plant.
The communication between Agrumino and Thingspeak occurs as follows: first, data acquisition takes place, and then the data is transmitted to the platform through an HTTP GET request.
Once the data is transmitted, it can be viewed in real-time on ThingSpeak.
After the information is transmitted, the system enters "deep sleep" mode to avoid unnecessary power consumption of the battery.
This project provides a simple way to communicate data over the Internet concerning vital parameters for plant monitoring.
It is easily scalable for additional parameters (obtainable with the integration of additional types of sensors), making it a starting point for a future work.
A possible way could be the integration of a notification system based on events that alerts when threshold values are exceeded during the operation of the device.
Comments
Please log in or sign up to comment.