Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Abstract

This dissertation investigates the invention of a prototype rain gauge that uses wireless
LoRa communication technology in the Internet of Things (IoT) under the Cirad project. This
collaborative effort between the Electrical and Energy Engineering Department and the Faculty
of Hydrology and Water Resources Engineering aims to develop and modernize rain gauge
prototypes to reduce production costs, ensure accurate weather resistance, and improve usability
in areas with poor service and difficult weather conditions.
Accurate measurement is essential for a range of applications, from agriculture to water
resources management and natural disaster preparedness. However, current measurement
methods often have limitations, such as being expensive, requiring regular maintenance, or
being impractical in some settings.
To address these challenges, a new innovative idea has emerged in the form of ultrasonic
sensors, which have the potential to significantly improve the accuracy and reliability of rainfall
measurements. Additionally, the implementation of LoRa communication technology can
provide a solution for monitoring data in areas with unstable internet access or in the aftermath
of natural disasters.
By presenting the advantages and limitations of this new innovation, this paper aims to
contribute to the development of more accurate and reliable methods for measuring rainfall in
different settings.

Name: CHEA Phengou


Date: 02 November 2023
Place: Russian Conf.
Blvd. Phnom Penh, ITC.
Table of Contents
I. INTRODUCTION .................................................................................................................................. 1
1.1. Objective of the Project ....................................................................................................................... 1
1.2. Scope of work....................................................................................................................................... 1
II. DATA MEASUREMENT AND COMMUNICATION................................................................................. 2
2.1. Lora Communication ............................................................................................................................ 2
2.2. Selection of Microcontroller and Sensor ............................................................................................. 2
2.2.1. Our Prototype .................................................................................................................................... 2
2.3. Material ................................................................................................................................................ 3
2.3.1. PVC Pipe ........................................................................................................................................... 3
2.3.2. BOX .................................................................................................................................................. 4
2.3.3. Battery ............................................................................................................................................... 4
2.3.4. Buck Converter ................................................................................................................................. 4
2.3.5. Jumper Wire connection.................................................................................................................... 5
2.3.6. Antenna ............................................................................................................................................. 5
2.3.7. ESP32................................................................................................................................................ 6
2.3.8. LoRa.................................................................................................................................................. 6
2.3.9. Temperature sensor ........................................................................................................................... 7
2.3.10. Ultrasonic sensor ............................................................................................................................. 7
2.3.11. MicroSD Card Adapter with Memory of 8GB ................................................................................ 7
2.4. Software Program ................................................................................................................................ 8
III. Scenario Testing ..................................................................................................................................... 9
3.1. Measurement of water level by Ultrasonic sensor AJ-SR04M ............................................................. 9
3.2. Stress testing mode ............................................................................................................................ 10
3.2.1. Testing Prototype on the field for 6 days with transmit every 1 minute. ........................................ 10
3.3. Temperature Data Detection .............................................................................................................. 10
3.4. Power consumption ........................................................................................................................... 10
3.5. IP65 in Boxing and Solution of this Stress Test ................................................................................... 10
3.6. Testing on Lora Communication with transmit .................................................................................. 11
3.6.1. LoRa E22 with ESP32 .................................................................................................................... 11
3.6.2. LoRa-02(SX1278) with ESP32 sleep mood in 10ms ...................................................................... 12
IV. Result and Discussion .......................................................................................................................... 12
V. CONCLUSION......................................................................................................................................... 12

List of Figure
Figure 1. sketch and installed “Pini pipe” ................................................................................................... 1
Figure 2.Lora communication ..................................................................................................................... 2
Figure 3. Prototype...................................................................................................................................... 3
Figure 4. PVC pipe ..................................................................................................................................... 3
Figure 5. Box protection ............................................................................................................................. 4
Figure 6. Battery NCR18650B ................................................................................................................... 4
Figure 7.LM2596 DC-DC Buck Converter Step-Down Module ................................................................ 5
Figure 8. Jumper wire connection ............................................................................................................... 5
Figure 9. Antenna 12dBi 433MHz and Antenna 5dBi 433MHz ................................................................. 5
Figure 12. LoRa E22-400T22D and LoRa-02 ............................................................................................ 6

List of Table
Table 1. Data ultrasonic sensor normal pipe ............................................................................................... 9
Table 2. Data ultrasonic sensor when drill a hole pipe ............................................................................... 9
I. INTRODUCTION
An AWD device is a device created from the AWD project. AWD is a water-saving
technology that farmers can apply to reduce their irrigation water consumption in rice fields
without decreasing its yield. The technique of AWD uses a more controlled irrigation
strategy that can significantly reduce methane (CH4) emissions as well as water use and
pumping costs. one more thing, the field gets alternately flooded and non-flooded. The
number of days of non-flooded soil between irrigations can vary from 1 to more than 10
days. Show in Figure1.

Figure 1. sketch and installed “Pini pipe”

1.1. Objective of the Project

We want the development of technology devices for the smart farmer to be an easy way
to get data from their field with real-time monitoring. We used Lora communication to
transmit and receive data by mesh and point-to-point topology and upload data to the clouds
by using a gateway.

1.2. Scope of work


For the scope of work, there are 3 steps in the task:
1. Selection of microcontroller and sensors
2. Testing accuracy of sensor robust with the environment
3. Selection type LoRa module adapts the field

1
II. DATA MEASUREMENT AND COMMUNICATION

2.1. Lora Communication

LoRa is a wireless technology that offers long-range, low-power, and secure data
transmission for IOT applications, as shown in the Figure2. It’s based on chip spread
spectrum modulation, which has low long-range communications. LoRa can be used to
connect sensors, gateways, machines, devices, animals, people, etc, wirelessly to the cloud.
LoRa has many types and always has a range from 1 km to 5 km and 1 5km.

Figure 2.Lora communication

As shown in figure 2 below, LoRa communication provides a reliable and cost-


effective solution for long-range wireless connectivity, especially in applications where low
power consumption and extended battery life are essential. It has gained significant popularity
in the IoT space due to its ability to connect a large number of devices over wide geographic
areas with minimal infrastructure requirements.

2.2. Selection of Microcontroller and sensor


2.2.1. Our Prototype

As in the Figure 3, our protype has built not only purpose in project AWD. We also
joined in the competition in the techno innovation and get the winner award one in the
eleven teams and has go to final award.

2
Figure 3. Prototype

2.3. Material
In this section, we used more materials to build prototypes of this project such as PVC
Pipe, Boxing protecting heating and water flow, a Battery with a battery packet two-slot, a
Buck converter module, a jumper wire connection, an Antenna, ESP32, LoRa, Temperature
sensor, Ultrasonic sensor, MicroSD Card Adapter with Memory 8GB. Protype show in the
Figure3.

2.3.1. PVC Pipe

Figure 4. PVC pipe

As Figure 04 PVC pipe (inside diameter is 8mm and outside diameter is 10mm with
length 2m) is used to allow water to flow into the pipe via a perforated hole on the pipe and
3
then the ultrasonic sensor detection distance to find the level of water in the pipe like in the
field. Moreover, the pipe can help to ultrasonic measure distance accuracy more than put it
in the outside of the pipe.

2.3.2. BOX

Figure 5. Box protection

The box is a material that an important for to protection of the circuit from heating and
water flow but we must use silk. Show in the Figure5.

2.3.3. Battery

Figure 6. Battery NCR18650B

As the Figure 6 The battery and battery package are used to supply power to the Buck
converter, and then the buck steps down voltage to supply power or voltage to the MCU.
2.3.4. Buck Converter

As in the Figure 7, we used a buck converter LM2596 DC-DC to step down the Voltage
supply from battery 6V to the microcontroller Esp32 operating voltage between 3.3V to 5V
and another device in the circuit.

4
Figure 7.LM2596 DC-DC Buck Converter Step-Down Module

2.3.5. Jumper Wire connection

Figure 8. Jumper wire connection

The jumper wire connection is used for the connecting signal and VCC from the
microcontroller to another sensor or device. Show in the Figure 8.
2.3.6. Antenna

Figure 9. Antenna 12dBi 433MHz and Antenna 5dBi 433MHz

An Antenna is a device used to transmit or receive radio frequency (RF) signals. It is an


essential component in wireless communication systems and is used for various purposes.
we used antenna two are 12dBi and 5dBi. As shown in the Figure 9.

5
2.3.7. ESP32
ESP32 is a series of Low-cost, Low-power system on-chip microcontrollers with integrated
Wi-Fi and dual-mode Bluetooth. It’s a popular microcontroller module that we always used
for Internet of Things (IoT) applications and in projects. Esp32 is developed by Expressif
Systems and is a part of the esp32 Series of Microcontroller. It’s based on the Xtensa LX6
microprocessor and features dual-core processing, which allows for higher performance and
multitasking capabilities compared to its predecessor. It also includes built-in WiFi and
Bluetooth connectivity, making it suitable for applications that require wireless
communication.

Figure 10. ESP32_Wroom_32 DevKit

But in this project, we require a WiFi application so we selected MCU Esp32-Wroom32 to


connect LoRa from one to another. Show in Figure 10.

2.3.8. LoRa

Figure 10. LoRa E22-400T22D and LoRa-02

In the Figure 12, is a LoRa that has a range up from 1km to 5km. In the project we
described, LoRa communication is used to transfer data from the ESP32 to the ESP32.

6
2.3.9. Temperature sensor

Figure 13. DHT22 (Indoor ) and DS18b20 (Outdoor)

The temperature sensors are used to detect temperature and Humidity in the Box and
Out the Box of our prototype. In Figure 13 is DHT22 can measure the temperature of indoors.
How about Ds18b20 we put it from Out the Box so it can measure temperature and Humidity
outdoors.
2.3.10. Ultrasonic sensor

Figure 14. Ultrasonic sensor AJ-SR04M

Following the Figure 14, the ultrasonic sensor is used to measure the range or level of
water that is in the field or in the pipe.
2.3.11. MicroSD Card Adapter with Memory of 8GB

We used a MicroSD Card Adapter to include data from all the sensors in the circuit into
Memory and Store all this data to use later when we want to read it again. Shown to below
Figure 15.

7
Figure 15. MicroSD Card Adapter and Mamery 8GB

2.4. Software Program

The Arduino IED Software is an open-source software, which is used to write and
upload code to the Arduino boards. It is an official Arduino software, making code
compilation so easy that even a common person with no prior technical knowledge can get
their feet wet with the learning process. Show in the Figure 16.

Figure 16. Arduino IDE Software

It is available for all operating systems i.e., MAC, Windows, and Linux, and runs on the
Java Platform that comes with inbuilt functions and commands that play a vital role in
debugging, editing, and compiling the code. Each of them contains a microcontroller on the
board that is actually programmed and accepts the information in the form of code. The
main code, also known as a sketch, created on the IDE platform will ultimately generate a
Hex File which is then transferred and uploaded to the controller on the board.
In this project, we used Arduino IDE to test the sensor and the MCU of ESP32 but using
Coding Arduino.

8
III. Scenario Testing
3.1. Measurement of water level by Ultrasonic sensor AJ-SR04M

Figure 17. Testing AJ-SR04M

The testing on the pipe by using the ultrasonic sensor (in Figure 17) to measure the
distance of the pipe it accuracy following our set and length of the pipe that we set before we
are testing on it.
We have a pipe length of 2m so we tested it 2 times:
❖ First time Before Drill a hole pipe
+Data that we get
Table 1. Data ultrasonic sensor normal pipe

Length of pipe Distance of AJ-SR04M Result


60cm 60cm accuracy
120cm 120cm accuracy
2m 2m accuracy

❖ Second time drill a hole in the pipe


+Data That we get
Table 2. Data ultrasonic sensor when drill a hole pipe

Length of pipe Distance of AJ-SR04M Result


60cm 60cm accuracy
120cm 120cm accuracy
2m 2m accuracy

So, this testing is accurate however we are drilling a hole in the pipe or a normal pipe the
distance of the sensor detection is normal and accurate.

9
3.2. Stress testing mode
In the testing always has stress testing mode so we are tested for problem of the stress
testing to find way to solve it.
3.2.1. Testing Prototype on the field for 6 days with transmit every 1 minute.

In the first test, we want to know of quality of our prototype it has been working in the
field long time, and how much power consumption that it’s absorbed by the battery. We used
a prototype without heating protection to test in the field before building A at the Institute of
Technology and this is the result that we got from it such as Temperature sensor, power
consumption, and how to protection in the boxing waterproof.

3.3.Temperature Data Detection

When we tested ESP32 on October 3, 2023, at time 12:33 PM we got the from the
master data Humidity 85%, Indoor 41.00 °C, Range 60 cm, Outdoor 33.19 °C. So, the
temperature Inside the box is different from outside at 8 Celsius without heating protection.
All of the components can resist at 85 degrees.
3.4. Power consumption

By following the experiment on the field, we saw the storage of power consumption:
- When ESP32 active mode the prototype consumption is from 0.5watt to 3 watts
- When the esp32 is in Deep sleep mode the power absorbed by the circuit is 0.15 mA
to 10 mA
- When the light sleep mode current absorbed by the circuit is 0.8mA
ESP32 can use a Real-time clock with NTP Server sleep mode needs to external
wake-up.

3.5. IP65 in Boxing and Solution of this Stress Test

For IP65, the first digit, 6, indicates that the enclosure is dust-tight. This means that no
dust can enter the enclosure, even in the form of fine particles. The second
digit, 5, indicates that the enclosure is protected against low-pressure water jets from any
direction. This means that the enclosure can withstand water being sprayed at it from a
nozzle at a pressure of up to 3 bars.

Following from report inside the box

10
- When the light is raining humidity is between 85% to 87%
- After rain humidity is 72% to 75%
- And then no rain 62% to 68%
3.6. Testing on Lora Communication with transmit
For the main purpose of the testing, we want to know how much distance of the LoRa
can be transmission of different types. We used LoRa E22 and LoRa-02 with antenna 5dBi
433MHz by using ESP32 as a microcontroller.

Figure 18. scenario of the testing LoRa communication

3.6.1. LoRa E22 with ESP32


we used LoRa E22 with antenna 5dBi 433MHz and had two teams one team standing at
location 1 and the other team moved for testing to know the distance of the signal that can
transmit. After the testing, when the LoRa that was received went too far from the sender the
data was also transmitted the time was longer than before moving the receiver from the sender
data transmission was also slower. So, we got a testing distance of 750m from the location
standing then the transmitter lost signal. Shown in the Figure 18.

11
3.6.2. LoRa-02(SX1278) with ESP32 sleep mood in 10ms

In this testing when we used LoRa-02 with antenna 5dBi The Range of communication
between the LoRa same type can transmit data from standing to a moving distance of maybe
400m the sleep mood of esp32 has sleep mood in a delay of 11-14ms slowly more than the
set but the signal is still transmitted it’s just slow than before to receive data. Other hand when
we move from LoRa standing or LoRa sender for 1.2 km from those the Lora loses signal to
receive data. Shown in the Figure 18.

IV. Result and Discussion


Our prototype in the AWD project is challenged by the environment, such as high
temperature and humidity, which will impact electronics above 60% and hotter than 70
degrees Celsius. Additionally, noise and security are concerns for communication using
radio frequency, which is under development. We expect to spend time developing security
during the accuracy measurement process, which should be less than 3 meters. Finally, we
are concerned about power consumption, and recommend using an extra solar panel of 8 to
15 watts for sustainable power mode. Security is a major concern, and we do not have a
scenario for protecting against theft.

V. CONCLUSION
To sum up, we have success on the testing on waterproof, Power consumption, accuracy
range of the sensor, Testing on normal Temperature, and On Lora communication with
antenna 5dB. After this experiment we know how to protection the box from heating
waterproof by putting silk on hold of the vis on the box and the inside sub of the box. We can
set for power to supply on the prototype and how long life of the battery to apply to the circuit.
other hand we used the sleep Mood of the esp32 to save power consumption more than without
the sleep Mood. Moreover, for the LoRa communication with the antenna what we want is to
get it. After all, we want to test on high temperature, robust all environments to know how
data different.

12

You might also like