Close

Picking the sensors​

A project log for Soil moisture monitoring in a flower garden

When do your flowers have enough water, and how do you know?

joseph-eoffJoseph Eoff 03/02/2021 at 20:257 Comments

There are tons of soil moisture sensors available, and tons of plans for them available on the internet.

Sadly, most of the ones intended for hobbyist use are actually rather useless.

These things need to sit outside - rain, shine, watering can, and garden hose.

So, tell me why none of the hobbyist models are water proof.  Tell me why they have wires.

I compared a lot of commercially available sensors, and looked at a lot of DIY designs, and couldn't convince myself that they were any more than playthings for learning the principles of how such things work - but were not really working tools.

There's comparable equipment for professionals, but the good stuff is too expensive for hobby use - and the low end stuff is as bad as the hobbyist stuff.

After much searching, I found these sensors made by Xiaomi:


That's a waterproof, battery powered, Bluetooth connected sensor for moisture, nutrients, temperature, and light.

The hardware is pretty decent, and the software is fine if all you are doing is monitoring a couple of potted house plants.

The hardware has two things going for it:

  1. There's compatible hardware sold under different names that are cheaper.
  2. There are open source projects that provide libraries to read the data from the sensors.

I used a handful of those sensors last summer to track the soil moisture in selected spots in the garden - running around the yard with my Android phone every couple of days to collect the data from the scattered sensors.

From that data I made a few charts, including this one which shows how the soil moisture varies over the course of the day, and that the soil dried out somewhat over a period of a about a month:

I intend to space sensors in a one meter grid across the garden, and make "heat map" style charts of the moisture for every day over the coming spring and summer.

------

There are several companies that produce compatible hardware.

I have found similar sensors from Xiaomi, VegTrug, Royal Gardineer, and Wanfei.

They are all "four in one" (moisture, fertilizer, temperature, and light) sensors with Bluetooth.

My Royal Gardineer sensors work with the same software that I got with my Xiaomi branded sensors.

Collectively, the sensors are known as "mi flora" sensors.

There's more information about them in the miflira GitHub repository.

If you search a bit, you will find several projects (Python, ESP32, and probably others) that implement the miflora protocol.

Discussions

Chris Gervang wrote 03/23/2021 at 18:15 point

Hey, just thought I’d let you know I got 10 Vegtrug sensors installed. Pretty smooth experience. I did a soil drying experiment (sample size 1 so far) to correlate % moisture to water % by weight, and it’s inconclusive at one sample but interesting to come up with the technique. I used an old air fryer (convection oven) to quickly dry 240ml of packed soil, weighing it before and after. Came out to 20% water by volume and weight (50g).


I also found a website that suggests a good rule of thumb is to assume Soil is around 55% of the volume in a sample, with the remainder being Air.


Next I want to fully saturate my soil, and run a few more controlled scenarios: Drying soil completely, starting with a consistent volume and weight of soil. Then adding a controlled amount of water, mixing it well, taking sensor measurements.


It may not correlate well in the end, and I’ve read plenty of research oriented reviews saying resistance based sensors aren’t suited for science (and I think these are resistance based?? Let me know). But it’s fun.

  Are you sure? yes | no

Chris Gervang wrote 03/07/2021 at 21:34 point

Have you researched the ECOWITT WH51 system? https://www.amazon.com/ECOWITT-Moisture-Sensor-Humidity-Tester/dp/B07JM621R3/ref=psdc_3480689011_t2_B003L7CCIW

They only measure humidity, have a gateway for 8 sensors, and it seems data collection is over http endpoint. I am interested in them, but haven't found a super great open source library - this was the most promising: https://github.com/iz0qwm/ecowitt_http_gateway
And a MQTT convertor https://github.com/bachya/ecowitt2mqtt

  Are you sure? yes | no

Joseph Eoff wrote 03/07/2021 at 21:51 point

Nope.  I don't recall seeing those at all.

I just checked Amazon.de, and they do have the Ecowitt equipment - but it costs more than the miflora sensors and it seems you need at least one base station.

Amazon.com says the Ecowitt sensors aren't currently available.

  Are you sure? yes | no

Chris Gervang wrote 03/07/2021 at 19:14 point

Thanks for posting all these learnings! I’m also interested in tracking moisture throughout my garden boxes. I was wondering if you could share a little more about how to get the components you’re using?


I was wondering too if you’ve run across sensors that I could bury at the bottom and middle of boxes? I think it’d be super interesting to track a matrix and see that I’m always watering deep enough.

  Are you sure? yes | no

Joseph Eoff wrote 03/07/2021 at 19:35 point

Hi, Chris.  The original sensors I used were from Xiaomi.  Most of the ones I have now are from Royal Gardineer.  Same gadget, different name on the package.

I bought mine from Amazon, but that's Amazon.de not Amazon.com.  The American site doesn't seem to carry them.

Here's a link to the Amazon.de page of one seller:

https://www.amazon.de/Royal-Gardineer-Sensor-Bluetooth-Year/dp/B0746LPSMV/ref=mp_s_a_1_1_sspa?dchild=1&keywords=mi+flora&qid=1615145481&sr=8-1-spons&psc=1&smid=A3TVDIAOCYO59D&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUFZVFVHQVo5MVpFTzAmZW5jcnlwdGVkSWQ9QTA1NDA4MzlQMkwxQlg4S1NaN1cmZW5jcnlwdGVkQWRJZD1BMDE4NDM4OTJaVUFLVFAxQjg0RFQmd2lkZ2V0TmFtZT1zcF9waG9uZV9zZWFyY2hfYXRmJmFjdGlvbj1jbGlja1JlZGlyZWN0JmRvTm90TG9nQ2xpY2s9dHJ1ZQ==

This is a search on Amazon.com that returns the Wanfei and Vegtrug versions:

https://www.amazon.com/s?k=wanfei+plant+monitor&sprefix=wanfei&ref=nb_sb_ss_ts-doa-p_1_6

They all speak the same Bluetooth protocol and can be used pretty much interchangeably with the software from other manufacturers.

  Are you sure? yes | no

Chris Gervang wrote 03/07/2021 at 21:23 point

Thanks for the links. Looks like I can get a Wanfei sensor in the states! https://www.amazon.com/WANFEI-Monitor-Flowers-Sensor-Moisture/dp/B07ZH7FQJ7/ref=sr_1_2?dchild=1&keywords=wanfei+plant+monitor&qid=1615151956&sprefix=wanfei&sr=8-2

  Are you sure? yes | no

Joseph Eoff wrote 03/07/2021 at 19:50 point

I've updated the log entry with more information on the sensors.

I saw some sensors last year while I was searching that could be buried at different depths.  They were wired sensors, and more expensive than I liked, so I didn't pay much attention to them.  I don't remember what search terms I used to find them - that was last year in March or April.

  Are you sure? yes | no