Greenhouse Monitoring System
by make2explore in Circuits > Wireless
1919 Views, 9 Favorites, 0 Comments
Greenhouse Monitoring System
This project is about monitoring environment and parameters of greenhouse which will be located at remote areas, where there is no connectivity of cellular or wired internet. In such areas we can use LoRa IoT technology.
Greenhouse, also called glasshouse, building designed for the protection of tender or out-of-season plants against excessive cold or heat.
A greenhouse is a safe haven for plants. It reduces the accessibility of insects and animals that have the potential to damage or destroy your plants. Greenhouse environment reduces exposure to extreme weather conditions such as torrential rain and droughts.
The importance of greenhouses - Inadequate food supply due to high population growth is a global threat. Due to major issues like climate change soil erosion and biodiversity loss etc. Food production by conventional means is not sufficient. Therefore, agricultural production in a greenhouse with highly controlled environmental conditions is expected that the production contributes to a stable supply of agricultural commodities regardless of the weather.
Supplies
Required Components -
- NodeMCU ESP8266
- Arduino Uno
- Reyax RYLR998 LoRa Transceiver Module
- DHT22 Temperature Sensor
- Analog Soil Moisture Sensor (Resistive)
- 0.96" OLED Display
- Two Channel Relay Board
- USB to Serial(TTL) Module - FTDI-FT232RL
Problem Statement
In modern Smart Greenhouse Systems - IoT based Monitoring solutions uses different wired or wireless technologies like Wi-Fi, Bluetooth, ZigBee, RF etc. for data communications. Cellular/GSM services also used for sending data to Internet cloud or any other distant monitoring locations.
[refer Attached Image - Avnet’s Smart Greenhouse Monitoring Solution (Image Courtesy Avnet, Inc)]
But sometimes there may be areas where no signal/coverage of cellular services available. Now suppose, a farmer who has big cropland spread in multi-hectares. A big greenhouse is built in it. In such case use/installation of above wired/wireless technology infrastructure will not cost efficient. In this case use of LoRa wireless technology can play important role in communication.
There are several LoRaWAN based Smart Greenhouse monitoring services, provided by reputed companies. for example Seeed Studio's SenseCAP LoRaWAN Wireless Network Solution. and Laiwu Tropical Fruit Cultivation Project based on it. In these solutions subscription to LoRaWAN IoT Gateways and LoRaWAN IoT Networks is mandatory in order to get connected to global cloud.
Proposed Solution
Our Solution is for the areas where there is neither coverage of Cellular/GSM nor LoRaWAN IoT Networks like, Semtech, The Things Network etc. **Since our area has very poor connectivity of LoRaWAN Gateways, we will consider (Peer-To-Peer) Network scenario for implementation of our project as more sophisticated than LoRaWAN.
Project Scenario - Concept
Our solution is simple design of P2P LoRa Network which consist of one Node (End Node) deployed at Greenhouse which collect (Different sensors data) send it to another Node (Gateway) via LoRa. This DIY Gateway has same working principle as of professional LoRaWAN Gateways, which is to receive whatever (LoRa) data coming from End node and then connect it to mainstream IoT cloud/Internet.
- Suppose there is a farmer, who’s large agricultural land is in village or in area which comes in shadow "region C" (as shown in above image), means, area which have no connectivity of Wi-Fi, GSM, Cellular or Ethernet. This region can be 5 to 10 miles away from bigger cities or towns where good connectivity to internet is available. Now Suppose, there is a Green House in area C. We need to monitor its parameters like, Temperature, Humidity, soil Moisture, CO2 level, Etc. From another distant location. Like From anywhere in the other city or state. So, how we can achieve that without Wi-Fi or internet connectivity?
- So you can see, this particular area comes in these type of regions, where signal coverage gets weaker and weaker from surrounding cities. These are Shadow regions. Due to very few subscribers population in such areas, Telecom/cellular companies also hesitates to deploy any dedicated infrastructure for them. Here comes the usability of P2P LoRa technology.
- We can implement system, which connects any monitoring or controlling system of Greenhouse, to the LoRa Transmitter, which will send the corresponding data to the LoRa receiver, or Gateway, which will be at, any town, A, or B.
- Here, at these cities, at locations, A, or B, We can use NodeMCU ESP8266 or any other Wi-Fi enabled controller, interfaced with LoRa receiver module, to receive the data. So, once we get that data via LoRa to, A, or B. We can now send that data to cloud. Hence, it will eventually get shared. And can be accessed from anywhere in the world.
Project Scenario - With Components
Here is the pictorial representation of the project assembly. There will be a Transmitter and Receiver sections.
- In transmitter part, we will connect Node MCU ESP8266, to LoRa Module RYLR998 through serial interfacing.
- And On receiver side, another ESP8266 is connected with Reyax LoRa module. Which will act as a LoRa Receiver or Gateway.
- Here transmitter side sends these environmental parameters readings to receiver through LoRa. At regular interval of time.
- The receiver or Gateway receives those readings and upload it to cloud. Which then can be accessed by farmer from his cellphone or PC. So he can monitor the greenhouse.
- Also, at greenhouse, we will implement some basic level automation for irrigation system. Therefore, As soon as soil moisture level falls below certain level, Water pump will get start, and, It will circulate water to the plants.
- All this communication of LoRa, can be achieved using LoRa transceiver Module RYLR998.
Functional Block Diagram
Required Hardware
So, to implement this project's concept/prototype we'll need LoRa Transceiver modules or development boards with good LoRa transmission range
We'd like to extend our sincere gratitude to Reyax Technology for providing us their excellent hardware (RYLR998 LoRa Transceiver Modules) for making prototype implementation of this Project.
Check out our detailed review video, in which we have explicated detailed review of these amazing LoRa Transceiver Module. RYLR998, Manufactured by the Reyax Technology. We have seen its unboxing, Features, specifications, Datasheets, AT commands configuration guide, and, We have also seen demo of serial configuration of these boards via AT commands.
Hardware Overview
Getting started with RYLR998 module - This module is a UART Interface enabled 868/915 MHz LoRa, with Antenna Transceiver module. You can know more about this module and download the datasheets from its Product Page.
How to Configure/Program
There are two main ways to utilize the RYLR998 module.
First is, interfacing it with USB to Serial TTL adapter module, then connect it to PC via USB and control by AT commands. You can use any serial communication software to send AT commands and read data from the boards.
Then second method is connecting RYLR998 to another mainboard via UART and control by AT commands. For example, connect RYLR998 to Arduino Uno via UART, and send AT commands and read data from Arduino Uno through Arduino IDE’s serial monitor.
AT Commands Guide
You can refer AT commands Guide given by Reyax for more details about command sequence to configure this LoRa module.
This document of AT commands Guide also have detailed explanation of each command. Like following SEND command, used to send the data from transmitter to receiver.
P2P LoRa Networking Mode
In above sequence of using AT Commands, Network ID is important command, which Set the network ID for the given device. As we seen earlier that we are going to program our Project in P2P LoRa networking mode. For that we have to set same Network ID of both [Transmitter and Receiver(Gateway) device]. Please refer following figure for more details.
You can see here, in this diagram. There are two different LoRa networks. Network 1, and, Network 2.
- Each node in Network should have unique Address.
- Nodes with same Network ID’s, can talk to each other.
- Also, LoRa frequency band should be correct, as per standard frequency for respective country, or region.
- Here, please note that, you have to set the Lora frequency or band, as per your country and region. As we are testing it in India, we have set it as Standard IN865 band. likewise, you have to set it as per your countries LoRa Standard allocated by LoRa Alliance.
- **Here, very IMP, note that, Nodes from different networks, means, with different Network ID’s, can not communicate with each other.
- So, In this project, we have configured both transmitter and receiver with same frequency band, same Network ID, and, different addresses.
- Therefore, we can say, for proper LoRa communication between two nodes, LoRa trans receiver device should be configured with these three parameters. As shown in above image. i.e. Band, Network ID and, Device Address on Network.
- Hence in Code, Before starting communication between two LoRa nodes, we need to run specific sequence of commands to configure RTLR998 Module in LoRa Transmitter and LoRa Receiver Modes.
- Then at receiver, you have to run +RCV command if you want to show the receive data actively on terminal window. (Optional step)
- You can use .readString(); to save the received data into string variable, like shown in code snippet of receiver node, as following
Software
We have shared transmitter and receiver code. You can also check out project's GitHub repository for all the documentation, (Circuit diagrams, Schematics, Datasheets, AT Command's Guide, Libraries and Source codes.)
We are going to use Blynk IoT Platform for monitoring Greenhouse data. Blynk was designed for the Internet of Things. It can control hardware remotely, it can display sensor data, it can store data, visualize it and do many other cool things.
We have also added simple edge level automation which we have programmed for irrigation system. In this automation, if soil moisture level falls below 40 percent, Water pump will get start. And it will provide water to the plants until soil moisture level rises above 60 percent. We can also use automation and notification alerts facility of Blynk app.
Demonstration
Transmission Range Testing
We have also tested transmission range/coverage for RYLR998. We kept the transmitter section at fixed location and, moved the receiver away for distance of 1-6 Kilometers.
In ideal open space, (Line of sight) we got good reception of LoRa almost upto 6 to 7 Kilometers.
Future Experiments
Currently Transmitter node is only programmed to act as a sender, so it only gather all parameters and send to receiver node(Gateway) via LoRa. But it can also enhanced to work in Ping-pong mode (Full Duplex mode), means It can transmit data as well as receives some command to control the environment. If this is possible then we can tweak with the existing edge level automation, configuration, can add notification systems and so on.
Documentation
Projects all data, Documents, Source Codes, Libraries, Circuit Schematics will be available on GitHub Repository
https://github.com/make2explore/Reyax-LoRa-Module-RYLR998-Review
(CC BY-NC-SA 4.0)
Suggestions about Project design, Circuits, source code modifications, Optimization, Errors/Bugs findings and queries are most welcomed.
Credits
Thank you Reyax Technology, for supporting this project with hardware. Furthermore we'd like to thanks to all the peoples, websites and entities who helped us (directly/indirectly) in this project.