https://github.com/shashwat0903/e-yantra
Built a smart energy simulation game that helps users understand and manage renewable sources like solar and hydro power more efficiently. Using ESP32 boards, ultrasonic sensors, and LDRs, we brought real-time data into the game to forecast energy output and balance supply-demand scenarios.
https://github.com/shashwat0903/e-yantra
esp32 huggingface-transformers ldr-sensor mysql nextsjs openweather-api reactjs
Last synced: 3 months ago
JSON representation
Built a smart energy simulation game that helps users understand and manage renewable sources like solar and hydro power more efficiently. Using ESP32 boards, ultrasonic sensors, and LDRs, we brought real-time data into the game to forecast energy output and balance supply-demand scenarios.
- Host: GitHub
- URL: https://github.com/shashwat0903/e-yantra
- Owner: shashwat0903
- Created: 2025-04-18T16:48:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-18T17:16:08.000Z (over 1 year ago)
- Last Synced: 2025-04-23T13:58:37.756Z (over 1 year ago)
- Topics: esp32, huggingface-transformers, ldr-sensor, mysql, nextsjs, openweather-api, reactjs
- Language: TypeScript
- Homepage:
- Size: 403 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# โก E-Yantra - Operation and Control of Renewable Energy Sources
A gamified simulation system integrated with real-time environmental inputs to manage and optimize renewable energy consumption in households. Built under the **E-Yantra initiative**, this project merges **simulation, hardware and AI-based recommendations**.

---
## ๐ง Project Summary
**E-Yantra** is a **simulation + control system** that helps users understand how to manage renewable energy from **solar, wind, and hydro sources**. It provides:
- Real-time **energy allocation and optimization**
- **Weather/location-based recommendations**
- Integration with **ESP32 + sensors** to predict actual renewable generation potential.
---
## ๐ Key Features
| Feature | Description |
|-----------------------------------|---------------------------------------------------------------------------------------------|
| ๐ฎ Energy Grid Game | Simulated energy management game (see below) |
| ๐ค Weather-Based Recommendations | Dynamic suggestions based on solar irradiance, wind speed, rainfall |
| ๐ Location-Aware Optimizations | Region-specific energy source guidance (e.g., wind in coastal areas, solar in deserts) |
| ๐ Sensor-Based Predictions | Uses LDR & ultrasonic sensors to predict energy potential via ESP32 |
| ๐ Energy Calculation Dashboard | Optimized allocation based on cost, green factor, or balanced approach |
| ๐ก Real-Time Data Integration | Combines API + sensor input to dynamically adapt strategies |
| ๐ Impact Reports | Shows potential cost savings, carbon reduction, and usage charts |
| ๐ง Educational Value | Teaches real-world constraints through interactive design |
### ๐ฎ Energy Grid Optimization Game
User allocates energy to appliances and receives feedback on efficiency.
> **Image file:** `ec.png`

### ๐ค Weather-based Recommendation Panel
Uses real-time weather (via OpenWeatherMap API) to guide source prioritization.
> **Image file:** `rec.png`

---
## ๐ ๏ธ Hardware & Software Stack
### ๐ Hardware
- **ESP32** microcontroller
- **HC-SR04** Ultrasonic Sensor โ For water height โ hydro energy
- **LDR Sensor** โ For light intensity โ solar potential
- **Zener Diode & Op-Amp** โ Signal conditioning
- **Breadboard & Jumper Wires**
### ๐ป Software
- **Frontend**: React / HTML5 + JS + CSS
- **Arduino IDE**: ESP32 code for sensor reading
- **Weather API**: OpenWeatherMap API
---
## ๐งช How It Works
### ๐ Simulation Gameplay
- Each day, the system assigns a fixed **energy budget**.
- Users allocate energy to appliances.
- Game provides **feedback and efficiency score**.
### ๐ฆ Weather & Location Adaptation
- Uses OpenWeatherMap to fetch real-time:
- Sunlight intensity
- Wind speed
- Rain probability
- Updates strategy to reflect source potential.
### ๐ Optimization Algorithms
- **Green Strategy**: Maximize renewable source use
- **Cost Strategy**: Prioritize lowest-cost source
- **Balanced Strategy**: Blend based on availability and demand
### ๐งพ Prediction Hardware Flow
- **LDR** reads sunlight โ predicts solar output
- **Ultrasonic sensor** reads water level โ predicts hydro potential
- Readings sent to server via ESP32 serial/HTTP
- Dashboard updates predictions live
---
### ๐งฐ Clone the Repository
```bash
git clone https://github.com/your-username/E-Yantra.git
cd energy-game