Overview
After the sensor data such as temperature, humidity, and EC value is transferred to The Things Network (TTN) through the LoRa gateway, we will need to retrieve these data from the TTN servers to our own server. Once the data is in our hands, we can process them and present them in a more user-friendly way. To build our server we use a Raspberry Pi 3 Model B, which can be stable and maintained easily. In addition, we also make use of a built-in software, Node-RED, which is an easy to use and flexible tool for building IoT networks. Node-RED allows developers to connect predefined code blocks, or “Nodes”, to perform desired functions in an intuitive way.
Node Construction
In order to retrieve sensing data from the TTN server, we use the Node-RED library called “node-red-contrib-ttn” which enables us to receive device events and messages as well as schedule messages to send to our end nodes. Another Node-RED library we implemented is called “node-red-dashboard”, which provides elements to construct an graphical user interface (GUI) more quickly. In figure.3, we separated our GUI into three pages which are Home, Sensor Data, Control. The detailed function in each part will be explained in the following paragraph.
Home Page
When accessing the website we built, the user will first see our team name and our team cover. This cover represents the concept of our project, smart fertilizer and robotics arm. The user can browse another page via the menu bar at the top left corner.
Data Page
In the Sensor Data page, the encrypted payload message from TTN will be decoded into humidity, temperature and EC values. These three values will be presented in a easily-readable way, so the users can easily interpret the current soil conditions from our graphs. We also record the historic values to track the soil quality in the long term, providing further insight of the farm. However, if soil values are still not intuitive enough, each value is converted into three levels (low, normal, high) and the corresponding colors (blue, green, red) to show the soil quality, so the farmers can make real-time responses by seeing the text or color in the soil quality block. Furthermore, when the humidity, temperature, and EC values are out of normal ranges, our system will automatically send an email to notify the farmers of the abnormality.
Control Page
The last page, the Control page, allows users to control the movement of the robotic arm remotely. Controls include straight forward, backward, and simple action for the robotic arm. In the future we also want to combine and incorporate an irrigation control system, that will allow us to control the amount of water by entering a value in the Control page.