Lora Based Soil Moisture Sensor

About the project

Smart Soil Moisture sensor based on LoRa technology. It will detect the moisture, temperature and humidity of the soil and send those values in a string to the receiver. It is low power, highly efficient module which can be used in Smart agriculture (The communication range is up to 10km wirelessly).

Items used in this project

Hardware components

LoRa FeatherWing RFM95W 433 MHz LoRa FeatherWing RFM95W 433 MHz x 1
Atmega328P Atmega328P x 1
Antenna Antenna x 1
AAA battery AAA battery x 2
Battery Holder Kit For 2 AAA Cell Battery Holder Kit For 2 AAA Cell x 1
555 Timer 555 Timer x 1
HX3004 Temperature Sensor HX3004 Temperature Sensor x 1
MINI PUSH BUTTON SWITCH 2-PIN QTY. 4 MINI PUSH BUTTON SWITCH 2-PIN QTY. 4 x 1

View all

Software apps and online services

Arduino IDE Arduino IDE Programming
Fusion 360 Fusion 360 3D Printing

Hand tools and fabrication machines

Soldering Iron Soldering Iron x 1
Hot Air gun Hot Air gun x 1
3D printer 3D printer x 1
Twezzer Twezzer x 1

Story

https://drive.google.com/drive/folders/15oB58C1JRHAPE6Wgih3h-dndthNrEtuq?usp=sharing

One of the problems in agriculture is the difficulty of monitoring agricultural field because its location is far from the farmer’s house. Factors affecting agricultural crops are air temperature and soil moisture. Both factors are important to be maintained so that agricultural output can be optimized. Lora is a spread spectrum modulation technique derived from spread spectrum chirp technology and the first low-cost implementation of spread spectrum chirp. Lora s able to transmit data within a distance of 7.5 km with a frequency of 433 MHz. In this study, the machine-to-machine method with LoRA technology was used to send air temperature and soil moisture data. This method is advantageous because communication can be carried out at a frequency of 433 MHz and thus does not depend on cellular frequencies. Monitoring via the internet can be done by connecting LoRA with the ESP32 microcontroller which is connected to an access point for sending data online through the Ceyene application. The test environment is built by giving variations in air temperature and variations in the depth of the sensor that was planted in the soil. The research proves that monitoring soil temperature and humidity can be done with LoRA technology at a low cost.

Before designing this sensor we have several tries and errors no. of design and this is the final product. We also made one wifi based but the problem was What if the field is 3-4 km away from wifi? So to overcome this all we have designed this.

These are some of the raw images of the previous version


The lora-based Soil moisture sensor is based on Atmel's Atmega328P, it collects local air temperature/ humidity with sensor HX3004 and detects the soil humidity with capacitor-humility measurement solution. It can transmit the local environment data to the gateway or devices with the Lora communication, and it suits the applications such as smart-farm, irrigation, agriculture, etc.




MCU generates the square wave , it can get the same effect as V2. Besides, removing the 555 IC will reduce the power consumption that increases the battery life.



Lora Soil Moisture close the PWM outputs and ADC(It’s important, ADC affects some of the power consumption) when sleeping, microcontroller goes into sleeping mode after Lora’s sleep. Wake up by the internal time, get the value of the air temperature and relative humidity from AHT10. Open the PWM outputs and ADC to measure the soil moisture and battery voltage. Then send them out via Lora. Repeat the work progress all the time.
The most energy is consumed when measuring the moisture level and transmit to LoRa receiver. Much of the time is in Low power mode. The default sleep time depends on the Macro SLEEP_CYCLE. When SLEEP_CYCLE is defined as 450, sleep time is (450+1)*8s=3608s, almost 60 minutes. Then send the data out about 2 seconds.

We tested the average power consumption when working is 9.88mA and the low power consumption when sleeping is 7.1uA. If use 1000mAh 2*AAA battery, it can be worked for more than 77821 hours(more than 3 years) in theory. However, it needs to be noticed that the final lifetime depends on the life of the battery and PCB. Also, you can change sleep time (the SLEEP_CYCLE value in the code) as your requirement.


Sent String

"ID:DTH001 [SOIL] INEDX:1 MOIST:5% H:81.91% T:30.62°C VAL:1 BAT:88% "



Features:

  • Wireless Lora Transceiver
  • Soil Moisture Measurement based on capacitive Testing
  • Unique ID
  • Low power: 7.1uA when sleeping. 2 years working life with 2xAAA battery
  • Onboard HX3004 sensor to monitor air temperature and air humidity
  • Onboard Battery Voltage Measurement
  • Full Open Source- all hardware and software open at GitHub
  • Compatible with Arduino
  • Supply power voltage: 2.0V~3.3V
  • 3D printing case
  • Schematics, diagrams and documents

    Schematic

    Easy EDA Schematic file

    CAD, enclosures and custom parts

    Case v1.0

    Designed in Fusion 360, Slice software Flash Print

    Code

    Code

    Final code .ino file

    Credits

    Photo of deepak-hadkar

    deepak-hadkar

    All about Electricals, Electronics, and Embedded systems. Automation, IoT, Microcontrollers, and PCB designing are my kind of interests.

       

    Leave your feedback...