🌿 ESPlanty | Self-watering Solar Powered Plant | No plumbing & no powerpoints | # Irrigation , # Deep Sleep , # Battery

Do you have any electrical schematic and materials list here ? I am trying to create the same thing for my dying rose plants. Would be helpful.

1 Like

Afraid not. I can do a materials list easy enough.

Schematic I can have a go at but will have to put aside some time.

I tried many schematics but end up burning something. Would be nice if I have them. Thank you

1 Like

Materials List
1st pass at materials list. May not be complete yet. I included a few extra links to things like soldering equipment and crimping kit I have.

Component Notes Link
Single 18650 Battery Holder Cheap probably ok. Ali Express
3.7V 18650 Battery Buy a good one locally. Get like a 3000-36000mAH one. Get a protected one. Do a little research about local buying options.
Solar Panel (5V) Make sure you get the right voltage. I bought from this Ali Store
Sunflower: Solar Power Manager 5V Investigate your buying options. Core Electronics
Pump Do a little research on pumps and buy a slightly better one Ali Express
VL53L0X Ali Express
BH1750 Ali Express
L298n If you want pump flow control via PWM, you should get the full size version rather than the mini. Ali Express
2 x Resistors (300kΩ) More detail here.
ESP32 LILYGOĀ® TTGO T7 Mini32 V1.5 Get a good ESP32 for this project. Get one optimised for low energy / deep sleep with battery connections. Tried other boards but idel current too high. Ali Express
Capacitive soil moisture sensor Water proofed with nail polish and hot glue. These are notoriously short lived so read up on them. Ali Express
Treated Pine Sleepers I made my ā€œcut planā€ and got Bunnings to cut to size. Bunnings
Decking Screws For fixing the base box together Bunnings
Castors To roll your plant around
Water Jerry Can To use as water tank. Bunnings
Glass food storage container with Plastic lid Consider your solar panel size when sizing this. KMart , IKEA
Flexible Silicone wire Ali Express
Crimping Tool & Kit …. …
Soldering equipment Ali Express
Very short usb cable Connect ESP32 and Solar Power Manager
Tubing Check / confirm the Internal diameter for compatibility with pump. Ali Express
3d printer To print irrigation rings plus other bits and bobs like ā€œcomponent mount plateā€.
Hot Glue Gun For mounting components Ali Express
1 Like

I’ve added a first cut materials list above.
Not sure when I’ll get to doing a wiring diagram. Started one but I suck at them and struggle.

1 Like

Wiring Diagram

I think this is right.

A few points:

  1. Sensor power is supplied / managed via the power manager (not the esp32)
  2. I’m not sure if the way all my grounds are linked is optimal, but it seems to work.
  3. I’d suggest getting everthing except for the sensors connected and working first (including the voltage divider), and then add the sensors / pump one by one and test that they are working.
  4. Set a short deep sleep cycle of like 30 sec on 30 sec off etc during testing.
  5. I2C can be fussy and not keen on long wires. Solder at least on the sensor sides (dupont on other end ok? ).

Even the tiniest details would be helpful as I am a commerce student and hobbyist electronics and this would be my first automated project.

1 Like

This is probably ā€œquite an advanced 1st projectā€.

The build isn’t detailed step by step etc.

So you would need to be patient and persistent to work through it.

Wiring diagram is above.

1 Like

Thank you very much.

1 Like

It would be kickass if there was a google doc where everyone building this collaborately could document the step by step. Why hasn’t anyone done this yet?

1 Like

You can be the first;) It’s not done because no-one has done it;)

Some of my projects where I don’t think there would be too much interest I tend to lag a bit on the detailed documentation and just do it a bit more ā€œon demandā€.

Documentation contributions welcome though.

Sometimes it’s worth just dumping stuff to help close the gaps on a thread like this and then that can help build the how-to. Like I did that kind of thing over here.

Hey there, buddy!

I just had to drop you a line to express my immense gratitude for sharing this project—it’s like stumbling upon a hidden gem in a digital treasure trove! Seriously, it’s been an absolute game-changer for me in getting to grips with ESPHome. :star2:

Your coding finesse has me in awe, my friend. I’m diving deep into your code, uncovering new approaches, and soaking up knowledge like a sponge. It’s like a thrilling adventure, and your project is the map leading me to programming enlightenment! :rocket::bulb:

Thanks a million for your generosity. Let’s keep this coding journey rolling! :raised_hands:

1 Like

Thanks for the kind words.

I assure you it’s really more of an assembly of other people’s work on the forums which I learnt and put together one brick at a time, rather than great programming skills on my part.

I’ve been contemplating which of my deep projects I can use your new trick on BTW;) There’s always more to learn…

Hey there!

Don’t sell yourself short, buddy! Researching, understanding, assembling, and creating something new is commendable. Incorporating the knowledge and reasoning of others into our own is a very dignified way to learn and grow. I’m sure your ability to gather and apply others’ ideas is an impressive skill in itself.

I want to thank you again for sharing this project with us. It’s shedding light on many aspects that were previously elusive to me, and I’m thrilled to see how I can apply these new insights to my own projects. Your contribution is truly inspiring and valuable to me.

Thanks again, and let’s keep in touch!

Big hugs! :hugs::star2:

1 Like

Hi there. I got the esp32 with battery and also wanted to monitor the battery status. I am using the battery code and noticed the update_interval is set to never. Is there something else I need to add because the battery voltage and percent stays unknown. If I set the interval to some seconds, it displays some values.

You can set it to some value which works for you.
I update mine ā€œmanuallyā€ from elsewhere in the code.

Hey, guys! :wave:

So, I did manage to implement a system that measures and reports the battery level of my ESP32 devices to Home Assistant. :bar_chart: But here’s the catch: after testing it, I’ve had to discard it. Why? Because even though I have ESP32 devices in deep sleep mode most of the day (only waking up for a couple of seconds twice a day), the battery consumption was still way too high for my projects. :battery:

I mean, the idea was cool, but the battery drain wasn’t acceptable for my needs. So, for now, I’m putting this on hold until I can test ESP devices with Zigbee connectivity, which I hope will be more efficient on battery life. :zap:

The downside? Zigbee devices are still a bit on the expensive side for my current projects. :money_with_wings: So, yeah, I’ll have to wait a bit to test them properly.

As for the battery monitoring code I created? I’ll try to rescue it, but honestly, I think it’s gonna be a tough one. :sweat_smile: Plus, the code was also tied to some hardware changes in the devices’ circuits. So, yeah, not super easy to revive it without a bit more work.

Just wanted to share my experience in case anyone else is facing the same issue. :sunglasses:

1 Like

I’ve recently read another thread which concluded that while the ESP32 chip uses extremely low power in deep sleep, the rest of the circuitry on a dev board may still be consuming significant power - even things like the power indicator LED.

As adafruit_support_mike said in this thread, The main trick of solar power is deciding how much overspec you need.

If a panel is rated for 1W @ 5V, that’s close to its maximum output under ideal conditions: maximum illumination, no obstructions, panel directly facing the sun. In practice it’s normal to assume the panel’s real output will be about half that. Then you lose about 40% of power if the panel is just pointing straight up instead of being on a solar tracker. Finally, you have to account for things like cloud cover and nighttime.

As a rule of thumb, a panel rated for 10x the nominal load is a good place to start. That will probably give you enough power to run the circuit and accumulate stored charge in the battery.

The size of your battery is a tradeoff between lifespan and other concerns like cost, size, and weight. More charge life is usually good, but is subject to diminishing returns. You might want to bump that up if you live in an area that has long stretches of bad weather:

Hey @donburch888 :star2:

Thank you so much for sharing this detailed info! :pray: The points you mentioned about the ā€œhiddenā€ power consumption of dev boards (even the indicator LED, wow!) and the realistic solar panel calculations blew my mind :eyes:. The advice about sizing panels at 10x the nominal load and factoring in battery capacity based on local weather are golden takeaways.

Even though I’ve paused the project for now (:construction:), I’ll save this as VIP material for when I revisit it with Zigbee devices or optimize the circuit. Your ā€œsolar mathā€ breakdown will save the day in the future! :sunny::battery:

Cheers, and thanks again for taking the time to explain all this! :rocket::sparkles:

Thank you @Mahko_Mahko for your power wiring diagram (confirmed the next step I was about to take), your code, and your observations. I expect that you have moved on to other projects … but wondering if my own experiences might trigger memories and comments or suggestions from your own experience…

My own hobby greenhouse project has grown from just reporting temperature and humidity. I now have 3 temperature sensors (outdoor, inside greenhouse, and in the controller box (which includes the Li-Po battery), 3 power sensors (being replaced with an INA3221), rain gauge and solar panel outside the greenhouse, a water mister module requiring water valve solenoid and water flow meter, and several soil moisture sensors.

I am still bench testing as I wait for more components to arrive; and looking at some of the more advanced ESPHome programming, like deep sleep.

Power

The power module has since become a bigger project that the rest of it combined :roll_eyes:. I quickly realised the DFRobot Solar Power ā€œManagerā€ 5V could so easily have added two resistors to provide the battery voltage - as you did - yet they chose not to :angry:. It is left to the user to detect and manage over-voltage and under-voltage conditions before the battery just stops (those same two resistors again), detect battery overheating, and to manage returning to operation when the battery has sufficiently recharged.

sensor updating

My initial testing had the update_interval at 5 minutes, and they all seemed to be constantly reporting. That’s fine on the testbench with mains power.

I set all sensors to the same update_interval, expecting them to all update one after another, then a delay until update_interval before they all report again …
When I increased to a 30 minute update_interval the various sensor updates are spread over 13 minutes (with intervals of 3-5 minutes between some of them) then a 17 minute pause before reporting starts again … so it seems ESPHome is spreading the work out.

When in production I think hourly reporting (day and night) will be plenty - but I wonder if the reporting will spread out further. 30 minutes of deep sleep per hour would help - but not as much as I would like. I guess this is the reason you changed to reporting in your on_boot: routine (so you can go to deep sleep soonest).

I tried your technique of component.update - but got an error for my sensors, so more research required.

Deep sleep

I’m just starting with deep sleep. I note that your ESPlanty code comments that

#Auto deep sleep shouldn’t actually get used if data updates are happening properly (should sleep sooner).

Which sounds ideal … but not the method the ESPHome documentation describes :frowning:.
The documentation gives an example of awake only 10 seconds per 10 minutes, and I wonder if this is a realistic run duration. What happens if it takes more than 10 seconds to update all the sensors ? To get around this they have added different times for different wakeup reasons - which again assumes/requires that all processing has been done in the time allocated.

After a couple of weeks fiddling with deep sleep on my ESP32-S3, I am still trying to figure it out. On_boot and on_shutdown don’t get reported to the HA ESPHome Builders log (presumably because wi-fi is not active then), but I have found that actions in these sections are not consistently performed.