An open-source hardware and software ecosystem designed to monitor and optimize small-scale biogas digesters.
Scaling down renewable energy technology to the community or household level is a major engineering challenge. A biogas digester is a living ecosystem; if the environment gets too acidic or cold, the methanogenic bacteria die, and gas production stops.
OpenBiogas ML Optimizer tackles the global need for sustainable, decentralized energy. By utilizing basic IoT sensors and a lightweight machine learning model, this project predicts optimal feeding times and warns users of system imbalances before they cause a system crash.
This repository makes industrial-grade monitoring accessible, open-source, and low-cost. By opening up the hardware schematics and software pipeline, we aim to empower communities globally to maximize their renewable energy yields without relying on expensive, proprietary equipment.
- Rural Communities & Farmers: Maximize energy independence by efficiently converting organic waste into usable cooking gas or electricity.
- Green-Tech Hobbyists & Makers: A structured, accessible project to build, deploy, and learn about IoT, machine learning, and renewable energy.
- Researchers & Educators: A platform for gathering real-world biogas data and optimizing the methanogenesis process.
- Open-Source Contributors: Anyone passionate about sustainability, data science, hardware engineering, or UI localization (this project natively supports Arabic, Kurdish Sorani, and English).
The architecture consists of three main pillars:
A low-cost, off-the-shelf microcontroller hooked up to resilient sensors.
- Microcontroller: ESP32 or Raspberry Pi Pico
- Sensors:
- Temperature: DS18B20 (Waterproof)
- pH: Industrial-grade pH probe (hydrogen sulfide resistant)
- Pressure: BMP280 gas pressure sensor
A lightweight application to visualize digester health and log data on edge devices.
- Backend: Python + FastAPI + SQLite
- Frontend: React + Vite (Premium Dark-mode UI with Glassmorphism)
- Localization: Native Right-to-Left (RTL) support for Arabic and Central Kurdish (Sorani).
A predictive model that learns the specific behavior of the digester to optimize yield and prevent souring.
- Frameworks: Scikit-learn (Isolation Forest & Gradient Boosting)
- Functions:
- Anomaly Detection: Early warning for rapid pH drops.
- Yield Prediction: Correlates feeding amounts and temperature with resulting gas pressure.
- The Optimizer: Actionable daily prompts (e.g., "Optimal feed amount today: 1.5kg").
- Python 3.9+
- Node.js 20+
Navigate to the backend directory and install the dependencies:
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txtGenerate synthetic data (for demo/development) and train the ML models:
python -m ml.synthetic_data
python -m ml.trainStart the FastAPI backend:
python -m uvicorn main:app --port 8000Open a new terminal, navigate to the frontend directory:
cd frontend
npm install
npm run devNavigate to http://localhost:5173 in your browser.
We welcome contributions!
- Translations: Help us translate the dashboard to more languages.
- Hardware: Share your custom 3D-printed sensor housings or PCB designs.
- Data Science: Improve the ML models with real-world digester datasets.
Please check the issues tab for "Good First Issue" tags!
This project is licensed under the MIT License. See the LICENSE file for details.