Skip to content
Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”₯ CRE8X 2.0 – Interactive LED Oil Lamp Controller

An ESP32-powered interactive LED oil lamp controller designed for the CRE8X 2.0 logo.
The system creates its own Wi-Fi hotspot and hosts a rich, underwater-themed web interface that allows users to control seven LED segments (C-R-E-8-X-2-0) in real time.

LED states are persistently stored, ensuring the lamp restores its previous state after power loss β€” perfect for exhibitions, installations, and interactive displays.


πŸ“Œ Features

  • 🌐 Standalone Wi-Fi Access Point (no router required)
  • πŸŽ› Web-based Control Panel (User & Admin modes)
  • 🌊 Animated Underwater UI (HTML/CSS/JS)
  • ⚑ 7-Channel Relay Control for high-power LED strips
  • πŸ’Ύ State Persistence using ESP32 Flash (Preferences)
  • πŸ”„ Real-time Updates without page refresh
  • πŸ“± Mobile & Desktop Compatible
  • 🎨 Individual LED segment control for each character

🧠 System Overview

How It Works

  1. ESP32 boots and creates a Wi-Fi Access Point
  2. User connects via phone/laptop to CRE8X-OilLamp network
  3. Web UI is served directly from ESP32
  4. Button clicks send HTTP requests to toggle relays
  5. LED states are automatically saved to flash memory
  6. On reboot, previous LED states are restored automatically

🧰 Hardware Requirements

Component Description
ESP32 Dev Board Main controller (ESP-WROOM-32 or similar)
7-Channel 5V Relay Module Controls 12V LED segments
12V LED Strip Cut into 7 segments (one per character)
12V Power Supply Adequate current rating (5A+ recommended)
Jumper Wires For connections
Common Ground Critical: ESP32 + Relay + Power Supply must share GND

πŸ”Œ Pin Configuration

ESP32 β†’ Relay Mapping

Character GPIO Pin
C GPIO 13
R GPIO 12
E GPIO 14
8 GPIO 27
X GPIO 26
2 GPIO 25
0 GPIO 32

πŸ”§ Wiring Instructions

Relay Control Side (Low Voltage)

ESP32 GPIO 13 β†’ Relay 1 (IN1)
ESP32 GPIO 12 β†’ Relay 2 (IN2)
ESP32 GPIO 14 β†’ Relay 3 (IN3)
ESP32 GPIO 27 β†’ Relay 4 (IN4)
ESP32 GPIO 26 β†’ Relay 5 (IN5)
ESP32 GPIO 25 β†’ Relay 6 (IN6)
ESP32 GPIO 32 β†’ Relay 7 (IN7)
ESP32 5V       β†’ Relay VCC
ESP32 GND      β†’ Relay GND

LED Power Side (High Voltage)

12V Power (+) β†’ Relay COM (Common)
Relay NO      β†’ LED Strip (+)
LED Strip (–) β†’ 12V Power (–)

⚠️ Important:

  • ESP32 and 12V power supply must share a common ground
  • Use NO (Normally Open) terminals on relays
  • Double-check polarity before powering on
  • Ensure adequate wire gauge for LED current

πŸ“‘ Wi-Fi Configuration

Setting Value
SSID CRE8X-OilLamp
Password None (Open Network)
ESP32 IP 192.168.4.1
Gateway 192.168.4.1
Subnet 255.255.255.0

πŸ’» Software Setup

Prerequisites

  • Arduino IDE (1.8.x or 2.x)
  • ESP32 Board Support installed
  • Required libraries:
    • WiFi.h (included with ESP32 core)
    • WebServer.h (included with ESP32 core)
    • Preferences.h (included with ESP32 core)

Installation Steps

  1. Install ESP32 Board Support

    • Open Arduino IDE
    • Go to File > Preferences
    • Add to "Additional Board Manager URLs":
      https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
      
    • Go to Tools > Board > Boards Manager
    • Search for "ESP32" and install
  2. Clone/Download This Repository

    git clone https://github.com/godragun/CRE8X-2.0---Interactive-LED-Oil-Lamp-Controller.git
  3. Open the Sketch

    • Open the .ino file in Arduino IDE
  4. Select Board & Port

    • Tools > Board > ESP32 Dev Module
    • Tools > Port > [Your ESP32 COM Port]
  5. Upload

    • Click the Upload button
    • Wait for "Done uploading" message
  6. Monitor Serial Output (Optional)

    • Tools > Serial Monitor (115200 baud)
    • Verify the ESP32 is creating the Access Point

🌐 Web Interface

User View

URL: http://192.168.4.1/

Features:

  • 🎨 Beautiful underwater-themed animated background
  • πŸ”˜ 7 toggle buttons for each character (C-R-E-8-X-2-0)
  • 🟒 Visual feedback showing ON/OFF states
  • πŸ“± Responsive design for mobile and desktop
  • 🌊 Smooth CSS animations

Admin Panel

URL: http://192.168.4.1/admin

Additional controls:

  • πŸ”„ Master Reset - Turn all LEDs OFF
  • ⚑ Quick Patterns - Preset lighting configurations
  • πŸ”§ System Status - View ESP32 info and uptime

πŸš€ Usage Guide

  1. Power on the ESP32
  2. Connect to Wi-Fi:
    • Open Wi-Fi settings on your device
    • Connect to CRE8X-OilLamp (no password)
  3. Open Web Browser:
    • Navigate to http://192.168.4.1/
  4. Control LEDs:
    • Click individual character buttons to toggle LEDs
    • LED states are saved automatically
  5. Admin Features:
    • Visit /admin for advanced controls

🎨 Customization

Change Wi-Fi Credentials

Edit in the code:

const char* ssid = "CRE8X-OilLamp";  // Change SSID here
const char* password = NULL;          // Set password (or keep NULL for open)

Modify Pin Assignments

Update the pin definitions:

const int pinC = 13;  // Change GPIO pins as needed
const int pinR = 12;
// ... etc

Customize Web UI

The HTML/CSS/JS is embedded in the sketch. Look for the handleRoot() function and modify the HTML string.


πŸ› Troubleshooting

Problem Solution
Can't find Wi-Fi network Check serial monitor; verify ESP32 booted successfully
LEDs don't turn on Verify relay wiring; check 12V power supply; test relay manually
LEDs flicker Ensure common ground; use adequate power supply
Web page won't load Confirm connection to CRE8X-OilLamp; try 192.168.4.1
State not saving Check serial monitor for flash errors; ensure proper ESP32 partition scheme
Relays stuck ON Check GPIO pin assignments; verify relay module is 5V compatible

πŸ“Έ Demo

Note: Add photos/videos of your setup here!

![Lamp in Action](img/demo.gif)

πŸ›  Future Enhancements

  • Add color-changing RGB LED support
  • Implement animation patterns (fade, pulse, chase)
  • Mobile app integration
  • MQTT support for IoT integration
  • Voice control (Alexa/Google Assistant)
  • Brightness control via PWM

πŸ“„ License

This project is open-source and available under the MIT License.


πŸ‘€ Author

Godragun
GitHub: @godragun

Original Design Credits: @dinethmeditha


🀝 Contributing

Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.


⭐ Show Your Support

If this project helped you, please give it a ⭐!


πŸ“ž Contact

For questions or support, please open an issue on GitHub.


Happy Building! πŸ”₯✨

About

πŸ”₯ ESP32-powered interactive LED oil lamp with 7-channel relay control, underwater-themed web UI, and state persistence.

Resources

Stars

17 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages