Readme.md
Markdown · 57 lines
# ⚡ ESP32-Strobe-Master
An ultra-precise, web-controlled ESP32 stroboscopic light generator engineered to exploit the [stroboscopic effect](https://www.google.com/search?q=stroboscopic+effect). Visually freeze, reverse, or manipulate the perceived rotation speed of spinning ceiling fans, water streams, vibrating strings, and mechanical equipment.
---
## 🌟 Key Features
* **Sub-Hertz Frequency Precision:** Micro-step tuning from 1.00 Hz to 200.00 Hz with 0.01 Hz resolution.
* **Microsecond Duty-Cycle Control:** Pulse widths down to 0.1% duty cycle to eliminate motion blur and deliver razor-sharp frozen frames.
* **Embedded Flash Web App:** Single-file HTML5/JS dashboard gzipped directly into ESP32 `PROGMEM`— zero external filesystem flashing required.
* **Real-time Canvas Physics Engine:** Integrated 2D optical illusion simulator to model fan RPM, blade counts, and temporal aliasing offline.
* **Live System Telemetry:** Real-time WebSocket streaming of free heap memory, CPU frequency, uptime, and hardware pin state.
* **Profile Manager:** Save, load, and delete custom preset profiles stored as JSON inside LittleFS flash memory.
* **Hardware Safety Guardrails:** Strict GPIO pin mapping that restricts output exclusively to safe PWM pins, protecting bootloader pins.
---
## 📐 How It Works
When a rotating object spins at frequency *f*<sub>target</sub>, flashing a high-intensity light at frequency *f*<sub>strobe</sub> produces temporal aliasing:
*f*<sub>observed</sub> = |*f*<sub>target</sub> - *k* · *f*<sub>strobe</sub>|
Where *k* is an integer harmonic.
| Condition | Visual Result |
| :--- | :--- |
| ***f*<sub>strobe</sub> = *f*<sub>target</sub>** | **Frozen Motion** – Blade illuminated in the exact same spatial orientation every turn. |
| ***f*<sub>strobe</sub> < *f*<sub>target</sub>** | **Slow Forward Crawl** – Blade illuminated slightly ahead on each pulse. |
| ***f*<sub>strobe</sub> > *f*<sub>target</sub>** | **Slow Reverse Crawl** – Blade illuminated slightly behind on each pulse. |
---
## 🛠️ Hardware Requirements & Circuit
### ⚡ Quick Setup vs. High-Power Setup
* **Minimal Setup (For Testing & Low-Light Demos):**
* For low light expermiments, connect a standard LED directly to an ESP32 GPIO pin with a 220 Ω current-limiting resistor in series. You can also test this without extra wiring by targeting the ESP32 onboard LED (typically **GPIO 2**).
* **High-Power Setup (Recommended for Freeze Effect):**
* To produce flash pulses bright enough to freeze larger targets (like ceiling fans or room lighting) without motion blur, use an external high-power LED driver circuit with a MOSFET.
---
## How to use it?
* Flash the firmware to your ESP32.
* Power on the board and connect to the Wi-Fi Access Point:
* SSID: ESP32-Strobe-Master
* Password: strobe1234
* Navigate to your ESP32's ip address, mostly [192.268.4.1](http://192.168.4.1) in any modern web browser.
## ⚠️ Safety Warning
When the stroboscopic effect visualizes a fast-spinning ceiling fan or mechanical power tool as stationary, the object is still rotating at full speed.
* Physical Danger: Never attempt to touch, clean, or obstruct moving blades or mechanical assemblies that appear frozen by strobe light.
* Photosensitivity Warning: High-brightness flickering light can trigger seizures in individuals with photosensitive epilepsy. Use caution and avoid direct eye exposure.
## 🏷️ License & Credits
### Distributed under the MIT License. Developed for makers, embedded systems engineers, and physics enthusiasts.