Vinduino, a wine grower's water saving project

Monitoring soil moisture at different depths to determine when to irrigate,
and - more importantly - how much water is needed. Save 25%!

Similar projects worth following
If you want to learn about saving water, talk to a farmer. California farmers, including myself, voluntarily aim to reduce agricultural water consumption by 25%. This reduction (25% of 42 million acre feet/year) is more than the annual urban water use (8 million acre feet/year), much more effective than any residential water reduction can achieve.

The Vinduino project (Vineyard + Arduino) started out of necessity to better manage irrigation in my Southern California vineyard.
In order to be of the greatest possible use to the public, the Vinduino project is open source, affordable, and easy to build.

In 2015 we saved 25% , or 430,000 gallons, of irrigation water.
Cost saving on water and labor was $1,925.
Cost to achieve these savings was $635.
Minimum configuration for developing countries, incl. salinity measurement: $ 60.

36 countries are now classified as severely drought affected.
Saving water makes all the sense in the world. Hope you will be inspired too!!

Project Goals

Provide low cost, easy to build, and rugged components for optimizing agricultural irrigation

  • DIY calibrated gypsum soil moisture sensors (Watermark SS200 is also supported)
  • Hand held sensor reader (soil moisture, soil/water salinity, water pressure)
  • Solar powered remote sensor platform (Vinduino R3)
    Options include:
    • 4 electrically separated inputs for soil moisture sensors
    • Wifi (ESP8266) or Globalsat LM-210 LoRa module for long range (6 miles)
    • Irrigation valve control, optional pressure sensor for valve operation feedback
    • several options for temperature/humidity sensors
    • Built in solar battery charger
    • Built in real time clock for precise irrigation timing
  • Gateway to connect multiple LoRa end nodes to the Internet via Wifi (Vinduino Gateway)

Support the following use cases

  1. Easy entry/lowest investment/good water efficiency
    Walk around manual field measurement of sensors, use data for adjusting irrigation timing
  2. High automation level/low investment and maintenance/best water efficiency
    Automated irrigation adjustment with Internet data presentation/control

How does this project save irrigation water?

Using a single soil moisture sensor, you can determine when to start irrigation, but overwatering is hard to avoid. This is illustrated with the animation below. By the time the irrigation water reaches the sensor, the layer above is saturated and likely there is more water than the plant can consume. The surplus water will now seep below the root zone, out of reach of the plant, taking unused nutrients with it as well.

By using multiple sensors, located at different depths, you can actually control irrigation to not exceed the active root zone,
and thus save water. Rather than to irrigate for long periods and have long periods between irrigations, it's better to have short, frequent irrigation events. The plant will be able to take up the irrigation water before it has a chance to reach the level below the active root zone. Sensor 3 should be located lower than most of the active root system. When sensor 3 sees high moisture levels, its a signal to reduce water/increase interval frequency. Sensor depth and watering schedule depends on the type of crop and growth cycle.

For vineyards, irrigation reduction is sometimes practiced in the period before harvest to get highly concentrated wine grape material. The idea is that the best wines come from vines that have suffered water stress.

Sensor interface design considerations

Resistive sensors, like gypsum or Watermark sensors, need to be excited with short pulses of alternating current to avoid electrolysis effects. The Vinduino interface alternates current through the sensor, and two analog inputs are used to measure voltages over the bridge. This compensates for differences in (battery) supply voltage, and also allows to compensate for sensor bias voltage.

A lesser known fact is that sensors can act as small batteries due to a galvanic effect caused by a difference in concentration within the sensor. For details see: concentration cell. This effect happens with gypsum - as well as commercial Watermark sensors, and can severely affect DC bridge measurement accuracy. One solution is to average out by measuring with two analog inputs.

Because the sensors are connected together through a soil resistance path, multi-sensor measurements can only be done when sensors are disconnected when not in use. Vinduino uses regular 2N7000 FETs for this. The handheld reader can measure only one sensor at a time, and therefore can use a simpler interface circuit without FET switches.

The Vinduino project's deliverables:

Read more »

  • 1 × 8 characters x 2 lines LCD display AMC0802BR-B-G6WFDW
  • 1 × Arduino Pro Mini
  • 2 × resistor 4k7, 1% reference resistors used in sensor measurement bridge
  • 1 × resistor 470 Ohm LCD backlight current limit
  • 1 × 10 k potentiometer LCD display contrast setting

View all 11 components

  • Raspberry Pi LoRaLAN gateway for Vinduino

    Reinier van der Lee12/24/2016 at 17:00 0 comments

    LoRa Sensor Gateway

    The Vinduino gateway receives LoRaLAN sensor data from the Vinduino sensor stations and forwards via WiFi to a ThingSpeak account.
    To date, the Vinduino project has been using an Electric Imp solution, which required some soldering and PCB assembly.

    The following project update, describes a gateway that uses a LD20-H USB LoRa dongle from Globalsat, and does not require any electronics tinkering. This dongle is basically a USB version of the Globalsat LM-210 LoRa module used in the Vinduino sensor station, and, alike the module, works as a wireless UART. Combined with a serial terminal program, this dongle also makes a great debug tool to check out the LoRa network and sensor stations.

    The Vinduino LoRa gateway can handle up to 300 sensor stations within a range of 5 miles, and can be made for less than $100, assuming that an old PC’s useful life can be extended for the task of working as gateway. Because the software is based on the operating agnostic Python-3 programming language, the supported PC platforms that can function as gateway include Windows, MacOS, Ubuntu Linux , and of course Raspberry Pi. For increased traffic handling, more USB dongles can be added, working on different frequencies.

    The Python-3 gateway script, although tested to be working reliable for its basic gateway function, can be customized/improved as needed. For locations where access to Internet is not reliable, or intermittent, we added a SQLite database to store all sensor data locally.

    One possible application could be to store data locally and upload when an internet connection is available. This may also be a good starting point for developing smart irrigation algorithms.

    The Globalsat LD20-H is available on Tindie

    PS: This LoRaLAN gateway is not compatible with LoRaWAN sensor stations.

    LD-20H features

    • Ultra-high sensitive receiving ability by LoRa spread spectrum modulation technology
    • Long-distance transmission (1KM to 10KM)
    • Easy to use and easy to configure
    • Multiple dongles for multi-channel gateway
    • Programmable parameters:
      • Frequency: 862-1020 MHz
      • RF data rate: 0.81K, 1.46K, 2.6K, 4.56K, 9.11K, 18.23K bps
      • Max TX power: 5-20 dBm (100mW max)
      • UART baud rate: 1200-57600 bps, parity non, odd, even


    Python modules needed for the Vinduino gateway script:

    1. serial
    2. time
    3. thingspeak (linux install: $ sudo pip3 install thingspeak)
    4. sqlite3

    DB browser for SQLite ( is a great program to manage the SQLite database.

    Linux install: $ sudo apt-get install sqlitebrowser

    For Windows, install the Cypress USB serial driver

    For Linux:

    Linux does not require a special drivers for the USB serial interface, however ensure that you have qt4, gcc, and libusb installed. The USB driver stack in Linux has a built-in driver for CDC-ACM class devices. The Cypress chip inside the LD-20 supports CDC-ACM class, CDC-ACM driver gets automatically bound to the device and creates a device node in /dev/ttyACM*(* -The name of device node will vary based on the number of devices connected).

    Here is a good description for testing the USB serial connection in Linux:

    I found that Ubuntu and RPI recognized the USB serial port, but assumed it was an AT-command modem.

    A solution that worked for me is to bypass the ModemManager:

    sudo systemctl mask ModemManager.service

  • Vinduino LoRa LAN Gateway

    Reinier van der Lee09/24/2016 at 22:20 0 comments

    This project log entry covers the LoRa gateway that receives and forwards data from Vinduino sensor stations to the ThingSpeak website where it can be displayed as graphs.

    The gateway is based on the Electric Imp 1 and the matching April development board. Other components include a Globalsat LM-210H LoRa radio module, antenna, and Vinduino Gateway PCB. The unit works fine with a regular 5V USB wall adapter as power supply.

    During this year's field trials we were able to make reliable data connections over a distance of up to 7 miles (10 km) under line of sight conditions.

    As the Vinduino gateway is only receiving data, range can significantly be increased by using directional antennas without violating FCC regulations. The sensor stations (transmitting) only use the FCC approved antennas.

    The Vinduino sensor stations are default set to 15 min transmission intervals. This allows for a max of 300 sensor stations to be supported by one single gateway, provided there is collision avoidance in the software.

    We tested with multiple gateways and multiple stations this Summer in Temecula wine country, and found no issues with multiple gateways simultaneously receiving data from the same sensor station. The ThingSpeak network server accepts the first message and rejects identical messages coming within 15 seconds.

    The gateway is based on the Electric Imp 1 and its matching April development board, available at for around $20.
    Other components include a Globalsat LM-210H LoRa radio module, antenna (available at as add-on option for the Vinduino sensor station board), and Vinduino Gateway PCB, available at OSHPark at this link: Order board
    The unit works fine on a 5V USB wall adapter as power supply.

    Before you can program the unit, you will need to set up an account at electric imp and connect the electric imp using their interesting "Blink Up" procedure. The Electric Imp website has an excellent tutorial, so no need to elaborate here.

    The editor is on line. You can change the software on-line and then activate it to run without physical access to the unit. There is a programming section that runs on the host system of electric imp (Agent), and there is a programming section for the device itself.

    The latest code can be copied and pasted from the Vinduino Github page: Vinduino-GW
    Luke Beno ( was the original author, and he kindly agreed to release it to the public domain.
    I modified his code to make it work with ThinkSpeak.

    Testing the gateway and monitoring
    The Electric Imp editor has a logging window that is very useful for the initial bring-up and monitoring of the gateway and stations data. As shown below, the device section displays the data as it is received from the sensor stations.
    The sensor data comes in readable format. After the channel ID (blurred out in the picture below, there are 4 data fields for soil sensor 1-4, battery voltage, temperature, and

    When received and processed correctly by the ThingSpeak server, there is a response from ThinkSpeak with an incrementing number representing the number of correct data lines received for that particular ThinkSpeak channel.

    We tested during a full growing season in the Temecula wine region this year with 20 Vinduino sensor stations and 10 gateways, all operating at 915 MHz. Most of the issues encountered were related to the soil moisture sensors and their installation, not the sensor stations or the gateway. Although the 915 MHz ISM band is heavily used, we have not experienced interference from other users.

    The use of LoRa technology without the overhead of the full LoRaWAN stack can be sufficient for use cases that only need monitoring of non-confidential sensor data over longer distance. For secure bi-directional communications, LoRaWAN may be a better option, but -as always- this comes at higher cost and complexity.

  • Selling on Tindie!!

    Reinier van der Lee07/28/2016 at 02:20 0 comments

    Removing one more obstacle for growers to save irrigation water and cost. We are selling online!!
    Vinduino remote sensor platform optimizing agricultural irrigation

  • To Spray or not to Spray? Adding Anemometer

    Reinier van der Lee07/17/2016 at 21:12 0 comments

    For farmers who have remote fields, it's critical to know the wind speed conditions before setting up the equipment and riding out to spray. Too much wind , and you cannot accurately deliver the "goodness". Basically wasting time and materials and risk contamination of the surrounding properties.

    Luckily adding a wind speed sensor ( anemometer) to the Vinduino sensor station is an easy task. We used an Adafruit active anemometer with an analog output or 0.4 - 2 V. There are also passive anemometers with an intermittent contact interface. I prefer the active model as an analog read can be done very fast, and that helps to save battery power. The anemometer requires 12V or higher to operate, and the Vinduino station works with a single 3.8V Li ion battery.

    So we added an external DC/DC boost converter module. For this example, we used a low cost SMAKN 5V to 12V module, available at Amazon.

    To save battery power, the Vinduino system is kept in sleep mode until the RTC wakes it up. The Arduino then runs through the sensor measurements and sends the data via a LoRa radio modem to the Internet. We do not need to keep sensors powered on during the sleep period.

    The Vinduino board has a load switch chip that can switch battery power to the accessory connector J13. The load switch is controlled using Arduino digital pin 13 (ACC_EN).

    See Github for the full Vinduino schematic diagram. Below shows the simple wiring diagram for connecting the boost converter and anemometer.

    The anemometer electronics take about one second to start up and stabilize after power is switched on.

    Windspeed calibration is taken from Adafruit data that 0 m/sec = 0.4V out ,and 32.4 m/sec at 2V. Because there is a small temperature drift, the wind speed < 0.2 m/sec s reported as 0.

    Here are some initial results. So far, we only had moderate wind speeds during testing.

  • 50% Irrigation Water Saved at Veraison

    Reinier van der Lee07/09/2016 at 18:32 0 comments

    Veraison is here in Temecula!!

    Veraison represents the transition from berry growth to berry ripening. An important milestone for grape growers.

    The young green berries are still high in acidity, and hard to the touch. When the color of the berry changes, multiple changes start taking place. The skin becomes thinner, the color turns to purple, and the composition of the acids changes. Also, important for the alcohol level of the future wine, the berry sugar content increases. We're about two months from harvest now. Time to prepare for crush season.

    Our goal for this season is to save 25% water and provide data for other growers helping with their irrigation decisions. By managing irrigation depth to percolate water only into the active root zone, we saved 50% irrigation water thus far this season vs. the two previous years. This is based on data we get from the water district.

    We monitor soil moisture in and below the root zone, using our home-grown Vinduino system, to make sure that the vines have enough water to stay healthy and productive. After all we are growers!

    Apart from damage from excessive heat that affected many vineyards in the area a few weeks ago, the vineyard looks good.

    Below is a picture of the Vinduino gateway, which relays data from the remote sensor stations on the LoRa network via WiFi to the Internet.

  • LoRa network module review

    Reinier van der Lee06/05/2016 at 23:37 1 comment

    In this update, I cover experiences with 3 different modules, all using the same Semtech SX1276 LoRa chip, designed for use in the 915 MHz license-free band in the US and 868 MHz in Europe. The first generation of Vinduino remote sensor stations used ESP8266 WiFi modules. They work great in and around the house, but lack the range for agricultural work.

    With the LoRa modules evaluated, a range of up to a few miles is easily achieved with standard "rubberduck" antennas and line of sight. When using antennas that provide gain, you can get some serious distance. When testing with a 9 dB gain directional antenna on the balcony, and a loRa module with a standard antenna mounted on my car roof, I got a 6 mile range. A Finnish team from the university of Oulu reported 30 km (20 mi) range over water and 15 km over land using standard antennas.

    My requirements for the Vinduino telemetry were: long range (>1 mile), easy to work with, FCC approved, license free frequency use, robust communications, and low cost.

    ModelArduino compatibleFrequencyFCC approvedEstim price
    APC220yes430 MHzNo$14
    APC340yes915 MHzNo$27
    Arduino Mega915 MHzYes$44
    yes915 MHzYes$25

    Before introduction of the ESP8266, the APC220 was the module of choice for making wireless Arduino projects.

    They work as transparent wireless UARTS, serial data in = serial data out. Very easy to work with. Range of this module is just block away, and not being FCC aproved made me look at a new arrival from the same company, Appcon in Shenzen, APC340. I ordered some samples and they worked great, the only thing missing was FCC approval.

    Next module evaluated was a new module from LinkLabs, also using the same Semtech LoRa chip as the APC340, and FCC approved. There is even an Arduino sketch available, but unfortunately this only works for their Symphony LoRa WAN architecture. You can write to the registers for making it work as a wireless UART, but that mode is not supported and not FCC approved.

    Finally, I met with the folks of Globalsat at CES. They were introducing a new range of products for LoRa and LoRa WAN, and all their products have FCC approval.

    I have been using their LM-210 module for a few months now and had good results with field testing. The 915 MHz band has many users, all doing some kind of spread spectrum modulation. For use in Europe, I was able to program the module to work at 868 MHz, at 14 dBm output level. The LM-210 uses spread spectrum modulation as well, distributing the signal over 125kHz. Viewing with a SDR radio, the radio signal looks like this:

    The radio link includes forward error correction, and in most situations that works well enough. In situations where the signal strength is not enough to maintain the connection, errors can slip through. To maintain data integrity in challenging environments it's therefore better to have a CRC check in the software.

    The LM-210 connects with a 7-pin header. The I/O voltage should be 3.3V, the supply voltage can be up to 6V, but to be sure, I operate Arduino and LoRa module at 3.3V.

    Working with the modules is straightforward, data in = data out. The interface bitrate comes as default 9600 bps. The RF signal rate can be programmed between 0.81 and 18.23 Kbps. RF output power is 20 dBm (100mW), and can be reduced in 7 steps of 2 dB.

    The module has two mode selection pins, that are pretty interesting to play with.
    Mode 1, Pin 1=0 and Pin2=0: the channel is opened and the module is active. This is also the mode with highest power consumption: 13 mA typical for receive and 120 mA for transmit.

    Mode 2, P1=0 and Pin2=1: difference with mode 1 is that every transmission now starts with a preamble needed to wake up a receiver in wake-up mode (see mode 3), and RSSI data is added.

    Mode 3, P1=1 and P2=0: Power saving mode. The receiver is in sleep mode and wakes up at a set interval. If a transmission preamble is detected, receiving starts until the transmission is ended.

    Mode 4, P1=1 and P2=1, Setup mode. Changing...

    Read more »

  • Using a Solder Paste Stencil

    Reinier van der Lee03/20/2016 at 17:37 3 comments

    For upcoming trial installations, I need 25 Vinduino printed circuit boards. Not a sufficient enough quantity for cost effective outsourcing of assembly. The new version of the Vinduino board has a good number of SMD components, and after building the first board with solder paste, toothpick, and hot air tool, I knew I had to find a faster way. So when I ordered PCBs @, I clicked on the option for having a 30 x 40 cm framed metal stencil. Added cost for the metal stencil is $18 + shipping, a bargain!

    The PCBs and stencil arrived one week later, and I was pleased with the quality of the stencil and the frame. Now I was in the market for a stencil printer. A unit with good reviews will cost you over $500 + $200 shipping (weighs 17 kilo) from China. The $150 units on Ebay get mixed reviews, so was not sure if I wanted to squander HackaDay prize money on that.

    I ended up not buying a stencil printer (for now), but instead made a $20 wooden positioning frame that works accurately, and gives repeatable results.

    To fix the position of the PCB, I used iron-on edge tape. Then I moved the frame until it was perfectly aligned with the PCB pads. The frame position is fixed with pieces of wood glued to the base board.

    For first tests, I used low temperature lead free solder paste, and a putty knife to apply the solder paste. One single pass should be enough.

    The method gets me good solder paste dosage, and accurate alignment.

    Fresh from the T962A oven, all solder pads passed visual inspection. Looks much cleaner than the manually applied solder paste build I did on the very first board.
    No rework was needed.
    After assembly of the top side through-hole components, all boards work as expected.

  • More green coming to vineyards soon

    Reinier van der Lee03/13/2016 at 16:07 0 comments

    It's March, and we have budbreak in our vineyard. Spring is in the air, smell of jasmin everywhere.
    This is a great time to be in the vineyard.
    We were hopeful that this Winter would see a lot of rain, but so far El Nino did not bring the much needed relief from a multi-year drought.
    There is more fresh green coming to vineyards this year. In preparation of the new season, and with help of our Hackaday friends and, the Vinduino project has been developing a new generation of the Vinduino soil moisture monitor.

    The new Vinduino R3 (Remote, 3rd generation) has the following features:

    • 4 inputs for (gypsum) soil moisture sensors
    • built in (solar) battery charger
    • support for 6 mile long range (Globalsat LM-210, LoRa) radio module or ESP8266 WiFi
    • clock module for precise irrigation timing
    • on board temperature and relative humidity sensor
    • accessories port for optional irrigation valve control and extra sensor
    • power management circuits, resulting in lower power consumption
    • open source (of course)

    For LoRa operation, we are developing a low cost gateway capable of handling 300 end nodes within a 6-mile radius.
    More on that later.

    Vineyard trial installations start next month. We'll keep you updated on our progress.

  • Planning ahead to replace gypsum sensors

    Reinier van der Lee03/06/2016 at 19:34 1 comment

    Gypsum sensors slowly dissolve in water, and while doing so provide a salinity level around the electrodes that makes the sensor less sensitive to soil salinity.
    While their active life may be a few years, gypsum sensors will not last forever. So while installing, it's good to plan ahead for their replacement.
    The way I installed my sensors before is show below, using pipe couplers at the end of the required length PVC pice.
    In this case, I installed sensors at 2 feet, 4 feet, and 5 feet depth.

    Pulling them out improved an impossible task, as the couplers provide too much friction in the soil. The only way to replace is dig them out.

    A solution is to forego using couplers, and integrate the sensors with the pipe.

    The PVC pipe can be stretched to a wider diameter after heating with a heat gun. I found a temperature of 150-175C, makes the PVC flexible enough without burning or releasing fumes. A hot air rework stations works fine for this.
    After stretching, let it cool at it's wider diameter and place the sensors inside. Then heat the pipe again. The PVC pipe will shrink around the sensor, forming a tight fit after cooling. Now removing a sensor pipe is "only" a matter of applying sufficient force.

  • Vinduino Low Power Wide Area Network

    Reinier van der Lee02/21/2016 at 21:47 0 comments

    We are hard at work to get first vineyard trial installations done by early April.
    Too busy for frequent update logs, but here's a snapshot of what's going on.

    There will be an updated design for the Vinduino remote node. See picture below.

    Updates include:

    • 4 sensor inputs (previously 3)
    • integrated RTC
    • integrated battery charger and solar panel support
    • lower power design
    • support for Globaltech LM-210 LoRa radio modem (licence free 915 MHz band)
    • lower cost components

    As I am still working on finalizing the schematics and PCB, there is no update on Github yet.
    Below schematic is not finalized, but provided here for a high level impression.

    Range experiments using the FCC approved GlobalTech modules show a range of at least 6 miles. I had one unit set up on the balcony of our house in Temecula, and the other unit was connected to a GPS receiver on the roof of my car, reporting GPS coordinates and RSSI (radio signal strength) every 10 seconds. The data was imported in Google maps, showing the coverage. See picture below.

    Basically, for all the wineries located around the main winery road, Rancho California road, there is good coverage. There is another wine trail road, De Portola, that does not have full line-of-sight coverage from my vineyard location. Based this data, we assume that the whole wine region can be covered with a star topology using only 2-3 central hubs. Assuming hourly transmissions per node, we can support up to 300 remote nodes per hub.

    In collaboration with Luke Beno's Analog.IO project we are step-by-step resolving the issues of managing a network of this scale.

View all 30 project logs

  • 1
    Step 1

    Make a gypsum soil moisture sensor

    Components needed for one sensor:

    • 2 x stainless steel machine screws, 6 - 32 x 2
    • 6 x stainless steel hex machine nuts, 6 - 32
    • 1 x piece of window screen glass fiber mesh (5 x 10 cm)
    • 1 x plastic spreader (1.5 x 2.75 cm), holes for screws 1.25 cm apart
    • 1 x plastic top cover 3.5 cm diameter, holes for screws 1.25 cm apart
    • gypsum powder (Plaster of Paris)
  • 2
    Step 2

    for casting needed:

    • 1 x 3/4" PVC pipe coupler
    • painters tape

View all 3 instructions

Enjoy this project?



ruben.molina wrote 10/17/2017 at 09:54 point

Hello everyone,

I'm a beginner with this subject...

I want to monitor the irrigation in fruit trees with gypsum sensors or watermark and vinduino.I would like to know what I have to do to get water potential data with watermark sensors every hour. My questions are:

- Vinduino reads directly the analog signal from the watermark or needs something else.
- If you do not send the data to a web or server where they can be saved, on a sd card? What would I need to save the data?

-  I also found this in Tindie "LD-20H LoRa USB dongle for Vinduino" . What kind of adapter would I need to connect this to vinduino?

- There is some difference if it is used in USA or in Europe (in this case Spain)?

I apologize for my poor knowledge of the subject

Thanks in advance

  Are you sure? yes | no

Reinier van der Lee wrote 11/17/2017 at 01:47 point

Hi Ruben, Vinduino takes analog data from the sensors. SD card is a simple way to capture data, you can also send data to a database on the gateway. The raspberry pi python gateway code supports a SQLite database. See the Vinduino Github page. The LD-20 USB hub is just a USB version of the LM-210, it outputs the Vinduino serial data to the USB port, and vice versa. For Europe you need to program the LoRa modules to use the frequencies allowed in Europe (868 MHz). Hope this helps. Sorry for my late reply.

  Are you sure? yes | no

Ramon wrote 06/29/2017 at 12:51 point

Sir, why do we need alternate current for the watermark sensors?

Couldn't we simply use short digital HIGH/LOW pulses, so electricity would only be ON for a brief period.

  Are you sure? yes | no

Reinier van der Lee wrote 10/05/2017 at 19:30 point

electrolysis effects would destroy the sensor when pulsed with single polarity only

  Are you sure? yes | no

Patricio Gallardo wrote 01/07/2017 at 23:08 point

Hello Reinier,

Congratulations on winning the Hackaday Best Product Prize 2015.

I am building a Soil Moisture monitoring for the Agro Business in Chile. I already bought the Vinduino remote sensor station board and the Globalsat LD-20H LoRa USB dongle for Vinduino.

Question are, What sensor do you recommend and also, are you planning to make the conectivity with Lorawan?

Thanks so much

  Are you sure? yes | no

Phillip Dauben wrote 12/17/2016 at 05:53 point

I stumbled onto this project when starting a similar project for my Arduino well pump controller and tank level sensor.  Your vineyard looked very familiar and looked like my area.  It turned out you are in Temecula.  I'm a Civil Engineer for Rancho California Water District. Quite a small world.  My pump controller is the first phase and I hope to expand it to include irrigation control valves and moisture sensors that communicate with my irrigation controller. 

  Are you sure? yes | no

Reinier van der Lee wrote 12/24/2016 at 16:09 point

Hi Philip, will be happy to help any way I can with your controller. Have plans to start a LoRa WAN community in Temecula that you may be able to use for remote control of your  pump. As you are in the area, please feel free to come and see me at the vineyard. Best regards, Reinier

  Are you sure? yes | no

PhillipDauben wrote 01/03/2017 at 02:54 point

Thanks.  I've already used some of your advice from your Arduino pressure gauge for my pressure transducer on my pump controller.  Calibrating the device is becoming a challenge since I have three mechanical gauges giving me three different readings.  Chinese parts are getting the best of me.   I'm also building in a low pressure gauge to read how much water I have in my fire tank.  Hoping to have all sensors and controls connected to my house wifi to send alarms and communicate when there's a problem.  Twice my fire tank has drained neither time I had any warning until we were out of water.  Once it took days to restore water for a contractor to pull my well pump and replace it.   I'm using an Arduino Mega and 8 relay board to build in expandability for future irrigation phases.  I might be looking at your soil moisture sensors much more closely.  I grow mostly citrus on my 5 acres here in Ramona (I commute to Temecula).  My horses ate my few grape vines this year so they are in recovery mode.  Fence charger is my other project in progress to keep the horses where they are supposed to be.  

  Are you sure? yes | no

g.woodford wrote 11/06/2016 at 07:31 point

Very professionally executed project! Visited looking for sensor information, which I now have thanks.

 A thought on your high temp losses - in South Africa chicken farmers use  a fine water spray over their sheds on very hot days to cool them/ save the chickens. If it is not too windy on your very hot days, an automated fine overhead mist/spray system ( limited duration/ low water usage ) might just drop the local temperature a couple of degrees? 

tegards Geoff

  Are you sure? yes | no

Reinier van der Lee wrote 12/24/2016 at 16:12 point

Hi Geoff, as I heard this never happened in 40 years. Thanks for the suggestion. Water drops may work as magnifying glass and exasperate the situation. We have been discussing praying with white light reflecting clay to keep leaf temperature down.

  Are you sure? yes | no

beakersbro wrote 10/04/2016 at 15:00 point

Just found this project.

One quesition on radios

"The Vinduino sensor stations are default set to 15 min transmission
intervals. This allows for a max of 300 sensor stations to be supported
by one single gateway, provided there is collision avoidance in the

What do you mean by collision avoidance here?  listen before transmit?

  Are you sure? yes | no

Reinier van der Lee wrote 10/09/2016 at 23:25 point

Collision avoidance could be listen before transmit. This is implemented in the Vinduino sw. Limitation is that stations may not always hear the other station. Another way to avoid stations transmitting at the same time is "roll call", where the gateway initiates the station to transit it's data.

  Are you sure? yes | no

Filinto wrote 07/02/2016 at 11:34 point

Fantastic project Mr. Reinier van der Lee,

Congratulations on winning the first prize. I am working on a somewhat similar project and was researching sensors when I came across your gypson sensors & project. Very useful information indeed. You have saved me a lot of time and effort.

I have a couple of questions for you:

1. Sensor calibration – do you do this for each gypson sensor you make or does the

resistance value of the sensors you make remain the same.

2.Is there any effect on the length of wire between the sensor & the 329P microcontroller? I would need about 10 meters (possibly more) between them.

3. I observe a variation in amount of water dispensed at the start of the drip & the end of the
drip line which is about 30 meters from the start. (more water is dispensed at the start where the pressure is high). How do you handle this? I was thinking of measuring the soil moisture at the start & the end of the line and average it out.

The Internet connection I have at the farm, does not have a 100% uptime. Sometime it will fail for a few minutes and then be back up. Will your code, queue the data to be uploaded to the Internet on a connection failure or will the data be lost if the internet connection is down.

I will be monitoring saplings which have roots which don’t go very deep into the soil. Max about 6-8 feet deep. Hence I don’t think I could use your method of 3 sensors with varying depth. Just one sensor. I know placing the sensors on at a shallow depth throws up a lot of inconsistencies in soil moisture levels, but I am willing to take a chance & observe the results of a few tests. Any feedback for me on this one?

Thanks in Advance.


  Are you sure? yes | no

Reinier van der Lee wrote 09/24/2016 at 22:33 point

Hi Filinto, I noticed your comment rather late. Hope my answers are still useful:

1. Sensor calibration can be the same for all sensors. Sensors should be built consistently and should have the same response curve.
2. I have about 10 feet between sensors and station, you may pick up RF noise. My advise is to try and install RF filters if needed
3. Do you have pressure reducers on the drip line feed? Else use drippers that are pressure compensated. If that still is not enough, add drippers to the side where the is less water.
4. The system does not buffer to my knowledge. However, with 15 min default measurment intervals, you should have plenty of data/day.

Best regards,


  Are you sure? yes | no

Filinto wrote 10/14/2016 at 16:19 point

thank you for your reply. not late. your answers will be useful. monsoon just ending and i need to have the sensors in place in a few weeks.


  Are you sure? yes | no

Harry Svensson wrote 06/06/2016 at 01:10 point

Regarding the sensors and overwatering, that can _easily_ be solved with a PID regulator with just the PI part. If you tweak the settings so it works for a very slow system, like the water flowing down to the roots, then you can definetly get some very nice results. Like no overwatering and constant humidity (to whatever constant you choose). 

I'm sorry if this has been said before, but I did a ctrl+f on "PID" and found none, so I thought it would be worth mentioning.

  Are you sure? yes | no

vipul.patel wrote 03/28/2016 at 09:28 point

Reinier It is very interesting .. This is not only just smart solution for agriculture but also affordable to all farmer.. still i have some query..

1. Can i apply the same logic to read soil moisture using gypsum sensor with another micro controller ?

2. Whatever the equation to measure resistance and moisture will remain same for other micro controller?

3. To make Gypsum sensor, do i need to take for specific dimension ?

4. When we have the open source of LORA ?

  Are you sure? yes | no

Reinier van der Lee wrote 09/24/2016 at 22:38 point

You can use any MCU with built in ADC and sufficient GPOs .

All things being equal, the equation should be the same. If you measure resistance you can check for accuracy by using known resistor values instead of sensors.

No specific dimensions are needed for the gypum sensor. Beware that the response curve of a gypsum sensor starts at -60kPa, too dry for some crops

LoRa gateway code just published today

  Are you sure? yes | no

ahmadabdalmoezali wrote 03/21/2016 at 02:00 point

Nice project.  I have a similar setup using watermark sensors at root
level and below root level.  Change in sensor conductivity changes
frequency of cmos 555,

  Are you sure? yes | no

Reinier van der Lee wrote 03/21/2016 at 03:13 point

Is there a link to an English version of your site?

  Are you sure? yes | no

diastasis wrote 03/10/2016 at 01:46 point

Congratulations, very nice project! I tried to make my own sensors but i have some troubles. I ran the Vinduino-R_sensor_test.ino sketch (with only one sensor) but the values of the resistance was very high i think. and . What have i done wrong? Can you please explain me in the calibration excel what this (-1,695) number is?

  Are you sure? yes | no

Reinier van der Lee wrote 03/21/2016 at 03:11 point

Have you tried a known resistor? That would be your first thing to check to make sure your IF is OK.  If the resistance value checks out, it may be an issue with the sensor. Check if there is a voltage generated by the sensor. Also check if there is ground loop.

  Are you sure? yes | no

Reinier van der Lee wrote 03/22/2016 at 03:27 point

After thinking about this a bit more, for the bias compensation to work, you need 2 analog pins connected to each sensor. Sensor 1 input already has this, but for sensor 2 and 3 you need to wire to 2 additional analog input pins. Check if the code uses the right digital and analog pins. Good luck debugging!

  Are you sure? yes | no

diastasis wrote 04/28/2016 at 00:32 point

Finally i solved it! There was a fault with the one of the mosfets! Thank you!

  Are you sure? yes | no

phase2682 wrote 12/11/2015 at 22:45 point

Nice project.  I have a similar setup using watermark sensors at root level and below root level.  Change in sensor conductivity changes frequency of cmos 555, monitored and controlled by a pic 8bit controller to measure eight sensors (i.e. four locations).  Raw data is serial fed to a RPi that calculates water tension and interfaces to internet.  The watermark sensors are expensive, thanks for posting your gypsum sensors.  These look to be a good inexpensive solution so I can afford to implement several more.  Their response at high moisture tension could give me better selectivity at dry levels, something the watermarks are not as good at.

  Are you sure? yes | no

phaseform wrote 11/23/2015 at 00:06 point

Very nice, I'm building a similar project here
I ran out of time for testing before I went away, so I'm hoping its working with the very basic life support code I had time to implement.

I'm wondering about the soil moisture sensors, I wanted to do measurement at different depths, but haven't implemented that yet.
Why was it necessary to implement such a complicated setup? I'm just using these ebay sensors at the moment:
So the sensors you made will have some latent change unless you reverse the sensing polarity?

  Are you sure? yes | no

Reinier van der Lee wrote 11/23/2015 at 00:59 point

I was looking for a solution that holds up in an agricultural setting. I chose gypsum block sensors as they are low cost, can be buried for measurement at different levels,  and can be made to last a few years. All resistive sensors potentially can generate their own voltage (concentration cell effect), and by reversing the polarity of the measurement, and then use the average of two measurements, you can cancel that effect.

  Are you sure? yes | no

Jimmy Locke wrote 11/16/2015 at 01:20 point

Congratulations!  I'm happy to see your project make it to the top!

  Are you sure? yes | no

Christoph wrote 11/15/2015 at 19:34 point


  Are you sure? yes | no

Reinier van der Lee wrote 11/23/2015 at 01:00 point

Thanks Christoph!

  Are you sure? yes | no

Kumar, Abhishek wrote 11/15/2015 at 13:18 point

Congratulations on winning the Hackaday Best Product Prize 2015, and All the best!

  Are you sure? yes | no

Reinier van der Lee wrote 11/23/2015 at 01:00 point

Thanks, sorry we did not meet in SF.

  Are you sure? yes | no

Lars Anderson wrote 07/01/2015 at 14:01 point

I am allready using inspiration from your code to measure resistance in some smaller moisture sensor's used in a wall. A research project at an university.

But i dont find any schematic for the switched 3 sensor input?



  Are you sure? yes | no

Reinier van der Lee wrote 07/02/2015 at 00:16 point

Hi Lars, I added the Eagle files to Github. 

  Are you sure? yes | no

Reinier van der Lee wrote 06/28/2015 at 14:30 point

Christoph, Australian farmers have been using gypsum sensors for decades and report a useful life of 3 - 5 years.

There are sensors in my vineyard for 3 years now and I need to replace some. I checked a sensor that I placed a year ago. Still looks good and is fully functional. see:

To protect the sensor, I have included a layer of glass fiber mesh. That gives some protection from roots, insects, and what else. 
The installation depth should protect from frost.

It's good farmers practice to check and replace sensors every year. With materials cost less than a dollar, one can hardly complain having to replace once in a while.

  Are you sure? yes | no

Christoph wrote 06/28/2015 at 12:46 point

The moisture sensors look very simple and easy to make, but do you know anything about their long-term stability? How about roots growing through them, how does that affect readings (roots even grow through cracks in roads, after all)? Frost?

  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