🛠️ เจาะลึกเบื้องหลังการทำงาน (Deep Dive / Technical Analysis)
The Plant Communicator project fuses biology with IoT (Internet of Things). It takes the guesswork out of gardening, allowing your houseplant to send you a text message, an email, or play an audible sound when its soil lacks hydration.
Resistive Soil Analytics
The system relies on a Soil Moisture Probe (two exposed metal prongs).
- The Circuit: Water is a decent conductor. Dry dirt is an insulator. When the Arduino sends 5V down one prong, it measures how much electricity "jumps" across the dirt to the second prong using an Analog pin (A0).
- The Data: Dry soil will output a high analog value (like
900). Wet, conductive soil outputs a low analog value (300). - Crucial Hack (Electrolysis): If you leave 5V flowing through the metal prongs in wet soil 24/7, electrolysis will literally disintegrate the metal probes into rust in three days! The code must use a digital pin to power the sensor ON, take a reading for 5 milliseconds, and turn it completely OFF for the next two hours.
Communication Avenues
Once the Arduino determines moistureLevel > 800 (dangerously dry):
- Basic Method: It blinks a large Red LED or uses a buzzer to beep like a smoke detector until someone waters it.
- Advanced Method: An ESP8266 connects to Wi-Fi. It uses the IFTTT (If This Then That) API service to instantly ping your smartphone with a push notification: "Warning: The Fern in the living room needs 200ml of water!"
Required Hardware
- Arduino Uno/Nano (or ESP8266 for IoT).
- Resistive (or Capacitive) Soil Moisture Sensor.
- Jumper Wires and an LED/Buzzer.