An open API service indexing awesome lists of open source software.

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.

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**.

![System Architecture](sys.png)

---

## ๐Ÿง  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`

![Energy Grid Game UI](./e.png)

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

![Weather Recommendation UI](./r.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