Lora Soil Moisture Sensor V3

From MakerFabsWiki
Revision as of 08:09, 22 October 2021 by Hefang (talk | contribs)

Jump to: navigation, search


The Lora soil moisture sensor V3 is based on Atmel's Atmega328P, it collects local air temperature/ humidity with sensor AHT10, 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 for the applications such as smart-farm, irrigation, agriculture, etc.

In applications, always you do not need to check the air/soil state continuously, have a test of them for few seconds after then minutes/hours sleeping is normally Ok for most projects. To save power, there the Air/ Soil measuring functional could be shut down in the working, so they can be only powered ON a short time and then a long time power off. With MCU in sleeping mode and low power consumption Lora module, this module can work with 2 AAA batteries for more than one year. Besides, this sensor is coated with waterproof paint, which makes it working longer in wet soil.

This is the V3 version of the Lora soil moisture sensor, you can check here for the previous one.

Lora Soil Moisture Sensor V3 101.jpg


  • Classic ATMEL AVR 8-bit Atmega328P, with Arduino Pro Mini(3.3V/8M bootloader pre-loaded)
  • Capacitor-humility measurement.
  • AHT10 temperature and humidity sensor.
  • Working with 2 AAA batteries for more than one year.
  • 3D printed case.
  • Waterproof paint.
  • Can be used directly without secondary programming.

What is hardware changed

Lora Soil Moisture Sensor V3 102.jpg Lora Soil Moisture Sensor V3 103.jpg
For the V2 version, the 555 IC will generate square ware that the ware into low pass filter composed of a resistor and a capacitor made by soil and PCB probe. As the moisture of the soil changes, the equivalent voltage of the capacitor will change. So the moisture can be measured by detecting the voltage of the capacitor.
As the picture showed, the difference between the V2 and V3 is the generator of the square ware. V3 generates the square wave by the MCU replaced the 555 IC, it can get the same effect as V2. Besides, removing the 555 IC will reduce the power consumption that increases the battery life.

Power consumption

Lora Soil Moisture Sensor V2 Lora Soil Moisture Sensor V3
Standby Current 680uA 7.3uA
Service life (two AAA Batteries) About 30 days About 2 years or more


When the sensor is used in the wet soil for a long time, the PCB probe buried in the ground would be more and more damper, and it would cause the inaccuracy of measurement at the end of the detection. To improve the measurement accuracy and extend the service life, we made a waterproof coating, that can provide waterproof protection and stop the PCB spoilage for a time.


In order to meet the requirement of the low power consumption, we provide the firmware for the low consumption and the firmware has been uploaded to the sensor before shipping. So you can use the sensor directly after unpacking it.

  • The firmware is available on Github.
  • When you power the sensor with 2 AAA batteries, it will transmit the soil moisture measurement through LoRa communication. Then the sensor will enter the sleep mode and wake up to work in 75 minutes.
  • There is an ID pasted on the case, and we have encoded a unique ID in the firmware for each sensor.
Lora Soil Moisture Sensor V3 104.jpg
  • You can use any LoRa device with the same frequency to receive the sensor measurement. The measurement LoRa transmitted will be made of ID, temperature, humidity and moisture,
such as: ID010003 REPLY : SOIL INEDX:0 H:48.85 T:30.50 ADC:896 BAT:1016
Lora Soil Moisture Sensor V3 108.jpg

Next, it will show you two ways that how to receive the senor measurement by Maduino LoRa radio or MakePython LoRa.
1. Use Maduino LoRa radio to get temperature and moisture, and show them on the serial monitor.

Lora Soil Moisture Sensor V3 105.jpg
  • Prepare the module with the same frequency (I used the 433Mhz one).
  • It is required to upload the sketch to the module to be a Lora receiver. The sketch can be obtained from here.
  • Open the sketch by Arduino IDE, select the Arduino pro or pro mini development board and the port.
Lora Soil Moisture Sensor V3 109.jpg
  • Install the RadioLib.h library to support the Lora module working.
Lora Soil Moisture Sensor V3 110.jpg
  • Upload the sketch to the module.
  • Check the serial monitor of the Arduino IDE, that it will display the sensor measurement when you reset the sensor.
Lora Soil Moisture Sensor V3 106.jpg
Lora Soil Moisture Sensor V3 107.jpg

2. Use MakePython LoRa to receive the data from the sensor, and show it on the screen.

Lora Soil Moisture Sensor V3 111.jpg
  • Prepare MakePython ESP32 and MakePython LoRa with the same frequency, and combine with two boards by the pin.
  • Connect MakePython ESP32 to PC by the USB cable.
  • Obtain the receiver sketch from Github, and open it by Arduino IDE.
  • Select the development board "ESP32 Dev Module" and the port. (if you have not installed the ESP32 library, please check here to install)
Lora Soil Moisture Sensor V3 112.jpg
  • It is required to modify the frequency configuration in the code.
#define FREQUENCY 434.0  // 868.0 or 915.0

SX1278 radio = new Module(LORA_CS, DIO0, LORA_RST, DIO1, SPI, SPISettings());  //433Mhz
// SX1276 radio = new Module(LORA_CS, DIO0, LORA_RST, DIO1, SPI, SPISettings());   // 868Mhz or 915Mhz

  • Upload the code to MakePython ESP32.
  • When you reset the LoRa Soil moisture sensor, you will see the measurement shown on the screen.
Lora Soil Moisture Sensor V3 113.jpg


You can list your question here or contact support@makerfabs.com for technology support. Detailed descriptions of your question will be helped to solve your question.