This projectaims to detect temperature, humidity, and water level in indoor farming.Temperature, humidity, and water level are the key factors of the success of anindoor farming. By automating and regulating key variables, farmers can useindoor growing as a way to grow more aggressively, reduce the demand for pricey(and often unavailable) labor, and, ultimately, drive profitability.
The high levelof automation and regulation calls for a sensor system which can be implementedto effectively detect and monitor these key factors and send the data via cloudservices to the grower in real-time. In this project, we used DHT11 to detecttemperature and humidity and water level sensor to detect water level. Thereare 4 LEDs to indicate water level so anyone can easily tell the water level bychecking out the LED lights. What’s more, all the data is sent to and stored inGoogle sheets in real-time via PushingBox. PushingBox is a simple, free, andeasy API middleman in allowing our data to be palatable to Google Sheets. In thisway, the data can be viewed remotely by the grower in real-time and reviewedafterwards at the same time.
🛠️ เจาะลึกเบื้องหลังการทำงาน (Deep Dive / Technical Analysis)
Monitoring basic humidity is a beginner task. The Tri-Variable Environment Monitor mimics the massive dashboards used in professional hydroponic farming operations. It requires the programmer to simultaneously manage both hyper-precise digital I2C data (air) and wildly chaotic analog resistance arrays (water depth), combining them into a single, cohesive LED alert system.
Analog Water Depth Sensing (The Resistance Trace)
A float switch only tells you if the water is "High" or "Low". A Water Level Depth Sensor gives you a massive continuous measurement of the exact water volume remaining in the irrigation reservoir!
- The Physics: The sensor is an exposed PCB with long, parallel copper traces. As submerged in water (which conducts electricity slightly), the total 5V resistance bridging across the traces drops mathematically.
- The Arduino reads
analogRead(A0). - If the reservoir is completely dry, the analog value is
0. - If submerged 2 centimeters, it reads
300. If submerged 4 centimeters, it reads650. - The C++ code uses
<map()>to convert0-800into0-100% Volume!
Multi-Factor Display Parsing
The Arduino must not freeze while calculating the air temp via a DHT22 or BME280.
- All three variables (
Temp = 24.5C,Hum = 60%,Water = 45%) are structured into strings. - The LCD Pagination Algorithm: An aggressive 16x2 LCD is too small to show all 3 cleanly. You must program a mathematical scrolling screen timer.
if ((millis() / 3000) % 2 == 0) { // Screen A
lcd.print("T:" + String(temp) + " H:" + String(hum));
} else { // Screen B
lcd.print("Tank Level: " + String(waterLvl) + "%");
}
- A critical Buzzer Alarm function overrides the screen entirely, flashing
CRITICAL DROP!if the water level plummets below 10%, alerting the farmer before the massive water pumps run dry and explode!
Environmental Tracing Hardware
- Arduino Uno/Nano.
- Analog Water Level Depth Detection Sensor (Long exposed PCB traces).
- DHT22 precision Temp/Humidity sensor.
- 16x2 I2C Character LCD Display (For clean, 4-wire menu formatting).
- Active Piezo Buzzer as the catastrophic low-water-level alarm.