A DIY smart flower pot with automatic watering: Arduino (soil + DHT + servo valve) talks over Bluetooth to a Raspberry Pi, which runs a FastAPI backend and a React dashboard for monitoring and manual watering.
This project was developed for the Embedded Computer Systems course at FESB, University of Split.
| Prototype wiring (our “scrap build”) | Wiring / schematic diagram |
|---|---|
- Video:
assets/Showcase_video.mov
- Course project: developed for the Embedded Computer Systems course at FESB (University of Split).
- Prototype build: the physical construction used available parts and materials; enclosure and wiring can be implemented in many different ways.
- Scalable concept: a typical real-world setup would use multiple Arduino units (one per pot) communicating with one Raspberry Pi for centralized monitoring and control.
┌─────────────────┐ Bluetooth ┌──────────────────────────────────────┐
│ Arduino Uno │◄─────────────────►│ Raspberry Pi │
│ • DHT11 │ Serial (9600) │ • Arduino daemon (serial → JSON) │
│ • Soil sensor │ │ • FastAPI (REST) │
│ • Servo valve │ │ • Web dashboard (React) │
└─────────────────┘ └───────────────────────────────────────┘
| Part | Role |
|---|---|
| Arduino | Reads temperature, air humidity, soil moisture; toggles the valve on go. |
| Daemon | Maintains serial connection; parses sensor lines; writes api/data/sensor_data.json; forwards commands from api/data/command.txt. |
| API | GET /plant, POST /water, GET /health. |
| Dashboard | Displays sensor values + statuses and triggers watering. |
- Arduino: flash
Arduino/script.inoand wire it (seeArduino/README.md). - Raspberry Pi: pair the Bluetooth module (HC-05 or similar) and bind it as
/dev/rfcomm0(seesystemd/README.md). - Daemon + API: run them on the Pi (or locally) (see
api/README.md). - Dashboard: in
frontend/dashboardrun:
npm install
npm run devNote: the dashboard currently calls the API at http(s)://<current-host>:8001 (same host, port 8001).
| Path | Description |
|---|---|
Arduino/ |
Firmware (sensors, servo, serial protocol). |
api/ |
FastAPI app + Arduino daemon (serial ↔ JSON/commands). |
frontend/dashboard/ |
React dashboard UI. |
systemd/ |
systemd units for daemon + API on Raspberry Pi. |
run.sh / run.bat |
Convenience scripts to start the API (create venv, install deps, run uvicorn). |
- Simple setup: a 5 V / 2 A power bank is a good baseline (≈ 10 W). Peak draw can approach this range when the servo moves, depending on the servo and peripherals.
- Our prototype power: we used a separate 6 V accumulator for the servo and 2× 9 V batteries in parallel into Arduino Vin as an “electronics challenge” for the course. You don’t need to copy that setup.
- Common ground is mandatory: if the servo or any module uses a separate supply, that supply’s GND must connect to Arduino GND or the system may behave unreliably.
- Arduino regulator limitations: the onboard Vin → 5 V regulation is power-limited (heat + current). If you run from 9 V batteries, expect less usable current headroom than “9 V” might imply.
- Capacitor trick: many random resets / disconnects can be fixed with a capacitor in parallel with Vin and GND (e.g. 100–470 µF), especially when the servo moves.
- Bluetooth stability: the HC-05 needs stable voltage and current. If power dips, it may randomly disconnect (a stable supply + decoupling capacitor typically helps).
See LICENSE.