SLoRa - Wireless weather station for agriculture

Low power, Long range wireless weather sensor system to detect potential frosting and alert the farmer to take action.

Similar projects worth following
The goal of the project is to create a system that can be deployed anywhere(even in the more remote orchards and fields) that regularly monitors weather conditions and notifies the farmer when immediate action is required to prevent crop loss.

I will try to make every log about one single topic in which I explain the process of thinking/designing/building with reasons and basic theory why I did something in a specific way.

There are multiple ways to prevent/limit the effects of frost and the best solution is Active protection applied at proper time.
- Active protection is based on misting of the trees. The crop is covered with artificial rain.
- Protection is based on the exploitation of the physical fact that the freezing water releases energy in the form of heat. For every kilogram of water 335 kJ of energy is released.
With the constant supply of water that freezes, sufficient heat is released to prevent temperature drop below 0 °C. Thus keeping reproductive buds undamaged since they are covered with ice.
- The amount of water needed depends on weather conditions, air temperature, wind.
- By spraying we have to start enough and end late enough to avoid hypothermia of ice and thereby damage to the trees.

Since frost happens late at night or early in the morning it requires from farmer to be always ready. If the cold change is sudden during flowering or budding period like it happened this spring, frost destroyed most if not all of the apples.

  • What ANTENNA to chose for gateway

    Dorijan06/20/2017 at 19:18 0 comments

    We got to semifinal of hackaday prize(yay!) , which also means some extra founds to pour in to the project. One of the things that cost money but it is well worth of buying one over building one is proper BIG outdoor antenna for the gateway which can cost around $100.

    - By proper I mean designed to withstand elements(UV, snow, ice...) while maintaining performance at set frequency through years.

    - By BIG I mean, the larger the better because there are either small OR good antennas. Similarly to camera optics where bigger aperture means better images in the dark/dusk in RF bigger antenna has better performance receiving very week signals send by low power SLoRa nodes from far away.

    But there is another parameter to keep in mind directivity(misleadingly called gain) of antenna. Since antenna doesn't have built in amplifier the Gain is not actually amplification but directivity or ratio between radiating with same power in perfect sphere(0dBi) or radiating more sideways(in this case) and less up-down.

    Luckily for me, the list for only 868MHz antennas is not long and I have 5dBi(~40°) and 8dBi(~27°) to chose from.

    Before choosing antenna I have to know where it will be positioned. Since I want a gateway to be placed as high as possible I marked the potential spots, checked the ownership of the land at possible spots to know who to ask for permission for placing the antenna "tower".

    We have managed to find the location that matches all the above criteria and even has a line of sight to our house which will enable us to use ESP-07 module with directional antenna to upload data to the internet. Using Ruler Tool in Google Earth I can make a cross-section of the hill to see elevation profile of the hill.

    Cross-section of the hill with slope converted to degrees(in green)

    On the left we have the average slope of 10°(14° max) and on the right 17°(21°max). On one side we don't want the antenna radiating to much in to the ground because of reflection and on the other hand we don't want to have any blind spots.

    In my case I am estimating that relative vicinity to the antenna will be enough to get LoRa packet through even from the spots on the right of above cross-section, while in both North-South and East-West cross-sections I have mostly elevation profile around 12-14° x2 = 24-28°(times 2 because omnidirectional antenna radiates equally upwards as downwards). Therefore I will chose the 8dBi model to reduce reflection from the ground and also increase the long range sensitivity.

    When antenna arrives and we set up the gateway I hope for 20km line-of-sight range and at least 2km non-line-of-sight(hopefully).

    (even though 2G antennas are designed to operate at same frequency ~900MHz + 1800Mhz, they are usually smaller since they are meant to work with higher power over shorter distances)

    For better feeling how omni antenna radiates just google: omni antenna radiation pattern

  • "Hello, World!"

    Dorijan06/12/2017 at 14:20 0 comments

    With wireless communications a first "Hello, World!" program can be quite difficult to achieve since it requires not only working IDE and correct setting for programming with only a few lines of code to light a LED but also correctly formatting and sending data and correctly receiving and decoding send data.

    For that reason we decided to omit LoRaWAN(protocol) in the beginning and just sent anything over LoRa(Physical layer).

    On one side there is B-L072Z-LRWAN1(official development board from STM and Murata) and on the other side, ESP8266 Wemos board and SX1272 LoRa module from Semtec, just stuck in a breadboard with 1/4 of wavelength or 86mm of breadboard wire (btw. 86mm also length of a credit card)

    For this ESP wasn't even set-up as with wireless and was used basically as 3.3V arduino for receiving data and sending them to the serial port. Later we will design a board for a 1-channel gateway with SX1272 and a ESP-07 module since it can be used with external directional WiFi antenna and all the electronics for MPPT tracking and battery management and place it on top of a local hill.

    When first data finally passed through it was time for a range test. Which consisted of placing dev board on a fixed location and driving around with "gateway" connected to a phone over USB OTG to check the received packets in the android terminal(DroidTerm)

    The range for the offical board on 1dBm TX power was about 3km line of sight and a over 1km when behind the hill. The sensor stick had around half the rang of the offical one. When power will be increased to 14dBm and a proper antenna instead of wire will be used on the gateway I estimate the range beyond 10km.

  • Populating the PCBs

    Dorijan06/12/2017 at 06:33 0 comments

    Since the module is in QFN package, without any exposed leads the only sensible way was to populate the boards using solder stencil and reflow owen.
    Therefore when I ordered PCBs from PCBway I also purchased framed stencil which consisted of all the boards I have ordered.

    The module has quite a decent spacing between pins which makes it easy to be populated without any shorts. I managed to successfully run all 5 out if 5 boards.

    The sensor sticks worked in the first iteration. But ESP replacement modules require a small connection to be made to rf_vdd.

    For programming a footprint for tag connect is used.

    Image: Mostly populated boards prepared for the reflow owen

  • Antenna matching

    Dorijan06/10/2017 at 09:38 0 comments

    Yesterday my boards arrived and first task of designing any RF circuit board is making sure that all the lines are 50ohm(or thereabout) at the intended frequency (868MHz and 917MHz in my case), so few boards had to be sacrificed to determine the values of components for antenna matching.

    Because of stability only NP0 capacitors were used.

    For testing I used a PCB with only RF line and DC feed components mounted and a semi-rigid coaxial cable with SMA connector soldered where RF pin of the LoRa module will be.

    As load I was switching between direct 50ohm termination and a stub SMA monopole antenna.

    Beside the main board, the solar power supply circuit also needed to be tested, but luckily the already planed ferrite bead for power injection was all it was necessary to get 50ohms

    Final results of S11 parameter were around:

    -30dB to -40dB on power supply + antenna

    -25dB for the sensor board

    -12db for the ESP compatible PCB module (worse results were expected since PCB antennas always have lower performance than proper ones)

  • 3D printing for PCB design

    Dorijan06/07/2017 at 22:32 0 comments

    Designing the sensor board took me more time than expected which in combination with surprisingly fast delivery of temperature/humidity case with protective shell meant that the case arrived before I sent the boards to production.

    A rainy Saturday was spent basically on: printing the 3D model of PCB, checking if it fits, fixing the shape of PCB, exporting 3D ... REPEAT

    The final version of board is at widest 11.8mm wide which is less than 12mm inner diameter of sensor casing and more than the module width of 11.6mm.

    Following the "improvement" of the shape was modification of all the connections and components to meet new space restrictions.

    There is also an image of final PCBs Top and Bottom in the project gallery.

  • Items with long leed time....

    Dorijan06/07/2017 at 22:19 0 comments

    - When I noticed the Hackaday prize for IuT!, I decided to put more of my time in the project to speed things up and try to catch a 12.6. deadline with working prototype. (also best mood to design complex systems called: "last minute panic" :) )

    - Best thing about LoRa is that the signal range is Literally as far as the eye can see and even where it doesn't if the node is close enough.

    - ESP will still be used in combination with SX1272 LoRa module to create a gateway from a hill peak where the concentrator will be placed to a friends house over WiFi.

    But the first things first. The most important thing was to order all the things that will arrive from china because the shipping time is usually about 4 weeks.

    items on the list were sensor casing, radiation shield, solar panel, ESP modules, long(to reach out of the case) SMA connectors...

    Second thing on the priority list was design of all the required PCBs...

  • The concept...

    Dorijan06/07/2017 at 21:47 0 comments

    First idea was to build a weather station "house" based on ESP8266 WiFi module for connectivity since I know it quite well and GSM for backup. And even though We managed to create a over-decent WiFi coverage in our apple orchard(65Mbps/10Mbps) using Mikrotik Metal 2 router the system is not scalable to others in the vicinity since the microclimate changes quite significantly due to diversity of terrain from near river(like ours) to slopes on the surrounding hills.

    I have been quite interested in LoRa from 2014 Münich electronica(with their 6 gateway covered the city campaign), but started dabbling with it only last year. I was quite impressed with the field test when we managed to reach 10km with just wire sticking from the breadboard.

    Few months ago I got my hands on FCC certified LoRa modules with processor(SX1276+STM32L072 from Murata) and we decided to ditch the ESP version(because of consumption and limited range) and focused on the new LoRa module.

View all 7 project logs

Enjoy this project?



manta103g wrote 07/23/2018 at 01:00 point

you said:


- Protection is based on the exploitation of the physical fact that the freezing water releases energy in the form of heat. For every kilogram of water 335 kJ of energy is released.


should be read

it's harder to freeze more water

if air flow is slow, limited, not forced\

since you need to extract more energy to get more water frozen


The idea, that the freezing water releases energy in the form of heat, which could prevent a water against freezing, is not correct

since water freezes in winter time finally into ice or snow

what you mean is phase shift energy

making harder to melt ice into water

  Are you sure? yes | no

fabian wrote 07/21/2018 at 19:03 point

is possible using mesh communications and AX25?

  Are you sure? yes | no

Kris Winer wrote 05/17/2018 at 03:11 point

Good choice for the module. You might be interested in this project:

  Are you sure? yes | no

Graeme Barton wrote 06/26/2017 at 10:50 point

Looks awesome, do you plan on selling these? I'd be interested

  Are you sure? yes | no

Dorijan wrote 07/05/2017 at 22:50 point

Once the competition is over and all the bugs are ironed out. We might go to commercial production but some cost optimisations will be required because of some expensive components and with current amount of manual labour required the cost would be over $100/pcs.

  Are you sure? yes | no

maco wrote 02/18/2019 at 20:20 point

that does not actually sound so bad price wise

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates