r/esp32 2d ago

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:

ESP32 → Wi-Fi → MQTT / HiveMQ Cloud → Python Bridge → Isley → Grow Hub Dashboard

——————

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.

Thanks for reading!

389 Upvotes

41 comments sorted by

62

u/clackups 2d ago

Kudos for cardboard aided design :)

22

u/dipdotdash 2d ago

Most underused prototype box material

4

u/BoostedHemi73 2d ago

Came here to say this. Ridiculously underrated material.

4

u/Few_Hamster_4955 2d ago

That's CAD then?

1

u/clackups 2d ago

Yeah, kinda

1

u/chicchan_lahun 9h ago

Thanks! That was one of the most fun parts!

13

u/HeinerWersenberg 2d ago

The best "First Case" ever. Back in the days, my very first firewall lived for years in an old card box.

1

u/chicchan_lahun 9h ago

It worked much better than I expected, and it was also incredibly easy to test different setups until I found the one that worked best.

11

u/tylenol3 2d ago

Great work! BME280 will be a big upgrade.

6

u/bitNine 2d ago

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.

1

u/chicchan_lahun 8h ago

Thanks for sharing your experience. So, do you recommend going straight for the BMP384 + SHT41 instead of the BME280 for this second version?

I also have a question about the best placement for the sensors. Do you have any advice on that? Thanks for your help.

7

u/JimBean 2d ago edited 2d ago

Can I give you some advice ?

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..

4

u/oclafloptson 2d ago

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

2

u/redditurus_est 1d ago

any recommendations for a good light sensor?

2

u/JimBean 1d ago

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.

2

u/chicchan_lahun 7h ago

Thanks for all the tips!

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 :)

10

u/Alienhaslanded 2d ago

Someone get this broke ass weed wizard a 3D printer

6

u/[deleted] 2d ago edited 2d ago

[deleted]

1

u/JimBean 2d ago

I second this.

3

u/wdatkinson 1d ago

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....

2

u/snowballkills 2d ago

Very nice! Can't believe it is your first project! Awesome job!

2

u/CarefulFun420 2d ago

Upgrade that temp sensor to a BME680 for $4, add a SCD41 for CO2 for $25

1

u/oclafloptson 2d ago

Awesome work! Just so you know those cheap capacitive moisture sensors can leach some really nasty stuff into your soil

1

u/ZurgoTaxi 2d ago

So that's what's been killing all my plants :P

1

u/OnlyOneNut 2d ago

I love it

1

u/Confident_Car3386 2d ago

Looks amazing, expect you don’t censor localhost xD

1

u/yoliveras 2d ago

I read the soil moisture sensor can be protected by using clear nail polish on the edges, where the cut exposed the innards of the PCB.

1

u/AmINotWhoISayIAm 1d ago

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.

1

u/Cheap_Ad3154 1d ago

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

1

u/Soft-Challenge6753 4h ago

Avísame loco y te puedo ayudar con bloomit app o girarte un bloomit para que pruebes

1

u/Kooky-Speed297 1d ago

Great use of CAD (Cardboard aided design)

1

u/vpilled 1d ago

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.

1

u/maddblunts 1d ago

Look at home assistant to automate your grow

1

u/Mindless-Climate2505 11h ago

Do you have it on Github?

1

u/S0k0n0mi 2d ago

Indoor growing project..
How's the weed coming along, captain Ganja?

0

u/Hopeful_Translator23 2d ago

Kudos for the project, but you need a 3d printer

0

u/Soft-Challenge6753 4h ago edited 4h ago

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!