Team:NTHU Taiwan/Software

Node-RED

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 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 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 intuitively.

Figure 1. Raspberry Pi 3 Model B
Figure 2. Node-RED Logo

Node Construction

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 a graphical user interface (GUI) easily. 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.

Figure 3. Node-RED Flow

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.

Figure 4. Home page in our GUI

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 an easily-readable way, so the users can interpret the current soil conditions from our graphs effortlessly. We also record the historic values to track the soil quality in the long term, providing further insight into 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.

Figure 5. Sensor Data page in our GUI

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.

Figure 6. Control page in our GUI

FOLLOW US

CONTACT US

nthuxigem@gmail.com