ESP ZeroCode AI · Community

RainMaker Led Light

Cloud Enabled Led Light with Phone app companion which can be used to onboard and control the device. Should be able to control the light when in home if there is no internet.

esp32c3 rainmaker
Download the firmware Fork it in the studio

What it does

Manual

Device Type
Smart RGB LED bulb for Indian batten socket (B22 or equivalent); cloud-enabled via WiFi with local offline fallback

Hardware
chip: ESP32-C3 (WiFi + BLE) — gpios: gpio: 6 — function: Red LED PWM · gpio: 7 — function: Green LED PWM · gpio: 10 — function: Blue LED PWM — peripherals: name: Single RGB LED (5050) — type: Common-anode LED — pins: Anode=12V, Cathodes driven by MOSFET switches to GND — current: ~200mA @ full white · name: 12V External Power Supply — type: AC mains to 12V DC converter — location: Outside bulb (in ceiling/wall cavity) — specs: 300mA continuous headroom · name: 3.3V LDO Regulator — type: AMS1117-3.3 or equivalent — specs: 1A output for ESP32-C3 + logic · name: RGB LED Driver MOSFETs — type: 3x N-channel MOSFETs (AO3400A or equivalent) — specs: Each with 10Ω gate resistor for PWM switching at 12V

Inputs
kind: WiFi — label: Cloud commands — hardware: WiFi radio (built-in ESP32-C3) — behavior: Receives color, brightness, and preset commands from RainMaker app · kind: BLE — label: Provisioning — hardware: BLE radio (built-in ESP32-C3) — behavior: Scans for devices during pairing; SoftAP alternative if needed · kind: Power switch — label: Mains wall switch — hardware: External (not on device) — behavior: Controls bulb on/off via 12V supply to the bulb board

Outputs
kind: RGB Light — label: Main output — hardware: Single RGB LED (5050), PWM-driven at 3-20kHz — behavior: Displays selected color/brightness, disco patterns, or provisioning feedback

Connectivity
stack: WiFi (802.11b/g/n) — transport: TCP/IP — purpose: Cloud commands, telemetry, OTA updates · stack: BLE (Bluetooth Low Energy) — transport: Bluetooth 5.0 — purpose: Provisioning and local control (future)

Commissioning
method: RainMaker BLE + SoftAP provisioning — instructions: User opens RainMaker app → Scan QR code or enter PIN — app guides through pairing. Bulb shows animated RGB pattern during provisioning. Once online, user can control color/brightness from app. Offline control works via power cycle (restores last state).

Business Logic
powerOnBehavior: Bulb powers on to the last known RGB color and brightness (stored in NVS). If first boot or factory reset, defaults to white (max brightness). — dayToDayOperation: User opens RainMaker app → adjusts R/G/B sliders or selects disco preset → bulb responds immediately if online, queued if offline. Disco patterns loop continuously until user changes mode or toggles power. Power cycle restores last static state or preset.

Factory Reset
trigger: Long press (if button added later) or factory-reset RainMaker device via app — effect: Clears WiFi credentials and NVS state; bulb reverts to white @ max brightness and re-enters provisioning mode on next boot.

Failure Modes
scenario: WiFi unavailable (offline) — behavior: Bulb retains last color/brightness via NVS. User toggles wall switch (power cycle) to recall state. App shows device as 'offline' but commands are queued. · scenario: 12V supply disconnected — behavior: Bulb powers off completely. Reconnecting power restores last state. · scenario: WiFi network lost during update — behavior: OTA update aborted; device reboots to previous firmware (rollback protection via esp-idf). · scenario: RainMaker cloud unreachable — behavior: Device polls via BLE/WiFi; if still offline after timeout, falls back to local NVS state. App reconnects when cloud returns. · scenario: ESP32 thermal throttle — behavior: PWM brightness capped to protect LED driver. App notifies user (optional). · scenario: MOSFET or LED short-circuit — behavior: Overcurrent protection via supply fuse or LDO thermal cutoff; bulb goes dark. User power-cycles to retry or contact support.

Power Management
batteryPowered: false — sleepMode: None (always-on WiFi + BLE for cloud responsiveness) — notes: Device draws ~50mA idle (WiFi + BLE active, LEDs off), ~200mA @ full-bright RGB. 12V supply sized for ~300mA continuous worst-case.

Published 2026-09-11
Built with ESP ZeroCode AI — describe a device, get production firmware.
Terms of Service · Privacy Policy