Skip to content

LucidEye/Tasmota-Hydroponics-Controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌱 Tasmota Hydroponics Controller (THC) 🌱

An ESP32 running Tasmota IoT firmware with two Berry scripts that add user-friendly environmental control automation for small home hydroponics systems or grow tents.

🌡️ Uses a temp/humidity sensor and 4-channel relay board to control grow lights, water pump, a humidifier for VPD control, and PWM ventilation fans via a built-in web UI.

🛜 Requires a WiFi connection for Web-UI setup and active internet connection for NTP-sync or else daily timers and scheduling will not function correctly.

모 This controller is designed to operate completely in stand-alone mode and be accessed via it's Web-Ui, but it can also be integrated into a home automation system such as Home Assistant or NodeRed for additional monitoring, data logging, and remote control.


What It Does

  • 💡 Lighting timer — A "spanning timer" schedules grow lights with a daily Start and End time and displays the on/off ratio. (e.g. Start- 5:00am End- 11:00pm - 18/6). When the Lighting controller is enabled, a keep-alive check prevents lights from accidentally being turned off. Vice versa for when the lights are supposed to be off. This is peace-of-mind for photo-period growers.

  • 💦 Watering timer — This is also a "spanning timer" with a daily Start and End time. Within that time window you can set watering intervals in minutes and watering duration per interval in seconds (e.g. Between 5:00 am and 11:00 pm water every 120 minutes for 180 seconds - or 3 minutes every 2 hours) This offers a very flexible watering scheduler with a very simple setup interface.

  • 🌿 VPD control — calculates Vapor Pressure Deficit based on temperature, humidity, and altitude for best accuracy. Controls the humidifier to hit a target kPa set-point. VPD is used to "tune" a plant's water and nutrient uptake rates by manipulating the plant's transpiration rates. VPD control is a very important factor in maintaining plant homeostasis for optimal growth and yields.

  • 🌿 Humidor mode — When your herbs or medicinal plants are harvested, this simple relative humidity controller can be used to turn your grow tent into a humidor for proper controlled drying and curing.

  • 🌀 Fan speed control — In addition to AC Infinity type duct fans, multiple 4-wire 140mm computer fans can also be used for small grow space ventilation, especially in cases where you are not worried about odors. They both use PWM speed control. This fan controller has 3 basic settings: Startup speed at boot (idle speed), speed when humidifier is ON, and speed when humidifier is OFF. This is designed to give constant basic air circulation into the grow space, but is also designed to optimize the mixing of water vapor when your humidifier is running by raising fan speed to quickly mix water vapor and rapidly raise humidity to the target set-point of the controller. And when the humidifier is off, the fans reduce to minimal speed to retain humidity levels as long as possible while still providing important air circulation.

  • All controller settings are saved to __persist.json in the Tasmota file system and survive reboots.

  • All sensor and hydroponics controller data is published to a dedicated MQTT topic for external integration into home automation applications.

❗ What It Does NOT Do ❗

  • Does not control temperature. This controller assumes your space is already held at a stable 65–80°F by your home HVAC system. VPD control depends on stable temperatures — without that, humidity control won't be effective. However, the evaporative cooling effect from using an ultrasonic humidifier with a VPD controller can actually lower temps in a grow space by as much as 10 degrees F.

  • Does not dose nutrients or adjust pH. The pump just delivers water or pre-mixed solution on a schedule. Nutrients need to be mixed manually (about every 2 weeks), tank topped off with fresh water at least every other day, and pH tested and adjusted manually every day or two.

A dosing/pH system could be built as a companion project with a second ESP32, an Atlas Scientific pH sensor, and peristaltic pumps — but that's a separate project. 😎

  • Does not log any data. This controller is just that, a controller... it performs tasks at assigned times, and displays current live data. It does not record or save any historical environmental data locally on the device due to ESP32 memory constraints. It does however provide several live MQTT topics which can be used by external applications to capture, record, and graph all data.

An ESP32-S3 N16R8 has more RAM and additional PSRAM for running scripts and hosting web pages. For this I plan on creating a data-logger script and a graph page that will record and display the Hydroponics data for a 48 hour period.


Hardware

Component Details
Microcontroller ESP32-WROOM DevKit v1
Firmware Tasmota32 (standard build)
Temp/Humidity Sensor SHT3x or SHT4x I²C
Relay Board 4-channel 5V relay module
Fans 12V 4-wire PWM (up to 8× 140mm, e.g. Noctua NF-A14)
Buck Converter ×2 DC-DC 2A — 14V→12V for fans, 14V→5V for logic

Basic wiring diagram and hardware descriptions:

⚡💥🔥💀 A Warning on the UPS 💀🔥💥⚡

I chose to integrate my controller directly into an old UPS for the convenience of battery backup and available clean DC power.

This is not recommended for beginners — It involves heavily modifying the AC contact rails in the UPS outlet plugs to isolate them for each relay. It involves cramming the buck converter and relay boards inside the UPS case. It requires working with both AC mains and high-amperage DC voltage in close proximity of each other and carries a very serious risk of electric shock and fire if you're not extremely careful and understand exactly what you're doing!!!

View build photos

A simpler safer alternative: Replace the buck converters with standard 12V and 5V wall adapters, and build everything into an extra-deep 4-gang plastic wall outlet box, or use DIN-rail components inside some other suitable "project box". This gives you 4 relay-controlled outlets, 2 power adapter outlets, and a wall switch as a kill switch to shut off the 12v and 5v power to kill the controller and the relays — this still involves AC mains wiring inside the control box, but without the potential of shorting a large UPS battery to your mains power accidentally.


Compatible Grow Systems

This controller should work well with most common types of hydroponic setups:

  • Flood & drain tables
  • NFT troughs
  • Dutch buckets
  • DWC
  • Aeroponics
  • As well as drain-to-waste systems or simple soil grows where you just need scheduled lighting, watering, and humidity control.

Installation

See INSTALL.md for full setup and configuration instructions

License

MIT — use it, modify it, share it.

Acknowledgments

  • Mycodo by Kyle Gabriel - Inspiration for environmental control functions
  • Tasmota by Theo Arends and contributors - Powerful and feature-rich IoT firmware for ESP32
  • Claude.AI Free-on-line version, Sonnet 4.6 - Tasmota Berry script vibe-coding agent
  • MQTT-Explorer Desktop MQTT client for visualizing, testing, and diagnostics of IoT systems.
  • Wiring diagram made with Fritzing

About

An ESP32 running Tasmota IoT firmware with two Berry scripts that add user-friendly environmental control automation for small home hydroponics systems or grow tents. Uses a temp/humidity sensor and 4-channel relay board to control grow lights, water pump, a humidifier for VPD control, and PWM ventilation fans via a built-in web UI.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages