Tired of Killing Houseplants? Try Using WiFi.

Here at Hackaday, we have to admit to neglecting a few houseplants in our time. Let’s face it… a cold, hard, thinking machine can care for our green friends better than you can. Why not team up? [cabuu]’s WiFi-enabled soil moisture sensor will do the trick in case you, too, want happy plants.

This is one of those projects which would have been much more difficult even five years ago, and really shows how lucky we are to have accessible technology at our fingertips. It’s conveniently constructed from off-the-shelf electronics modules, and nestled inside a 3D-printed case. The design is attractive as well as functional, showing the status LED and allowing access to the USB charging port.

The brain is a WeMos D1 mini, while a D1 battery shield and 14500 Li-ion battery supplies power. A key point of this build is the use of a capacitive moisture sensor, which doesn’t suffer the same long-term corrosion problems that destroy cheaper resistive probes. And no project is complete without an LED, so a WS2812 shows green for good, red for dry and blue for too wet. To extend battery life, the sensor supports a sleep mode, which tests the soil periodically, and presumably disables the LED.

Of course, if you’re a habitual plant-neglector, simply having a moisture probe won’t help; those can be as easy to ignore as the plant itself. That’s where WiFi comes in. [cabuu] wrote a Blynk app to monitor the sensor on a smartphone. The app shows current moisture levels and allows you to change the wet and dry warning thresholds. When the reading exceeds these levels, the app notifies you — this feature is the one that will keep your plants around.

We’ve seen moisture sensors before, and our own [Al Williams] has even taken a quick look at Blynk that can help if you want to get started writing smartphone interfaces for your projects.

Thanks to [Baldpower] for the tip.

50 thoughts on “Tired of Killing Houseplants? Try Using WiFi.

  1. I really like the enclosure but I think it would make much more sense to make it USB powered for indoor use, it could be a lot smaller without the battery and it wouldn’t have to sleep so much.

    Oh and these sensors are much more fun if you rig them up to a pump and water tank so you can keep the soil moisture perfectly regulated.

  2. 1. What is the energy consumption ? Can you please measure it ?
    Because the NodeMCU (ESP8266) needs 14mA during deep sleep (not so low-powered)

    2.Does the code work ? Because I thought that the ESP.deepSleep command should be inside the setup and not in the loop function

    1. NodeMCU uses that much power because of the USB to serial chip, leds and inefficient power regulator. Using a bare ESP8266 module with just a decent regulator will get you well below 1mA deep sleep.

      1. I use the WeMos cheapo modules with intermittent wakeup to send MQTT data in a few places around the house, and the drain has to be on the order of microamps, rather than milliamps, because I only have to charge them once or twice a year on 750 mAh batteries.

        Just checked: data sheet says 20 uA.

        Do you mean modem sleep? Or do you have an LED on?

  3. Some feedback from someone that had made the same thing and used it :)
    – Maximum sleep time for esp8266 is ~3H – with a single LifePo4 (~400mAh) one can make it last ~1year
    – Capacitive sensor is a pain in the ass to make – the moment you get the resolution and it becomes a nice antenna for alll sorts of EMIs …
    – I have used that for ~1,5 years and gave up
    Problems:
    – The sensor is very sensitive to the placement in the soil – the moment you move it a bit and your baseline is gone
    – The sensor is heavily affected by the plain root system – e.g. if the plant has lots of roots around the sensor it will continue “find” moisture even if the soil is dry
    – Does not work for plans like Orchid where the soil substrate is something like woodchips (substrate too fluffy)
    – Other plants like to have the bottom dipped in water while the top is not that wet at all …
    – Even in good dense soil the plant will grow and will change the proportion of the water in the soil so a background reading of 300 initially is no longer valid after 6 months.

    Sadly now we have only plants that can withstand irregular watering and that is all (survival of the fittest)

    If someone else can share other ideas please do so! I was thinking about a scale that measures the water intake e.g. when the weight of the plant+pot gets 50grams less => water has evaporated/consumed – bring more. But this approach suffers from drift int he weight sensor … so open for proposals!

    p.s.
    Resistive measurements is out of the game

    1. I think resistive measurements might work, just maybe not on the soil (Works fine for me though, two months running knock on wood).

      My next idea is to make a sensor out of some sort of foam with a nonconductive shell and two electrodes inside. Putting this in the soil you’d get moisture wicking into the foam lowering resistance, but jiggling it would do nothing since the shell is rigid. Roots would hopefully not be able to get into the foam and so would not change anything.

      The sensor would have a slower response time, but that is really a non issue for these applications

      1. gypsum block sensors exist.

        Alternatively, some form of cement can be used to encase a pair of electrodes, and the conductivity of the block will depend on the amount of water it has absorbed.

    2. Drift surely wouldn’t be much of a problem if you reset the “wet” and “dry” weights when the plant gets watered.

      If the ambient temperature is fairly constant, would tracking the soil temperature work?

    3. I have been watering with fixed amount daily. I have reduced the amount to something manageable as I am planning for an extended trip. The plants seem to adjusted to that. That simplifies the problem not having to deal with soil moisture measurement.
      What I am planning to do is to pump water info a plastic container. A electrode is connected to a capacitance touch sensor.. A timer starts the pump each day. As the water reaches the electrode at the high water mark , the capacitance increases and stops the pump.

    4. Doesn’t the voltage converter of the WeMos board drain a lot of power? The last ESP devlopment boards I had all drained a lot of power in ESP deep sleep due to the fact that the voltage regulator was still active…

    5. I think I read here on hackaday once that resistive measurement is possible with carbon rods because they don’t corrode. But I guess there will be the same problems as you discribe: don’t move it, roots, change in conductivity (EC) over time because of use of fertilizers…

      1. Simply sticking carbon rods in the soil doesn’t work because it’s not a standard medium – the soil properties change and affect the measurement. Again, it is common to use blocks of standard material like portland cement or gypsum and measure the conductivity of that material, because it acts as an osmotic barrier against salt and the other things.

        The difficulty is, you don’t get the measure of direct water content, but of osmotic pressure of the water which is what balances the amount actually in the block. You still have to know the soil and its properties to know how much water there is – but from the pressure you do know whether the plant feels it wet or dry, because the roots have the same issue of pulling the water through osmosis.

  4. In some of the 80s electronic kits (something like those gakken electronic blocks), one of the projects was a moisture sensor. I guess the older brother was supposed to assemble a pee alarm for his baby sibling. This project is just as practical.

      1. I was going to say, resistive soil measurement suffers from electrode corrosion by electrolysis – essentially one of them is acting as a sacrificial anode. You might be able to alternate electrodes back-and-forth, taking successive samples with opposite polarities for example, sounds like an easy job for a small microcontroller.
        If it’s plugged in, you may also need to be careful of ground loops / DC bias of the whole system, but that should be less of a problem if you’re genuinely able to run off a battery most of the time.

        1. You could measure resistively with AC. AC can not do electrolysis, but by choosing the right frequency (low enough) capacity will not play a significant role. You just need to place a capacitor in series to the measuring electrode.

          1. It can do electrolysis, but the reactions reverse. The issue is, if you use too high a measuring voltage it develops gases on the surface of the electrodes, which block further current.

      2. Of course, like I said, I do not think those projects were very practical. AC would help, it does help in the LCD displays. But I still don’t think anyone would put a box of gakken blocks in the cradle, even in the crazy as they may seem 80s.

  5. Aloe Vera.
    Hard to kill.
    Water when you remember, they figure it out.
    Easy to maintain, cutting off the dead leaves.
    Multiply crazy fast, cut of the babies and give to your friends / soon to be enemies.

    If you get a burn (soldering, welding, grinding, fire, electricity, etc) snap off a leaf and ooze out the liquid over the burn.
    Will numb the pain, provide a protective cover and result in a far smaller scar or no scar than without.

    1. Unfortunately they are not cat-resistant. The cats chew some leaves off, use them to play with it, chew on it and eat them partially. Then at some point, when only about two leaves remained, they pull the plant out of the pot.

  6. I have a few plants in undersized containers to fit my window silt. I was late by a few hours a couple of times and the plants weren’t too happy but they adapted. They seem to be doing okay with their daily measured amount of water even in the very dry winter. Right now they get their supplement of winter sun light from LED strips. I’ll automate the watering when the pump and other parts arrive.

      1. There was limited depth of the window silt, so I have to use yogurt containers (650-750ml). So there was little soil to hold enough water for more than a day. The plants have decided not to let that limits their growth anyway.

        That cherry tomato plant grew to 3 feet tall before I gave it away.

  7. This is nothing new. Several versions have been for sale on tindie for some time. The problem is the battery life. Even with very long intervals, these sensors only survive for roughly 30 days on a 14500 battery. Wifi technology sucks for this application..

  8. I’m also using a WeMos D1 mini but mine is always plugged in. It’s all programmed using Arduino and it sends me emails directly (no third-party services like Blynk needed).
    I am using a resistive probe but I changed the actual rods with carbon fiber rods from a broken arrow a coworker gave me, no corrosion problems since.
    I have been working on this for some time now, it senses the soil moisture and sends me an email when it needs watering, increasing the frequency of emails as the soil gets more dry (AKA spamming me). It’s a work in progress but seems to be effective as the plant is over a year old now and green as ever…
    My plan is to change the program to micropython soon.

  9. These are a favorite project, along with door-openers and two wheel robots. What few people look into (are you there, Ben Krasnow?) is a simple electrode system that doesn’t go out of calibration and die of corrosion fairly quickly.

  10. The two methods that actually work reliably are radio frequency looking at the direct dielectric loss due to water (2.4GHz is a great start) and neutron absorption methods, which are lethal, but nevertheless very reliable.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.