A complete open-source hardware and software solution for building ultra-low-power IoT sensor networks using the ESP32-C3 microcontroller. This project transforms discarded vape batteries into sustainable power sources for distributed environmental monitoring systems.
|
♻️ Sustainable & Eco-Friendly
📡 Ultra-Low Power Design
|
🌡️ Environmental Monitoring
☁️ Cloud Connected
|
The system architecture consists of distributed sensor nodes placed throughout your environment, communicating via ESP-NOW to a central hub that aggregates and uploads data to the cloud.
┌─────────────┐ ESP-NOW ┌──────────────┐ WiFi ┌────────────┐
│ Sensor Node │ ─────────────────→│ Home │ ───────────────→│ ThingSpeak │
│ (Battery) │ │ Station │ │ Cloud │
└─────────────┘ │ (USB) │ └────────────┘
└──────────────┘
↓ ↑
Deep Sleep Data Queue
10 minutes Buffering
Typical Deployment:
- 🏠 Living Room: Temperature + Humidity monitoring
- 🛏️ Bedroom: Air quality (IAQ) tracking
- 🍳 Kitchen: VOC detection for cooking
- 🖥️ Office: Climate control optimization
- 📊 Dashboard: Real-time visualization on any device
|
Core Specifications:
|
Power System:
Version 3 Improvements:
|
PCB Evolution: Three design iterations available in PCB/ directory with progressive improvements in power management, I2C connectivity, and EMI shielding.
All sensors connect via I2C interface (SDA: GPIO5, SCL: GPIO4)
|
BME280 Climate Monitoring 📊 Temperature ±1°C Perfect for basic environmental monitoring |
BME680 Air Quality Analysis 📊 Temperature ±1°C Ideal for health-conscious monitoring |
Why I2C?
- Simple 2-wire interface (SDA + SCL)
- Multiple sensors on same bus
- Standardized protocol
- Minimal GPIO usage
|
|
| Configuration | Result |
|---|---|
| Battery | 550mAh (recycled vape) |
| Sensor | ESP32-C3 + BME280 |
| Interval | 10 minutes |
| Runtime | ⚡ 12+ months without recharge |
💡 Note: Various battery capacities tested (300mAh - 900mAh) with proportional runtime results. Actual performance depends on battery condition and usage pattern.
- Inspect for physical damage before use
- Test voltage (3.0-4.2V acceptable range)
- Never use swollen batteries
- Use protective equipment during extraction
- Dispose of damaged cells properly
|
Components: 1️⃣ USB-C Input
2️⃣ Charging IC
3️⃣ Power Path Controller
4️⃣ 3.3V LDO Regulator
|
Protection Features: 🛡️ Over-discharge protection Performance: ⚡ Deep sleep: ~10µA |
Current Implementation (LDO only):
| Aspect | Impact |
|---|---|
| ❌ Battery usable range | 4.2V → 3.3V only (~75% capacity) |
| ❌ Lost capacity | ~25% (below 3.3V unusable) |
| ✅ Circuit complexity | Simple, reliable |
| ✅ Cost | Lower BOM cost |
| ✅ Efficiency | High at normal voltage |
| ✅ Runtime | Still 12+ months achieved |
Rationale: The LDO-only design provides sufficient runtime for most use cases while keeping the design simple and cost-effective. Future versions may incorporate buck-boost for maximum battery utilization.
|
BME280 Basic Node 📍
|
BME680 Air Quality 📍
|
Central Hub 📍
|
|
WiFi Monitor (1A) 📍
|
Low-Power WiFi 📍
|
|
🔧 Hardware Requirements
|
💾 Software Requirements
|
git clone https://github.com/Ans1S/lil-ESP32-C3.git
cd lil-ESP32-C3Each project includes a config.h.example template:
cd SW-VSCode/ESP32-Sensor/src
cp config.h.example config.h
# Edit config.h with your WiFi/ThingSpeak credentials- Create free account at thingspeak.com
- Create new channel
- Add fields:
- Field 1: Temperature (°C)
- Field 2: Humidity (%)
- Field 3: Pressure/IAQ
- Field 4: Battery (mV)
- Copy Channel ID and Write API Key
Flash this to your home station:
#include <WiFi.h>
void setup() {
Serial.begin(115200);
WiFi.mode(WIFI_STA);
Serial.println(WiFi.macAddress());
}
void loop() {}Using PlatformIO:
cd SW-VSCode/ESP32-Sensor
pio run --target upload
pio device monitorUsing Arduino IDE:
- Open
.inofile fromSW-Arduino-IDE/ - Select board: "ESP32C3 Dev Module"
- Select port
- Upload
📚 For detailed setup instructions, see SETUP_GUIDE.md
lil-ESP32-C3/
│
├── 📂 PCB/ # Hardware Design Files (KiCad)
│ ├── Version 1/ # Initial design
│ ├── Version 2/ # Enhanced I2C + protection
│ └── Version 3/ # Optimized power path
│
├── 📂 SW-VSCode/ # PlatformIO Projects
│ ├── ESP32-Sensor/ # BME280 sensor node
│ ├── ESP32-Extra-Sensor/ # BME680 air quality node
│ ├── ESP32-Home-Station/ # Central hub + WiFi gateway
│ ├── W-Charger-ThingSpeak-1A/ # Standalone WiFi (1A)
│ └── W-Charger-ThingSpeak-100mA/ # Standalone WiFi (100mA)
│
├── 📂 SW-Arduino-IDE/ # Arduino IDE Projects (Legacy)
├── 📂 Datasheet/ # Component Datasheets
├── 📂 Readme/ # Documentation Images
│
├── 📄 .gitignore # Git ignore rules
├── 📄 LICENSE # MIT License
├── � SETUP_GUIDE.md # Detailed setup instructions
└── 📄 README.md # This file
| Metric | Value |
|---|---|
| ⏱️ Active Time | ~2-3 seconds per reading |
| 😴 Sleep Time | 1200 seconds (20 min, configurable) |
| 🔋 Battery Life | 3-12+ months (500mAh typical) |
| ⚡ Deep Sleep Power | ~10µA |
| 📡 Active Power | ~80mA (sensing) |
| 📤 TX Power | ~120mA (ESP-NOW) |
| Metric | Value |
|---|---|
| 📥 ESP-NOW Listening | ~80mA |
| 📶 WiFi Upload | ~120mA (brief) |
| 🔌 Power Source | USB 5V (always-on) |
| 💾 Queue Capacity | 20 readings |
🔒 This repository does NOT contain sensitive credentials.
All WiFi passwords, API keys, and MAC addresses must be configured locally in config.h files, which are:
- ✅ Excluded via
.gitignore - ✅ Never committed to repository
- ✅ Documented via
config.h.exampletemplates
Before pushing to GitHub:
- Verify
config.hfiles are git-ignored - Only commit
config.h.exampletemplates - Never hardcode credentials in source files
🔴 Sensor Node Not Sending Data
- Check battery voltage (> 3.0V)
- Verify I2C sensor connections (SDA/SCL)
- Confirm receiver MAC address in
config.h - Monitor serial output for error messages
- Test sensor with I2C scanner
🔴 Home Station Not Receiving
- Ensure ESP-NOW on same WiFi channel
- Verify MAC address matches sender config
- Check distance between devices (< 100m)
- Confirm station is powered and running
- Review serial logs for ESP-NOW errors
🔴 ThingSpeak Not Updating
- Verify API key and Channel ID correct
- Check WiFi connection status
- Respect 15-second minimum upload interval
- Monitor ThingSpeak rate limits
- Check network firewall settings
🔴 Battery Drains Quickly
- Verify deep sleep is working (check serial)
- Increase sleep interval in configuration
- Check for sensor power leakage
- Test battery capacity with multimeter
- Ensure proper power path operation
We welcome contributions from the community! Here's how you can help:
|
Ways to Contribute:
|
Development Areas:
|
Contribution Process:
- Fork the repository
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Third-Party Components:
- Component datasheets © respective manufacturers
- ThingSpeak © MathWorks
- ESP32-C3 © Espressif Systems
Special thanks to:
- Espressif Systems - ESP32-C3 platform and excellent documentation
- Bosch Sensortec - High-quality BME280/BME680 environmental sensors
- MathWorks - ThingSpeak IoT cloud platform
- Open Source Community - Libraries, tools, and inspiration
- Contributors - Everyone who has helped improve this project
Built with ❤️ using ESP32-C3 and recycled batteries


