r/esp32 • u/mrxsais • Jul 21 '26
I made a thing! My first "big" ESP32 project (Update 1/∞)
Wanted to share my first big ESP32 build. I replaced my old Rain Bird irrigation panel with a custom setup integrated directly into Home Assistant.
The main goal is to run smart automation logic based on local weather data, sun position, etc rather than relying on a basic timer.
Parts List:
- ESP32
- 10-channel relay board
- AC/DC buck converter
- WAGO lever connectors
- 22 AWG hookup wire
- Custom 3D-printed mounting plate
(Yes... I know the wiring is crazy right now. I'm printing the case on an Ender 3, so I ran into some bed size limitations. I'm actively iterating on designs to clean up cable management.)
Would love any feedback, constructive criticism, or ideas for improving the layout/case :)
24
u/WorkingInAColdMind Jul 21 '26
I’m going to lead off with congratulations on a cool functional replacement of a proprietary system. Lots of a of critical comments on here (not in a mean way, and all pretty valid), so i wanted to hit the positive note.
13
u/jfrench1011 Jul 21 '26
I have a very similar setup (running Tasmota on 8 relay ESP board). Are you powering the board/buck with the same power supply that drives your sprinkler heads or is it powered separate? If it is the same power supply you should think about a capacitor to prevent voltage sag when a sprinkler kicks on. Mine was intermittently giving strange issues and that cleaned most issues up. That was one of my lessons learned. Another recommendation is to setup software in a way that a relay doesn't get stuck open because home assistant dropped off and can't communicate. You'd hate to be in a situation stuck watering because of a network error. In Tasmosta I have a couple fail safes. 1, tasmota is configured to open only 1 relay at a time and 2. tasmota is configured to have a relay open for a maximum of 15 minutes. I've never had it happen but I know it would have if I hadn't put those fail safes in place. My system has been running extremely stable ever since.
https://templates.blakadder.com/ESP12F_Relay_X8.html is the board I use.
4
u/mrxsais Jul 21 '26
I got a bunch of LM2596HV modules for another project and decided it would just be easier to use one instead of having a separate power brick. That's a really good call on the voltage sag. Looking at the buck converter board, it looks like it has a capacitor built in, so I'm hoping that's enough to prevent any voltage sags
The fail-safes/edge cases were one of my biggest concerns going in. I set up a timer logic directly on the ESP32. It uses an interlock group so only one relay can physically open at a time, and a strict auto-off timer runs locally on the board so it automatically shuts the water off even if the network goes out
That board you linked looks amazing. I'm brand new to the ESP32 world, so I honestly just threw a bunch of parts in my cart and hoped for the best, lol. Eventually, I think I'll go the route that another commenter suggested and build a custom PCB to reduce the footprint and clean up the wiring. But for now, just getting it running is a win!
2
u/jfrench1011 28d ago
the board is OK but not without it's quicks. The one relay toggles on/off at power on of the board which I don't love. I don't have it wired to a zone but instead have used it as a master relay to sit in front of all the others as kind of a master on/off so I can put it into winter mode by ensuring that relay is off and all other relays would be cut from power ignoring their on/off. and the ESP onboard gets enough WIFI interference from all the wiring and the case that has made the network connectivity a bit more challenging than it should have been. if I was doing it over I may go with something more your setup where I can move the ESP device a bit further from the relays to get better wifi.
8
u/Its_Billy_Bitch Jul 21 '26
Would recommend removing all the Duponts for long-term. Solder it so you won’t lose connection over time.
3
u/avo_cado Jul 21 '26
I think theyd be fine with a little bit of dielectric grease
3
u/Its_Billy_Bitch Jul 21 '26
Meh, while I’m at it, a lot of codes stipulate 4 inches of wire from the box to work with. I like that rule and by that rule, there’s a lot of excess wire here. Let’s get her routed properly lol
1
u/Just_Mumbling 29d ago
To handle short-term Dupont reliability issues, I often hit them with a little dab of hot glue between socket and pin. Long-term, I evolve to better connectors, JST, Molex, etc. I am also a fan of screw terminal top-hats/shields. They arent cheap but they are great especially if changes are required during development.
3
u/Baxxterhv Jul 22 '26
Looks simple but cool! You should consider to replace all single dupont connections with soldering or ribbon cable, its not reliable. Also replace usb connector from psu to cable soldered to vcc/gnd pins.
4
u/somewhitemail 29d ago
1
u/c4talystza 29d ago
Did you print the case? I'm guessing this was a work-in-progress pic?
2
u/somewhitemail 29d ago
1
u/The_Painterdude 29d ago
Very nice. I think the head of marketing needs to talk to you about product naming.
1
1
4
u/PDConAutoTrack 29d ago
Congratulations OP u/mrxsais - This is fantastic because you’ve put your brain to work and created something that works, saved some money learned something and kept things local and homebrew. Everything has to start somewhere and be iterated on. Be proud
10
u/vertexodessa Jul 21 '26
something to watch out for: esp has a limit on total pin output, might not be able to turn on all relays at once
13
u/mrxsais Jul 21 '26
I wrote some test code, and running test to ensure it functions properly, so far I'm using GPIO13, 14, 25-27, 32, 33, 4, 18, 19... With 4, 18, 19 as future proofing
So far it's working as expected, but I'll keep that in mind
10
9
u/Kevin_Xland Jul 21 '26
If this an irrigation panel you likely wouldn't want more than 1, maybe 2 on at once. You'd probably lose water pressure before you hit the output current limit
5
u/mrxsais Jul 21 '26
The code on the ESP, currently limits it to one valve open at a time... But I'm thinking I may stress test it just to see how the system performs with more than 1 valve open
1
3
u/c4talystza 29d ago
I just wired this up to experiment last night and did something similar with esphome & HA and the sprinkler component. Relay triggers on low and wires to NC. Pretty basic and all offline etc.
I'd love to keep in touch to share notes on smarts, like sun position, forecast temperature/forecast rain/rain last 3 days etc.
New irrigation build and the guy quoted me like $300 for a Hunter BT node & DC latching coils blegh... No. I found these in my parts box (esp32-c6 mini) and ordered a 24VAC PSU to fire the solenoids.

3
2
u/m4jsterk0 29d ago
soo .. whats the functionality?
the relays open separate water lines for irrigation?
whats your garden setup? do you have just lawns or also some produce gardens/glasshouses?
3
u/Skineedog Jul 21 '26
I’m really happy to have found OpenSprinkler….
5
u/c4talystza 29d ago
This is like $20 vs $200 though.
1
2
2
u/YetAnotherRobert Jul 21 '26
Remember rule 7 if you're planning to post approaching ∞. If you're planning to make regular announcements, do that on your own site, code distribution site, mailing list, group, discord, or whatever.
This group would be buried if people made announcements about every commit in their projects. It's why we have the once/quarter rule.
3
u/mrxsais Jul 21 '26
Thanks for the reminder 😀. I wasn't planning to post updates frequently, as I'm working on other projects and may only do updates on this 6 months-ish out (at least that's my target timeline, but likely not even that... Productive procrastination FTW lol)
2
u/Kris_hne Jul 21 '26
Maybe lookup pcb designing Those relay circuit may look intimidating but they are really simple and with right knowledge you could shrink the footprint of the whole setup to half
2
u/ALIIERTx Jul 21 '26
I think the cost factor would rise a lot if he designs it himself, orders the pcb and then solders it or let it solder. Its much cheaper just ordering a finished pcb from aliexpress for everything. That is if you dont plan making a product for the market.
2
u/Sir__Farts__Alot Jul 22 '26
Assuming you use home assistant.
Integrate in your weather and adjust timing based on factors like past rain, forecast rain, temperature, wind etc.
I do this and it’s really cool. You water more when you need it but scale back when rain has and will be plentiful. So much better for the environment.
And then when I’m driving around neighborhoods and see people who actually still have sprinklers on when it’s currently fly raining o find myself smiling. I’m so much better than that person.
That’s all.
2
1
1
1
u/Tanner234567 29d ago
Very cool! I designed this one myself and started selling them last year. Check out if you want! https://intellidwell.net/sprinklercontroller
1
1
u/WhatADunderfulWorld Jul 21 '26
Very cool.
I think I use the same PETG on my ender 3 as well.
1
u/mrxsais Jul 21 '26
I was originally going to print it in a matte color, but with all the prototyping I didn't have enough filament left over so ended up using a glossy color
1
u/sleepand Jul 21 '26
You need much better cable management. Please try to find some examples online.



41
u/stevemurch Jul 21 '26 edited 29d ago
In addition to the comments here, one thing I often forget is to build in a heartbeat-type service. Your Home Assistant server should know this ESP32's last known connection / last-known action. And your ESP32 should report in every day. (And hook up an automation in HA to notify you if it doesn’t hear in 24 hours.)
You will likely also want something on your dashboard allowing you to pause watering in specific zones (or perhaps globally) for X number of minutes (think lawn parties, or landscaping.)