Skip to content

Latest commit

 

History

History
132 lines (76 loc) · 7.65 KB

README.md

File metadata and controls

132 lines (76 loc) · 7.65 KB

GitHub issues GitHub forks GitHub stars GitHub license

🌱 ESP32GreenhouseTowerDIY 🌱

This repo is dedicated to the DIY ESP32 based automated Aeroponic or Hydroponic Modular Tower Garden 🌵 .

WHAT IS THIS PROJECT

In the height of COVID I wanted to grow my own food indoors. This open source project is a culmination of my own work and many inspirations from the internet to develop an easy, approachable and beginner friendly project for hobbyists.

This project is designed to be modular and affordable. Featuring a vertical tower system with interlocking parts and an adapter to a common 20L/5gallon bucket.

The design also features an optional 3D printable Aeroponics Nozzle for converting the system from hydroponic to aeroponics.

I originally decided to go with an ESP32 using Micropython firmware. While Arduino is perfectly fine, i wanted this project to be approachable to all skill levels, python seemed like the most common first "language". However, I since realized that most people who use this won't be coding themselves and i prefer C++ more than python, so I switched the entire project over and am building a website to flash the boards. Users will not need to download any code themselves. Please stay tuned for the documentation website.

Note: I have added Arduino Core support for the ESP32. This is a work in progress and will is now the main code-base. It simply has more sensor support, a few more features, and it runs faster/consumes less power.

tower garden

tower garden

tower garden

HOW TO ORDER PCBS

PCBS can be ordered from JLCPCB or PCBWay, or made yourself. The PCB files are still in prototype phase and I welcome any development ideas.

Introduction

Purpose: These are instructions to build an open hardware, DIY Vertical Greenhouse Garden.

Expected results: A fully functional and (reasonably) automated vertical tower system.

Minimal parts cost: <$20 for the basic system which consists of a 20L/5gallon (can be smaller - minimum size is 4L/1gallon) humidifier box/water reservoir and submersible pump - about $100. You will also need to purchase the PCB's ~$40, power supply and sensors ~$30. The cost of the parts will vary depending on the size of the tower, and the number of sensors. The cost of 3D printing the tower will be ~$25 or less. The full 1m tower consumes ~2kg of PETG - which is the recommended printing material for outdoor use. The tower can be printed in ABS and/or PETG materials.

Note: The cost of plant nutrients is not taken into account, and is up to you to control.

Goal: The goal of this project was to build a high-efficiency, very low cost direct DIY vertical tower garden for growing small fruits and vegetables.


Warning: The sections below are experimental docs and are subject to change. Please wait for the documentation website to be finished if you want a consistent experience.

How to Setup - Hardware

Setup is very straight forward, thankfully. You will need to purchase a few components before you begin:

Materials for purchase

  1. Raspberrypi - any model
    1. Install the MQTT client included with Home Assistant (install Home Assistant), as this project has full support for Home Assistant (Arduino Core version only currently).
      1. Alternatively, you can install Mosquitto broker to the pi and connect it to your network
  2. 12V submersible water pump
  3. 3m or more of Vinyl tubing with 10mm ID and 13mm OD

How to Setup - Software

  1. Acquire all parts and ESP32 (WROVER and WROOM (S3 versions are supported) have both been tested).
  2. Acquire The remaining sensors and components - assemble

SETUP


Micropython

  1. Plug ESP32 into computer - open your IDE (i used Thonny for this project) Flash the micropython firmware to the esp32
    1. Upload ESP32MicropytyhonLibraries ---> rename to ESP32Micro
    2. Upload boot.py and greenhouse.py to root directory

Arduino Core

  1. Plug ESP32 into computer - navigate to WebSerial
    1. Configure your chosen sensors and features
    2. Press build and upload, and wait for the green light to turn on - it is safe to unplug the ESP32 at that point.

MQTT Broker Configuration and Connection

If you have chosen the mDNS option, you will need to setup mDNS on your network for MQTT Discovery. The mDNS service on the ESP is already configure, if you chose that feature, and should appear on your network as at the <name>.tower.local address.

The MQTT Broker is a free service that allows you to publish and subscribe to MQTT messages. To automate the connection process, this project offers Multi-Cast DNS (mDNS/Zeroconf) to find the broker. For this to work, you must have a broker on your local network, and you must have only 1 MQTT broker within the range of the client, otherwise the client will simply connect to the images broker it finds.

Using a Zeroconf approach we can avoid having to hard code the broker's IP address or hostname into the client device's firmware. Instead we can use DNS-SD and Avahi/Bonjour to discover the server hosting the MQTT broker.

To enable MQTT discovery on the broker, simply install avahi-daemon.

Option One:

If you are using Home Assistant, you can use the MQTT Discovery feature within the firmware, and the MQTT broker will be discovered automatically. Nothing is needed from you for this to work. Simply turn on the ESP32 and have the mDNS feature enabled in the firmware.

You can refer to the ZeroConf Documentation here and here for home assistance for more information and troubleshooting.

If for some reason you are unable to use the MQTT Discovery feature, you can still use the mDNS feature to discover the broker, see Option Two below.

Option Two:

You will need to install the avahi package. For a Raspberry Pi, use the following command:

sudo apt-get install avahi-daemon

For this to work, the MQTT service needs to be advertised. On a Linux host system, Avahi can be configured to do this by including the following in /etc/avahi/services/mqtt.service:

<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
 <name replace-wildcards="yes">MQTT on %h</name>
  <service>
   <type>_mqtt._tcp</type>
   <port>1883</port>
  </service>
</service-group>

Benefits


Challenges and Limitations


Safety Considerations