Smart Garden

Gardening Made Smarter, Easier, and Greener!

Similar projects worth following
The Smart Garden allows control of up to 4 irrigation valves and/or water pumps, supporting both AC and DC voltages. This versatility eliminates the need for additional power sources, as the board can be powered directly from 24VAC supplies commonly found in irrigation systems.

One of the key advantages of the Smart Garden lies in its seamless integration with various software platforms. By uploading the ESPHome firmware on the Smart Garden, users can effortlessly connect the board to their Home Assistant setup. This way you can monitor soil moisture via the Smart Plant, and control the irrigation of certain plants only when you need it!

The inception of the Smart Garden project occurred in the aftermath of the summer of 2020, when the unfortunate demise of my balcony plants due to issues with the existing time-based irrigation system compelled me to seek a better solution. Subsequently, I transitioned to a generic Alexa-compatible board with four relays and an external electro-valve to manage water flow.

The cabinet where I keep all the watering system

While it served its purpose, this setup posed challenges. To consolidate power from a 24VAC supply, I had to source a specific AC-to-DC step-down module for the electronics and diligently connect wires for each relay. Additionally, I incorporated a capacitor in parallel with the electro-valve to minimize electrical noise generated by the solenoid and mitigate inrush current, thereby extending the valve's lifespan.

Ultimately, I found myself grappling with a convoluted web of wires within a sealed box, wary of reopening it. Hence, by the conclusion of the summer of 2022, I resolved to devise an all-in-one board solution: the Smart Garden board.

Smart Garden V1R2

The project commenced with an exploration of various microcontrollers, with the ESP32 emerging as the frontrunner due to its remarkable capabilities and widespread adoption in the maker community. Capitalizing on the ESP32's versatility and power, the Smart Garden board materialized.

Initial efforts focused on delivering robust control for standard 24VAC solenoid valves, as well as accommodating DC-driven irrigation valves and water pumps. By integrating four channels with support for both AC and DC voltages, the Smart Garden offered the flexible irrigation system design I sought. This ensured users could seamlessly adapt the board to their existing garden infrastructure, making it a cost-effective upgrade option.

During the prototype stage, programming initially relied on a serial pinhead (VCC, Tx, Rx & GND). However, to streamline the reprogramming process, for the second revision of the board, I incorporated a CP210x IC with USB-C port compatibility, enhancing simplicity and user-friendliness. Additionally, the wireless Over-the-Air (OTA) firmware update feature eliminated the need for physical connections during updates.

To augment integration possibilities, the Smart Garden embraced the popular ESPHome firmware. This facilitated a seamless connection with Home Assistant setups, enabling convenient monitoring and automation of the garden irrigation system.

This integration with Home Assistant, along with my complementary project Smart Plant  (which monitors soil moisture and other parameters), proved invaluable for precise irrigation control of distinct plant groups based on their individual needs. Water conservation and prevention of overwatering became achievable goals. Moreover, leveraging accurate weather forecasts within the Home Assistant setup enabled the implementation of diverse automation strategies.

Manual triggering of the watering system

The inclusion of a set of 8 I/O pins for reading pushbuttons or turning on the pushbuttons LED rings proved quite useful for triggering manually some watering routines. 

Finally, I added an I2C port and a serial port in order to expand the board's capabilities, empowering users to incorporate external sensors and control additional boards. This versatility unlocked a world of possibilities, ranging from weather sensor integration to managing upcoming expansion boards with increased channel support.

  • From PCB to PCB Assembly with JLCPCB

    Jon08/28/2023 at 18:12 0 comments

    As part of a recent partnership with JLCPCB, an excellent PCBs (and PCB Assembly) manufacturing service that has manufactured the previous versions of the Smart Garden, I would like to share my personal experience and the seamless process of ordering PCBs with them.

    1. Generate the Gerbers, BOM, and PnP files

    2. Upload the Gerbers on their online platform and select the options you want: soldermask color, thickness, surface finishing... quite a lot of options and a very low starting price of just $2 for 5 pieces under 100x100mm!

    3. If your project requires the assembly of components, here is where JLCPCB really stands out. Their internal access to thousands of components makes it very easy.

    My recommendation for lowering your expenses and optimizing your design is to take into account their stock (doesn't need to be 100% available since they can backorder components for you) since your preliminary design phase. This way you can estimate the costs of the components and get the datasheet and footprints directly from them.

    Also, in order to make the BOM export easier, if you use their ULP and for each component, you can add (in EAGLE) an attribute named LCSC with the value of the JLCPCB part #, there will be no confusion between components at the moment of ordering the PCBA. You can get to know more about this process in their tutorial

    4. Once you have finished with the selection of PCB features, you can select, on the PCB assembly process whether you need an Economic or a Standard process. Unless you need to mount specific components (like certain ESP32 modules) that might require particular reflow temperature curves, the Economic option is the way.

    5. Uploading the BOM and PnP, and verifying that all the components correspond with your intended ones, is very fast and easy. 

    In addition, you will be able to see a rendered image with the components in each place! 

    6. Before entering into production, their team will contact you in case they have questions regarding final positioning or polarities to avoid surprises and in a few days your order will depart from their facilities to you!

    Since they work with worldwide shipping companies, in just a few days you will receive their blue box containing the boards. They come exceptionally well-packed and protected.

View project log

Enjoy this project?



Jason wrote 06/08/2023 at 21:13 point

I have done the same but just used an off the shelf Kincony board but there are many other 4 channel relay boards out there with wide ranging power supplies.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates