Soil Moisture Monitoring & Automated Irrigation System
Java · MATLAB · Arduino · Firmata · I2C OLED
MOISTAT is a real-time soil moisture monitoring and irrigation control system built using an Arduino Uno, with monitoring and control interfaces implemented in Java and MATLAB.
The system reads 10-bit analog soil moisture data, converts ADC values to voltage, classifies soil moisture using calibrated thresholds, and activates a MOSFET-driven water pump when irrigation is required. Moisture levels are visualized in real time and the soil state is displayed on an I2C OLED screen.
Sensor → Arduino ADC → Serial Communication → Java / MATLAB Monitoring → Pump Control → OLED Display
- The capacitive moisture sensor outputs an analog voltage.
- The Arduino reads the signal through its 10-bit ADC.
- Data is transmitted via Firmata serial communication.
- Java and MATLAB applications process and visualize the readings.
- Soil state is classified and irrigation is triggered if needed.
- The OLED display provides real-time feedback.
- Real-time 10-bit ADC data acquisition
- Conversion of ADC values to voltage-based moisture readings
- Sensor characterization across a 0.1V – 2.0V operating range
- Three-state soil classification logic for irrigation decisions
- Serial communication between Arduino and host applications
- Live data visualization in MATLAB and Java
- I2C OLED display for soil moisture status
- MOSFET-based pump control for safe switching of the DC pump
- Arduino Uno
- Capacitive Soil Moisture Sensor (Analog input A0)
- MOSFET-driven DC Water Pump (Digital output D2)
- SSD1306 I2C OLED Display
- External power supply for pump
- Arduino Firmware
- Analog sensor sampling
- Digital pump control
- I2C communication with OLED display
- Firmata4j for Arduino communication
- JSSC (Java Simple Serial Connector) for serial interface
- Real-time data acquisition and visualization
- MATLAB Arduino Support Package
- Real-time plotting using
animatedline - Sensor data processing and monitoring
- Read soil moisture sensor value from Arduino ADC.
- Convert ADC reading (0–1023) to voltage.
- Classify soil moisture level using calibrated thresholds.
- Display soil state on OLED screen.
- Activate pump when soil moisture falls below defined thresholds.
| Voltage Range | Soil Condition | Action |
|---|---|---|
| Low Voltage | Dry Soil | Pump Activated |
| Medium Voltage | Moderate Moisture | Monitor |
| High Voltage | Sufficient Moisture | Pump Off |
- Embedded system design using microcontrollers
- Hardware–software integration
- Sensor calibration and signal interpretation
- Serial communication protocols
- Real-time data visualization and monitoring
- Safe power control using MOSFET switching
- Wireless monitoring via WiFi or Bluetooth
- Mobile dashboard for irrigation monitoring
- Data logging for long-term soil analysis
- Automated irrigation scheduling