CyberDruid is an intelligent soil moisture monitoring system designed to help you effortlessly water your plant on time. It continuously monitors soil moisture levels using a capacitive sensor, displays real-time data on an OLED screen, and sends Telegram alerts when the soil moisture level drops below a specified threshold.
- Real-time Monitoring: Continuous soil moisture percentage tracking
- Visual Display: 128x64 OLED screen with beautiful visuals
- Smart Alerts: Telegram notifications when moisture level drops below threshold
- Rolling Average: Smoothed readings to prevent false alarms
- Visual Feedback: Screen inversion when plant needs water
- WiFi Connectivity: Remote monitoring and alert system
| Component | Quantity | Description |
|---|---|---|
| Wemos D1 Mini | 1 | ESP8266 development board |
| SSD1306 OLED Display 0,96'' | 1 | 128x64 I2C OLED screen |
| Capacitive Soil Moisture Sensor v1.2 | 1 | Analog moisture sensor |
| Resistor 10kΩ & 20kΩ | 1 each | For voltage divider |
| Some Wires | some | For connections |
| Breadboard & Jumper Cables | 1 & some | For prototyping (optional) |
| Micro USB Cable | 1 | For power and programming |
| Plant Pot | 1 | Your favorite plant |
| Wemos D1 Mini | Component | Connection |
|---|---|---|
| D1 | OLED SCL | Clock line |
| D2 | OLED SDA | Data line |
| A0 | Moisture Sensor AOUT | Analog output |
| 3.3V | OLED VCC | Power |
| 5V | Moisture Sensor VCC | Power |
| GND | OLED GND | Ground |
| GND | Moisture Sensor GND (through voltage divider, see schema) |
Ground |
- Open Telegram and search for
@BotFather - Start a chat and send
/newbot - Follow the prompts to name your bot
- Save the Bot Token provided (format:
123456789:ABCdefGHIjklMNOpqrsTUVwxyz)
- Send a message to your newly created bot
- Open this URL in your browser (replace
YOUR_BOT_TOKEN):https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates - Look for
"chat":{"id":123456789}in the response - Save this Chat ID number
- Download and install Arduino IDE from arduino.cc
- Open Arduino IDE and go to File → Preferences
- Add this URL to Additional Board Manager URLs:
http://arduino.esp8266.com/stable/package_esp8266com_index.json - Go to Tools → Board → Boards Manager
- Look for "esp8266" and select LOLIN (WEMOS) D1 R2 & mini
- Go to Sketch → Include Library → Manage Libraries
- Install these libraries:
- Adafruit SSD1306 by Adafruit
- Adafruit GFX Library by Adafruit
- Adafruit BusIO by Adafruit
- LiquidCrystal I2C by Frank de Brabander
Clone or download this repository to your computer.
Open cyberdruid/config.hpp and update the following values:
const String WIFI_SSID = "Your WiFi SSID"; // Your WiFi network name
const char WIFI_PASS[] = "XXX"; // Your WiFi password
const String BOT_TOKEN = "0000000000:AAAAAA...AAAAAA"; // Your Telegram bot token
const String CHAT_ID = "123456789"; // Your Telegram IDYou may need to adjust these values based on your specific sensor:
// Sensor Calibration
const int SENSOR_DRY_VALUE = 395; // Value when sensor is dry (in air)
const int SENSOR_WET_VALUE = 260; // Value when sensor is wet (in water)To calibrate:
- Hold the sensor up in the air → note the reading
- Place sensor in a glass of water → note the reading
- Update
SENSOR_DRY_VALUEandSENSOR_WET_VALUEaccordingly
// Plant Configuration
const String PLANT_NAME = "Basilikum"; // Your plant's name
const uint8_t MOISTURE_THRESHOLD = 50; // Alert threshold (0-100%)
const unsigned long ALERT_COOLDOWN = (6UL * 60 * 60 * 1000); // 6 hours between alertsIf you want to change the plant icon, you can create a new bitmap using an online tool like
dot2pic.com and update bitmaps.hpp (please submit a PR if you add more icons).
Optimal image size is 40x40 pixels, update IMAGE_HEIGHT & IMAGE_WIDTH constants if you change dimensions.
Bitmap should be monochromatic with 8 pixels per byte in horizontal order.
- Connect all components according to the wiring diagram
- Connect Wemos D1 Mini to your computer via USB
- Open
cyberdruid/cyberdruid.inoin Arduino IDE - Select the correct COM port: Tools → Port → COM[X]
- Click the Upload button (→)
- Wait for "Done uploading" message
- Open Tools → Serial Monitor
- Set baud rate to 115200
OLED Display Not Working:
- Check I2C connections (see wiring diagram)
- Verify display address (default: 0x3C)
- Use
find_display_addr.inoto scan for I2C devices
WiFi Connection Failed:
- Verify SSID and password in
config.hpp - Check WiFi signal strength
- Ensure 2.4GHz network (ESP8266 doesn't support 5GHz)
Telegram Alerts Not Sending:
- Verify bot token and chat ID
- Check internet connection
- Monitor serial output for error messages
Inaccurate Moisture Readings:
- Calibrate sensor values for your specific soil type
- Check the wiring (must be powered with 5V)
- Ensure sensor address is correct in
config.hpp
Contributions are welcome! Please feel free to submit a Pull Request with any improvements, bug fixes, or new plant icons.
📦 Designing a 3D printable case for sensor protection and aesthetics would be much appreciated!
This project is licensed under the MIT License — you can freely use, modify, and distribute it.
Happy Home Gardening! 🌱


