ATmega328P-based system that auto-waters plants and controls UV grow lights based on soil moisture.
| Sensor | Condition | Action |
|---|---|---|
| Soil Moisture (A1) | ADC > 400 (dry) | Pump relay ON |
| Water Level (A2) | ADC > 100 | Red LED ON |
| Water Level (A2) | ADC ≤ 100 | Green LED ON |
| Timer (8 hrs) | Within window | UV light ON |
| Signal | Arduino Pin | AVR Pin |
|---|---|---|
| Soil Moisture | A1 | PC1 / ADC1 |
| Water Level | A2 | PC2 / ADC2 |
| Pump Relay | D8 | PB0 |
| UV Light Relay | D7 | PD7 |
| RGB Red | D9 | PB1 |
| RGB Blue | D10 | PB2 |
| RGB Green | D12 | PB4 |
Full schematic and layout → images/
Install toolchain (Ubuntu):
sudo apt install gcc-avr avr-libc avrdudeBuild & flash (USBasp):
cd firmware
make
make flashFlash via Arduino bootloader:
# Set PORT in Makefile first (e.g. /dev/ttyUSB0)
make flash-arduinoConnect at 9600 baud, 8N1 to monitor live readings:
=== Smart Plant Monitor Boot ===
Moisture: 612
Water Level: 87
