Your Plants Can Take Care Of Themselves Now

One of [Sasa]’s life goals is to be able to sit back in his home and watch as robots perform all of his work for him. In order to work towards this goal, he has decided to start with some home automation which will take care of all of his house plants for him. This project is built from the ground up, too, and is the first part of a series of videos which will outline the construction of a complete, open-source plant care machine.

The first video starts with the sensors for the plants. [Sasa] decided to go with a completely custom module based on the STM32 microcontroller since commercial offerings had poor communications designs and other flaws. The small board is designed to be placed in the soil, and has sensors for soil moisture as well as other sensors for amount of light available and the ambient temperature. The improvements over the commercial modules include communication over I2C, allowing a large number of modules to communicate over a minimum of wires and be arranged in any way needed.

For this build everything is open-source and available on [Sasa]’s GitHub page, including PCB layouts and code for the microcontrollers. We’re looking forward to the rest of the videos where he plans to lay out the central unit for handling all of these sensors, and a custom dashboard for controlling them as well. Perhaps there will also be an option for adding a way to physically listen to the plants communicate their needs as well.

41 thoughts on “Your Plants Can Take Care Of Themselves Now

  1. Stopped the video within 30s because of the annoying background tune.
    Sigh.
    Still wish you lots of fun with your progress.

    Still curious though:
    Have you considered building plant water sensors based on weight?
    It will have to be adjusted every now and then as the plant grows (so you can monitor / log that too) but it won’t rot away your sensors, as moisture sensors usually do (Especially when DC current is used).
    Small Loadcells are quite cheap and with interface boards such as HX711 easy to interface with a uC.
    Generic ADC’s with PGA such as ADS1115 may have lower resolution, but better stability,but I have not characterized them yet. Maybe it even has a better usable resolution. HX711 spits out lots of random lsb’s.

    1. I like the idea. Even simpler may be using a springy, compressible sheet (foam) between chargeable plates and using a similar time based capacitance measurement as the cave pearl project uses to measure temperature. Ofc, temperature variations would affect the spring deflection and constant but this is just kicking off the conversation.

    2. Plants grow, both above the soil, and below. Different plants, grow at different rates. House plants are usually selected for slow-growth. Weight would only measure evaporated water, not what the plant actually uses. Some people have house cats, who occasionally use the plants for toilets…

      Different plants, have specific soil drainage requirements. Some don’t do well in soggy pots, roots rot away. Knowing the actual moisture in the soil, is key to success.

      Soil sensor rot, mostly when power is applied, electrolysis… They don’t need to be powered 24/7, only when you need to take a reading. Most house plants don’t need daily care, or watering. Most can go a week, or more. Really depends on what kind of plants you are growing. Decorative house plants are slow-growth, minimal care. They don’t need constant monitoring, or attention. Of course, that can change, depending on where you place them, and environmental conditions. It can get pretty hot, in a window sill. Areas with a lot of airflow (vents), can cause evaporation, at a higher rate. Humidity can also be a factor. House plants aren’t really that difficult to care for, if you pick and place them correctly. Watering, could be just a timer.

      1. That’s very informative and constructive comment Harvey! Thank you!
        To be honest, the plants that I have are small potted plants, and they basically require sunlight and to be watered occasionally. The latter I forget way to often and then lose “husband” points as a result… :)

      2. Plant’s growth can be seen by looking at long term changes in weight. Water contents should be a +/- change would decrease over short term. Abrupt changes in weight (i.e. over minutes) would be from your cat chewing off brances or dropping toy in pot etc.

        >Weight would only measure evaporated water, not what the plant actually uses.
        Water that the plant actually uses would increase the plant’s weight anyway. i.e. growth. A lot of water usage is losses due to evaporation as a mean of transportation. If plant needs more water for growth/maintance that it cannot get from roots e.g. hot and dry weather, it can shutoff the evaporation by closing its stomata.

        I use timer for watering my plants. People use timers for their lawns. :P

  2. Capacitance measurements with soil are all over the place. You have to calibrate for soil types, recalibrate after you feed them… plants that need watering every couple days work well because the capacitance swings far enough, but things that only get watered once a week or less will show high and low readings over that time that make it hard to prevent overwatering.
    I wanted to try TDR, but maybe load sensors would make a lower cost substitute…

    1. I can confirm that too. I have seen soil where soaking wet barely reads 10-15% and dry is 0. And soil where dry is 80% and wet is 85%, but then when you add the temperature which causes the sensor to fluctuate a few % you get a pretty useless sensor for that soil. (yes, i changed sensors around, it’s not the sensor, it’s the soil)

      On top of that they are very local. If you are watering with a small pump and hose it’s possible to get only part of the pot wet and not the rest. Depending on where the sensor is placed, you either think you did a good job or not.

      I think they are the best cheap and easy alternative, but they are far from good, i would say not even good enough in some cases.

      1. Maybe use another gpio connected to dry soil (in a spot that can’t get wet), and compare the two readings. Like those proximity sensors do to detect ambient light vs your face near the phone.

        1. That’s actually a neat idea to have a reference point!
          For me, I’m not looking for an “absolute” soil moisture level. Just having two or three thresholds (ie. dry, moist, wet) would be enough to let me know when I should add more water.

    2. I wonder if wrapping aluminum tape around the pot and putting an insulated rod in the middle would give a better average. With both electrodes on PCB, the sensor is necessarily very local and also sensitive to how tightly the soil is compacted against the PCB.

      1. Initially, I wonder how much voltage you’d need to get the field across the gap. But I’m thinking of like 10 to 30 gallon pots.. might be approachable to try it on 2L pots.
        Is there a reason for aluminum tape as a go to? Just handy that it conducts and sticks? Or is there something else that makes it particularly useful?

  3. i’m not a very ambitious container gardener, almost everything in my greenhouse tolerates a weekly watering. everything else in pots, like the jade or the aloe, you can tell at a glance if it needs water or not…i just look at it when i’m watering its neighbors every week.

    this has the downside that if it’s a sunny week, the soil will dry out faster and be pretty dry by the end of the week. if it’s cloudy, there may be barely any evaporation in the greenhouse. in fact, if there’s 2 or 3 cloudy weeks in a row i will stop watering. i figure this is fine, because most plants deal with this kind of scenario in nature as well. occasionally drying all the way out, or spending a couple weeks waterlogged, is a normal thing.

    my point is, i don’t think this actually saves you any effort. what this gives you is more control, enabling a higher quality growth environment. if you actually care about yields or if you’re growing particularly sensitive plants then it could be a big plus. but you’ll wind up spending a lot more effort than someone who just goes into the greenhouse every saturday morning and sprays em all down whether they need it or not.

    just nitpicking the difference between control and convenience. :)

    1. That’s a 100% valid point of view. I’m going to spend a lot of time and money automating something that takes me 5min a week and can do it with a calendar reminder. :D

      But at the end of the day, I quite enjoy doing this. And if just one person finds this educational, useful or helps them in any way, then all of this has definitely been worth it, at least from my point of view. :)

    2. [Sorry, accidentally clicked report -.-]

      I’m building just such a system simply so that I can leave and go on holiday for more than a week or two without having to worry about my plants or organizing someone to water them for me.

      1. Exactly!!

        I “know a guy”… let’s keep him anonymous; Last year his wife went away for couple of weeks and asked him to water the plants. Well needles to say, when she came back she was pissed at me, ughm sorry, I mean at this anonymous guy because almost all plants were dead or super dried. :D

    3. “occasionally drying all the way out, or spending a couple weeks waterlogged, is a normal thing.”

      It totally is for many plants. Still, if you want to grow food from the plants, you want steady and good watering …
      (but thats not the main topic here)

  4. How well does it keep calibration? Does it get corroded from the sides, like the capacitative sensors you find online (the ones you showed in the video) or is it insulated? Can’t really tell well from the video but it looks like it’s insulated. You should consider finding a way of potting the top components, as it will be exposed to air and water.

    1. I plan on calibrating these units but also sending raw and estimated values to the central server. This way I can calibrate each individual unit, but also have the option to do any online calibration remotely on the server.

      There is no exposed copper that goes into the ground, so I hope it will be fairly well insulated and that it will not corrode. You can also check the design or gerbers if you are looking for something in particular.
      The components on the top are going to sit above the soil and should never have a direct contact with soil or water. You could also spray the components with some coating to protect from humidity. I’m going to give them a go without any coating and see how it goes. :)

      1. You should spray it with some coating. Depending on the epoxy resin used for the board, it may soak up water from the sides and leach chemicals into the soil.

        The difficulty in calibrating these type of sensors is

        a) soil density: how much water CAN fit in the gaps between particles. This keeps changing as the plant pushes its roots through the soil, and with erosion and packing from watering it.

        b) soil conductivity: dissolved ions from the soil make the capacitor that you’re measuring “leaky” which throws off your calculations. This also changes every time you water the plant, and as the soil dries.

        c) The water retaining properties of your soil: also known as the pF or the water retention curve. The point at which you should water the plant, and what is too much water, does not depend on the volumetric water content, but how tightly the water binds to the soil. The volumetric water content is not the same as the available water volume for the plant.

        https://en.wikipedia.org/wiki/Water_retention_curve

        1. In commercial soil measuring systems, these factors are handled by a whole bunch of multi-variable empirical correction curves for soil type, density, temperature, conductivity, etc. so you pick from a long list of options what most resembles your situation, so it can correct and convert your volumetric water content measurement to an estimate of water availability.

          It is not possible to “calibrate” the soil moisture sensor as such. You can only calibrate it WITH the soil you’re measuring as a system, or take a good guess and trust that you’re close enough for all intents and purposes.

          Also mind that the sensor doesn’t get all wrapped up in the plant’s roots, because that makes the readings go nuts.

          1. Well, it reveals the threshold of what a person would call dry and wet.

            Finding the upper and lower thresholds is trivial though. You just pour in enough water that it drips through, and then let it dry until the plant starts to wilt. What’s more difficult is figuring out the middle bit, so you can predict that the plant needs watering in X hours, or requires Y milliliters of water to reach saturation.

          2. One of the things I have tried is actually placing the pot in a larger container. I water it by filling the larger container with say 1/2″ worth of water which means that only the bottom 1/2″ of the soil will get saturated completely. The soil above it will get some water by capillary action and it’ll get replenish as the plant draws water. The water level of the larger container can be seen very easily.

            I have tried this with a plant in a 500ml yogurt container. It sucks up 1/4 cup of water completely in 10-20 minutes. The top soil is kept dry and keeps the molds away (which is why I tried). At some point I transplanted the plant to a larger container. I found the plant has grew roots that loop around the base of container and that explains how the water was drained so quickly.

  5. Wow! Thanks Bryan and Hackaday for featuring this! I really appreciate it and thanks everyone for your great comments and awesome suggestions! :)

    As you can imagine, getting this project to the finish line will take time, and on top of that the customer (read: wife) has already changed the requirements couple of times. So this will be fun series. :D

    1. Buy ABB robot or even better build your own to water the plants, repot them and change soil, harvest fruit, put it in blender and feed it to us… Then plug yourself into the Matrix and live happily ever after while your robot takes care of you like a… plant… Wait, stop!!

  6. If the capacitive change in a circuit can be linked to the frequency of an oscillator that modulates the permeability of a water source then you have an analogue solution to plant watering, add solar cell and super capacitor for power and the only thing you may need to deal with is mineralisation of your pipes, but that is almost always an issue eventually no matter what is controlling the behaviour of your plumbing. No not your personal plumbing I mean the one for the plant watering, then again most men after the age of 50 do have a much higher risk of a mineralisation problems with their plumbing too, kidney stones…

    1. Great point! A long long ago, I did build a commercial high end plant monitoring system for a customer, so I know there are a LOT of bells and whistles I could’ve added to this build. :)
      But at the same time this is a DIY version with goal of being affordable and potentially better solution (for some users/use-cases) than what is available on eBay/AliExpress.
      If someone has ~$1500 to burn on $50 worth of potted plants, then I doubt they will look for a “DIY budget solution”. :D

  7. How about the micronutrients? See the work stemming from Dr Carey Reams. The “Science in Agriculture” by Arden Andersen for a good read on the topic. You would need a conductivity sensor for the soil, then somehow get a sap pH & Brix to deduce Cation or Anion. Maybe a NIR sensor, though it’s not enough for an element to be present, it must be a salty/solvable form usable by the plant and it’s microbiome.

    I’m also thinking about soil food web machine vision under a microscope….

    1. Soil conductivity would be a very useful parameter for a number of reasons but in many soils it is controlled by the common ions, some of which are macronutrients, and the effects of micronutrients will hardly be noticeable. Conductivity is always an important parameter because it relates so closely to osmotic pressure and thus plant transpiration.

      I’ve had ideas about very simple ways to accurately monitor conductivity for a while, which I might get around to implementing this year – unless a real expert like Sasa would like to take it on!

  8. Congratulations Sasa. I love this project.

    The accurate, low-cost measurement of soil moisture remains a Holy Grail since it’s a key parameter for so many purposes. It’s particularly important for our battle to get carbon out of the atmosphere and into the soil – our single biggest potential carbon sink.

    Capacitance measurements rank fourth on the list of methods by accuracy and a plot of (potential) accuracy against cost puts them way out on their own.

    As others have noted here you need to encapsulate the boards well – but the layer must be thin to maintain capacitive contact. I’m thinking of dipping in epoxy but others may have better ideas.

    Calibration is essential (and the soil must be largely stone free and the sensor must have no air-gaps in contact) but that’s not hard using a simple weighing log to plot capacitance against water content.

Leave a Reply to hutzlibuCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

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