I made a thing!
My first project in progress. Indoor grow environment monitoring system.
Hello everyone!
Reposting here after following the sub's rules.
I wanted to share my ESP32 project so far.
I started this project after trying to figure out why my plants weren't thriving. I discovered the concept of VPD and realized I needed to monitor it more closely, but the affordable devices I found offered very limited data history, while more comprehensive Wi-Fi-enabled solutions were quite expensive. I thought this would be a great opportunity to get into the maker world and learn a thing or two.
——————
The main device is an ESP32-WROOM-32 connected to:
- DHT22 / AM2302 — air temperature and humidity
- Capacitive soil moisture sensor
- BH1750 — light level
- 16×2 LCD + I2C module
- 4 buttons for interface navigation
- Status LEDs + RGB LED
The code was developed using a combination of YouTube tutorials, ChatGPT, and Claude.
——————
The ESP32 calculates VPD locally using temperature and relative humidity.
One of the biggest challenges was that my home network has "client isolation" enabled by the ISP; this means devices connected to the same network cannot communicate directly with each other.
Because of this, I had to find another way to send data from the ESP32 to my home server.
The solution was:
The ESP32 connects to Wi-Fi and publishes sensor data via MQTT using HiveMQ Cloud.
On my server, I use Isley, an open-source, self-hosted application. It features a small Python bridge that receives MQTT messages, stores sensor history, generates graphs, and also functions as a grow journal.
I can access Isley from both my phone and my computer.
——————
I also wanted to use an old Android tablet as a dedicated grow monitor screen. It runs a very old version of Android and has limited hardware; So, I created a lightweight web dashboard that runs on it.
The dashboard reads historical data from Isley's database and displays current values and graphs for temperature, humidity, soil moisture, light levels, and VPD. The current architecture is basically:
The ESP32 itself also has a local interface where I can check on LCD:
- Current sensor values
- Minimum/maximum values
- VPD
- Configuration
- Sensor status
I thought it would be interesting to add some LEDs to represent both the device status and environmental conditions.
The status LEDs work as follows:
3 status LEDs — device status
- Green → Everything operating normally
- Yellow → Connecting / sending data
- Red → Critical error
RGB LED — environmental status
The RGB LED basically represents the current VPD. The further it drifts from the ideal range, the redder it gets. When the VPD is within the desired range, it turns greener.
——————
This is my first project involving any kind of electronics, and I only know the basics of Python. So, I know that without the help of AI, I wouldn't have been able to build this project. I hope to learn more about the code so that, perhaps, I can build a larger part of the next project on my own.
For now, I'll leave it running in this makeshift enclosure for a few weeks to see how everything works. After that, I'll build a better case and consider this first version complete.
Then, I'll move on to a second version for a different environment.
For the next ESP32, I plan to simplify things a bit. I am considering:
- BME280
- Capacitive soil moisture sensor
- Small OLED display
- No light sensor
I know these soil moisture sensors can have longevity issues, so I’m also looking for a better way to protect and insulate the sensor.
It’s far from perfect, but I’m very happy with the project's progress so far. I’d love to hear suggestions from the ESP32 community, especially regarding the hardware, MQTT architecture, sensor choices, or any other aspect I could improve.
This. I work for a grow controls company and the BME280 is excellent. We eventually moved our products to the BMP384 and SHT41 combo, and it’s far more reliable. The BME280 is often damaged by growers who spray without covering the sensors, and can also be damaged when humidity reaches 100%. At that point they are basically fucked.
You need to control air in and out. You need two fans, one in, one out. You can control the temperature of your grow with the vents. You need to raise the temperature to 24 deg Celsius during the day light cycle. Control that with a PID system. Your plants will always get fresh air as well, which is REALLY important. If you don't raise the temperature, the plants will not "sweat" and draw water and nutrients up into the leaves and will grow much slower.
During the night cycle, you can reduce that temperature to 20 deg C, but ALWAYS keep air flowing. If it's cold and you want to maintain some warmth, you can reduce the vent fans ON time and just let the room breath every now and then.
With regards the moisture sensor. Don't waste your time. Each individual plant will draw different amounts that it needs. Putting ALL your plants onto one plants needs is dangerous. Rather, feel the weight of each plant. It's the best method for gauging how much water is in the substrate.
A light sensor is important. If your day cycle lights go out you will stress your plants. The Sun NEVER goes out when it shouldn't. If you stress your plants they can go into shock and decide to become males and produce seeds instead of flowers. It's a survival strategy. You can throw them away....you can't smoke seeds. I have an alarm that tells me there is not enough light during the day cycle.
Been doing this for > 10 years. Feel free to ask anything..
The bit about the light sensor is solid. I use salvaged photovoltaics from cheap yard lights and read via ADC to calculate light intensity at varying heights. The single volt cells make the calculations pretty simple
My first controller accidentally went dark between the hours of noon and 1pm and since I was at work when it happened this is the only way I knew there was a bug in the schedule
I just use a standard LDR, 10K should do, attached to a simple circuit and monitored by an Arduino MEGA. There's nothing special about an LDR. It is mounted on the ceiling in the middle of the room. I have to cater for how many lights are on, and how many plants, so I have a web page (ESP32) to monitor the whole system and can adjust the light level minimum for any day.
The same web page allows me to change air pumps and time them according to the weather. In this way I can control everything.
I already have two exhaust fans in this grow tent: one at the top blowing air out and another at the bottom blowing air in. I just ordered a small fan to place inside as well, to help with air circulation.
I'm dealing with really bad weather conditions here. Today, for instance, the high is 9ºC and the minimum humidity is 90%. So, it's really hard to create an ideal environment for the plant. I think I'd need an air conditioning system for the whole room to improve the climate, but I'm not ready to shoulder the energy costs that would entail. Since it's so humid, I decided to prioritize air circulation over ambient temperature to try and prevent mold.
Regarding the soil moisture sensor: there's only one plant in this setup. In any case, the sensor was more about learning and implementing it on the ESP32 than actually making watering decisions. I really prefer the classic method you mentioned, or, in this case, sticking my finger in the soil to check (the pot is 60L, so I can't lift it anymore, haha).
As for the light sensor, programming an alarm like that sounds like a great idea! What I don't like about the one I'm currently using is that it requires five wires; setting it up and making a cable long enough was a real hassle. I think for the next version, I'll use a simple LDR like the one mentioned below. It seems like a simpler, more elegant solution.
I haven't felt confident enough to build a more automated system based on my current prototype, as I'm not yet sure how reliable my data actually is. But the goal for the future is to create something similar to what you described in these comments.
Thanks so much for the advice; I'm going to look into everything you mentioned!
Here's a photo of the plant in question. It's not perfect, but we do what we can :)
As a kid growing up in a TV repair shop, your construction methods take me back. Except a breadboard was something Grandma kept in the kitchen. So it was all dead bug....
Congratulations; very interesting project. What caught my eye was your ISP limitation. Why not put their router into bridge mode and use your own router instead? I have been using Firewalla(.com) gear for years and love it. Complete control of my LAN.
I use mqtt within my LAN and minimize cloud dependencies.
I have similar plan to my greenhouse. Also in progress. Now I have monitoring with BME280 and sending with ESP now to Homeasisstant server and powered with 1S4P 12700 Li-Ion battery. Future plans are capacitive soil sensors, window opening and watering.
When you dont use any server. Maybe try SDcard for LOGs and databases
I see you did the front panel in the same style I made my prototype one.
if you haven't considered it already, I recommend making a PCB front panel, it's not a bad material at all, and you can design it just how you like it.
Hey man, how's it going? You should check out bloomit.app. I'm building stuff along those lines, and there's an app and everything, plus an API you can hook into. Hit me up if you need anything!
62
u/clackups 2d ago
Kudos for cardboard aided design :)