Invitation/project suggestion: An automated potted plant

Hi,

I’ve been messing with an open source project called Flaura. It’s a smart, self-watering pot for indoor plants (for those of us that kill everything green that enters the house).

It measures the soil moisture, detects the waterlevel. It is also possible to set the watering threshold/desired moisture. It is designed to be self-sustaining with water and power for about 3 months.

There are links to an from the original author as well as thingiverse and Git:

The project has designs for the 3d printed parts and a PCB and a truckload of arduino code. The auther used a free version of something called Blynk to connect an ESP32 for control, but blynk changed their terms and is now quite expensive. I think it is possible to get it working with ESPHome/Home Assistant and make it better and much simpler code-wise by doing so too.

The 3d printed parts also need some work. It is too hard to get a proper seal to make them watertight and the assembly is complicated and time-consuming. I think the cure is to reduce the number of joints by printing as much as possible together.

I am decent with Fusion 360 so I can redesign the 3d parts. I and some of the others I met in GitHub also have a few copies of the PCB’s that we can send to those who would like to join.
None of us are very good with ESPHome-coding, however. Hence this invite:

Does anyone want to join and make the smartest self-watering plant ever?

(and yes, there are other projects out there. The ones I’ve seen have flaws like lacking moisture measurement, using sensors that break down when exposed to water or poor battery management)

—o—

Links:
Intro from the original author of Flaura: Flaura – Automatic, Smart Plant Pot (Self Watering, DIY Project, 3D Printed, Arduino) INTRODUCTION - YouTube
The Author also has assembly instructions etc. in other videos.

Physical parts, Thingiverse: Smart, Self-watering Plant Pot Planter "Flaura" by Martin_McMaker - Thingiverse

Say hi to the others or see the Arduino-code on Git:Is this project dead? · Issue #4 · FlauraPlantPot/Flaura · GitHub

3 Likes

What I can’t find is any list of the electronic bits. But it is certainly promising for esphome.

Oh, there is a zipped spreadsheet on thingiverse. FFS can’t he just write out a list. Talk about open…

There is a very fuzzy circuit diagram on thingiverse, why he can’t publish it on github is anyone’s guess, but I have been peering at it for a while and the GPIO connections seem to be

GPIO Connected to
33 Moisture Meter
23 Pump (thru Mosfet)
0 Action Button
15,25,26, 27,14,13 Water level sensors
32 Battery level

That is as far as I can make out anyway. And matches this Flaura/Flaura_Blynk.ino at 7c205fd3aec07d027c4c11d642c1845d18106db9 · FlauraPlantPot/Flaura · GitHub

There are no complicated components or stuff that ESPhome can’t handle. I think the automations could be handled on esphome, with connection to home assistant for display and setting basic parameters. I am not sure about the logic of the level sensors, but it won’t be too difficult.

The waterlevel sensors are think pretty basic too. It’s just a handful of wires held at a vertical spacing. The lowest is ground. If there’s contact, there is water.

I suggest simplifying it, because it will allow for printing almost the entire pot in one piece, which makes the assembly much easier (I know from experience that it is tricky to get the original design perfectly tight). In that case, the waterlevel sensor will be an “empty-sensor” made by driving two screws up through the bottom and using them as electrodes. If it’s the right screws, they will also last much longer than the wires.

I have spare PCB’s and almost all the tiny bits (mosfets, diodes etc.). If you want a set, let me know.

In terms of the longevity of the wires, I note that the existing code powers the water level wires only for a short time. See the same file I pointed to above, the code starting around line 416. I think this is to to reduce electrolysis. You’d probably want to do that to the screws too.

Perhaps too put the screws a little way up so it is a ‘low’ rather than ‘empty’ sensor - give the user some warning.

Yep, I saw that comment in the code too. But I think the prolonged contact with water alone will kill the wires eventually.

The warning is a good idea, but I would also like the empty sensor to stop the pump from attempting to water the plant any more. I don’t think it likes running dry - not sure. It would also drain the battery if it kept trying to water the plant with air. Perhaps I should go with 3 screws (one ground, one warning and one empty).

1 Like

Yes that would be very helpful thanks. Shall I pm you about cost/postage etc?

Not sure what pm is, but I assume it’s a form of direct message here. In that case, yes, pls do.

The bits I don’t have are these:
Board. The one the author use is famous for beeing crap, so I used this one (which has same pin-layout): https://www.amazon.de/-/en/gp/product/B07RXTSZRC/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&psc=1. It’s good, allegedly, but has very poor documentation.

Battery and pump, pls see the authors remarks about that. They aren’t cheap, so you could skip them until you have something that works.

Moisture sensor: Apparently they are very often faulty and many of the issues are visible if you look closely at the images. So I spend quite a bit of time looking very closely at the images of moisture sensors based on the Flaura authors remarks, and ended up with this one: Capacitive Soil Moisture Sensor Module Not Easy To Corrode Wide Voltage Wire 3.3~5.5v Corrosion Resistant W/ Gravity For Arduino - Sensors - AliExpress
Edit: I have tested it now. It seems reliable. (was: I haven’t tested it yet. I’ll do it shortly and let you know.)

|19|Moisture Meter power on|

1 Like

(post moved so that is a reply to the right post.)

1 Like

Hi! I’m happy to join the project. I already built the plant pot. Yes, it is a hassle to get it waterproof.
I’d like to learn, how to implement in ESPHome but I have 0 experience.

2 Likes

@konig how did the revised 3d print go?

Welcome crabucate :slight_smile:

It looks nice :slight_smile: You will might be happy to learn that my simplified version is on the way out my 3d printer right now. I managed to get it tight and to print the whole thing almost in one piece. The lower part (the base) now prints as one piece to be clued on once the electronics is finished - the rest of the body prints at once. It’s much easier because it doesn’t have to be water-tight. Hoses now cross the walls with connectors so you don’t have to tighten the crossing yourself.

I’ve been working on the code to and gotten the moisture sensor and the pump working. Can you control the pump correctly with the device? Because mine just ran forever whenever I turned on the switch. There’s either a design flaw in the board (but don’t worry - it’s not that hard to fix once you know how) or I did something wrong somewhere.
I’d love to share my code, but if you are still new to installing ESPHome and to home assistant in general. If not, you might want to start there. Let me know.

Not done yet. It takes almost two days to print. I’ve made the first iteration. It generally works (-ish), but there were minor flaws in my design. I have corrected them in the second version that is on the way now. More details in my reply to crabucates post.

I’m very excited about your new design! I played around a bit with the ESP32 with a clean Arduino-Sketch. The button is on Pin0 and the value is 0 when pressed and 1 when not pressed. If I understand the original code right, the button is made for interrupting the pump? I don’t know.

I haven’t made it to the button yet, but I think it’s meant to wake the thing. If it runs out of water, I think it would go to sleep for a really long time since there really isn’t any reason to waste battery staying around. The button is meant to be pressed when you refill it or generally, when you want it to measure and water.

Edit: It doesn’t matter if the button changes the value to 1 or 0. When you configure the board, you get to specify what state should wake it up.

Btw: When you plug it in and power it up with no code to control it, does the pump run?

No, it doesn’t.

My printer just made a mess of the last print. One big pile of thin plastic wires, some of them fused together in big chunks. It even broke the bed level sensor. Oh the joys of 3d printing!

there will be no printing here until I get a spare part for the bed level sensor. If one of you are up for a two days print to see if the latest version is as it should be (I think it might), then let me know and I’ll send you an STL.

Oh shit! I remember being in this situation at least twice. Good old Anet-A8 times.
You can send me the stl and I will give it to my Prusa.