ESP32-WROOM-32
Compact Solar Smart Wall Switch
Überblick
An ultra-compact solar-powered smart wall switch module utilizing an ESP32 WROOM and a 1-channel relay for wireless home automation control.
Systemarchitektur
- SOLAR_PANEL_INPUT → MPPT_CHARGER_PMICPowerRaw solar panel output routed to MPPT charger input
- MPPT_CHARGER_PMIC → LI_ION_BATTERYPowerRegulated charging current to 18650 Li-ion battery pack
- LI_ION_BATTERY → BUCK_REGULATORPowerBattery voltage supplied to DC-DC step-down regulator
- BUCK_REGULATOR → MCU_MODULEPowerClean 3.3V power rail supplying the ESP32-WROOM module
- MCU_MODULE → LEVEL_SHIFTING_ISOLATIONGPIO3.3V control signal from ESP32 GPIO to optocoupler input
- LEVEL_SHIFTING_ISOLATION → RELAY_LOAD_SWITCHINGGPIOIsolated 5V switched drive signal for relay coil actuation
- MCU_MODULE → STATUS_LEDGPIOPWM/Data signal for status LED indication
- MPPT_CHARGER_PMIC → MCU_MODULEADCResistor divider networks for solar voltage and battery SoC monitoring
Stückliste
| Teilenummer | Typ | Komponente | Hersteller | Gehäuse | Menge | Datenblatt | Übereinstimmung |
|---|---|---|---|---|---|---|---|
| LL200-3.6-75 | POWER | Indoor Solar Panel 5V/6V Harvests ambient indoor light and converts to electrical energy | PowerFilm | Cells | 1 | Übereinstimmend | |
| CN3791 | POWER | CN3791 Solar MPPT Battery Charger Maximizes power harvest from solar panel and regulates Li-ion battery charging | CNC Tech | — | 1 | Übereinstimmend | |
| NCR18650B | POWER | 18650 Li-ion Battery Pack (3.7V) Stores harvested solar energy to guarantee >72 hours of standby autonomy | PANASONIC | - | 1 | Übereinstimmend | |
1 geprüfte Alternativen anzeigenprojects.detail.aiVerified | |||||||
| MP2307 | POWER | TPS63020 / MP2307 Buck-Boost Regulator Steps down battery/solar voltage to a clean 3.3V system rail | TE Connectivity | — | 1 | Übereinstimmend | |
| ESP32-WROOM-32 | MCU | ESP32-WROOM-32 Core system processor handling Wi-Fi/BLE connectivity and switch automation | Espressif Systems | Reel | 1 | Übereinstimmend | |
1 geprüfte Alternativen anzeigenprojects.detail.aiVerified | |||||||
| PC817 | MODULE | PC817 Optocoupler with MMBT2222A Transistor Safely translates 3.3V GPIO control signals to 5V relay drive while providing galvanic isolation | BRIGHT | — | 1 | Übereinstimmend | |
| SMM30A 250VAC | ACTUATOR | Songle SRD-05VDC-SL-C Relay (10A/250VAC) High-voltage and current load switching for wall switch mains circuits | Panduit | — | 1 | Übereinstimmend | |
1 geprüfte Alternativen anzeigenprojects.detail.aiVerified | |||||||
| WS2812B | MODULE | RGB Status LED (WS2812B / Dual-color LED) Provides visual feedback for Wi-Fi pairing status, system state, and switch position | WORLDSEMI CO.,LIMITED | sop-4 | 1 | Übereinstimmend | |
3 geprüfte Alternativen anzeigenprojects.detail.aiVerified | |||||||
Bauanleitung
Procurement & Preparation
- Source and inspect all Bill of Materials components including LL200-3.6-75 Indoor Solar Panel, CN3791 Solar MPPT Battery Charger, NCR18650B 18650 Li-ion Battery, MP2307 Buck Regulator, ESP32-WROOM-32, PC817 Optocoupler, MMBT2222A Transistor, Songle SRD-05VDC-SL-C Relay, and WS2812B RGB LED.
- Prepare the customized PCB workspace, ensuring ESD-safe grounding, clean soldering iron tips, flux paste, and lead-free solder wire.
Hardware Assembly & Wiring
- Solder the CN3791 Solar MPPT Battery Charger circuit onto the PCB, connecting the SOLAR_PANEL_INPUT interface (SOLAR_IN, GND) and attaching leads for the NCR18650B Li-ion battery (BAT+, BAT-).
- Integrate the MP2307 Buck-Boost Regulator to step down the battery/solar voltage, outputting a clean 3.3V system rail to power the ESP32-WROOM-32 module.
- Assemble the PC817 optocoupler and MMBT2222A transistor isolation circuit, wiring the RELAY_CTRL signal from the ESP32-WROOM-32 to the level-shifting stage, and connecting COIL_DRIVE and 5V power to the Songle SRD-05VDC-SL-C Relay.
- Mount and solder the WS2812B RGB Status LED, connecting LED_DATA to the designated ESP32 GPIO, along with 3.3V and GND power lines.
- Wire the analog telemetry lines, connecting SOLAR_ADC and BAT_ADC from the MPPT charger and battery nodes to the ESP32 analog-to-digital converter pins for remote power monitoring.
Firmware Setup
- Connect the ESP32-WROOM-32 module to a development computer via a USB-to-UART bridge adapter for flashing the firmware code.
- Configure the firmware source code with Wi-Fi/BLE credentials, GPIO mappings for RELAY_CTRL and LED_DATA, and ADC scaling factors for solar and battery monitoring.
- Compile and flash the firmware binary to the ESP32-WROOM-32 flash memory, verifying successful compilation and bootloader execution via the serial monitor.
Testing & Calibration
- Perform a power-on self-test (POST) using bench power supply set to 3.7V, checking that the MP2307 regulator outputs a stable 3.3V rail and the WS2812B LED lights up to indicate pairing status.
- Test wireless connectivity by initiating Wi-Fi pairing mode, connecting to the local network, and responding to smart home automation toggle commands.
- Verify relay actuation and galvanic isolation by sending remote switch commands from the ESP32, listening for the mechanical click of the Songle relay, and measuring continuity across the 10A/250VAC load terminals.
- Calibrate the solar energy harvest and battery telemetry by exposing the LL200-3.6-75 solar panel to indoor ambient light, and verifying that SOLAR_ADC and BAT_ADC readings match multimeter measurements in the firmware dashboard.
Dokument
Compact Solar Smart Wall Switch
An ultra-compact solar-powered smart wall switch module utilizing an ESP32 WROOM and a 1-channel relay for wireless home automation control.
Design Overview
| Item | Details |
|---|---|
| Product Type | Smart Wall Switch Module |
| Key Functions | High voltage and current load switching via 1-channel relay, ESP32 WROOM Wi-Fi and Bluetooth wireless control, Solar panel power supply with power management, GPIO level shifting for safe relay control, Power supply decoupling and status LED indication |
| Power Source | Solar Panel |
| Connectivity | WiFi, Bluetooth |
| Size | Ultra-compact (fits behind standard wall switches) |
| Environment | indoor |
| Difficulty | Intermediate |
| Est. Time | 4-6 hours |
System Architecture
Power Topology: Solar Panel -> MPPT Charger IC -> Li-ion Battery Pack -> Buck-Boost Regulator (3.3V for MCU/Logic) and Direct 5V Rail for Relay Coil via Isolated Driver
Module List
| Module ID | Type | Name | Function | Voltage |
|---|---|---|---|---|
| SOLAR_PANEL_INPUT | POWER | Indoor Solar Panel 5V/6V | Harvests ambient indoor light and converts to electrical energy | 5V-6V |
| MPPT_CHARGER_PMIC | POWER | CN3791 Solar MPPT Battery Charger | Maximizes power harvest from solar panel and regulates Li-ion battery charging | 3.7V-4.2V |
| LI_ION_BATTERY | POWER | 18650 Li-ion Battery Pack (3.7V) | Stores harvested solar energy to guarantee >72 hours of standby autonomy | 3.7V |
| BUCK_REGULATOR | POWER | TPS63020 / MP2307 Buck-Boost Regulator | Steps down battery/solar voltage to a clean 3.3V system rail | 3.3V |
| MCU_MODULE | MCU | ESP32-WROOM-32 | Core system processor handling Wi-Fi/BLE connectivity and switch automation | 3.3V |
| LEVEL_SHIFTING_ISOLATION | MODULE | PC817 Optocoupler with MMBT2222A Transistor | Safely translates 3.3V GPIO control signals to 5V relay drive while providing galvanic isolation | 5V |
| RELAY_LOAD_SWITCHING | ACTUATOR | Songle SRD-05VDC-SL-C Relay (10A/250VAC) | High-voltage and current load switching for wall switch mains circuits | 5V |
| STATUS_LED | MODULE | RGB Status LED (WS2812B / Dual-color LED) | Provides visual feedback for Wi-Fi pairing status, system state, and switch position | 3.3V |
Design Schemes
Solar MPPT with Isolated Relay Switching ★
Utilizes a dedicated solar MPPT charger with Li-ion storage, an ESP32-WROOM-32 wireless module, and an optically isolated relay driver for high-voltage safety.
Trade-offs: Higher component count and board complexity, but provides superior battery longevity, safety isolation, and reliable solar energy harvesting in indoor environments.
Key IC selection
main wireless microcontroller
- Need: Provide dual-core processing with integrated Wi-Fi and BLE for IoT wall switch control while maintaining low deep-sleep power consumption.
- Class: Wi-Fi + BLE SoC Module
- Shortlist: Espressif ESP32-WROOM series, Realtek RTL8710af module
- Pick: Select based on module certification (FCC/CE), flash size (4MB), and stock availability in distribution channels.
solar battery charger IC
- Need: Extract maximum power from a low-current indoor solar panel and safely manage single-cell Li-ion battery charging.
- Class: Switch-mode or Linear Solar MPPT Li-ion Battery Charger IC
- Shortlist: Consonance CN3791, Analog Devices LT3652
- Pick: Choose based on input voltage range matching the 5V/6V solar panel, quiescent current, and external component footprint.
system power buck-boost regulator
- Need: Maintain a steady 3.3V output as the Li-ion battery discharges (3.0V to 4.2V) or when solar input fluctuates.
- Class: Synchronous Buck-Boost DC-DC Converter
- Shortlist: Texas Instruments TPS63020, Monolithic Power Systems MP2145
- Pick: Select based on light-load efficiency (crucial for solar standby autonomy) and quiescent current.
Risk register
| ID | Area | Severity | Detail | Mitigation |
|---|---|---|---|---|
| r1 | power | high | Indoor ambient light energy harvesting may yield insufficient average current to offset ESP32 Wi-Fi idle and transmission power consumption, leading to battery depletion over time. | Implement aggressive duty-cycling and deep-sleep modes in firmware, optimize Wi-Fi beacon intervals, and ensure the indoor solar panel area and MPPT efficiency match worst-case winter lighting conditions. |
| r2 | thermal | med | Enclosed wall switch junction boxes lack active ventilation, which can trap heat generated by the relay coil and power regulation circuitry, impacting Li-ion battery lifespan. | Design adequate copper thermal relief around the power regulator and relay driver, and ensure the battery is physically separated or thermally isolated from high-dissipation components. |
| r3 | emi | high | Switching high-voltage AC loads via the mechanical relay in close proximity to the ESP32 antenna and sensitive analog lines can cause MCU resets or erratic wireless behavior due to EFT/surges. | Ensure proper PCB clearance and creepage distances between high-voltage AC traces and low-voltage DC sections, add snubber circuits across relay contacts, and include robust decoupling on the 3.3V rail. |
Key Components
8/8 modules matched to real parts. See the BOM tab for the full component table.
Indoor Solar Panel 5V/6V (LL200-3.6-75)
The candidate's MPN (LL200-3.6-75) exactly matches the primary MPN and is the correct solar cell component.
CN3791 Solar MPPT Battery Charger (CN3791)
The candidate matches the primary MPN CN3791 and is the correct integrated circuit component class for the solar MPPT ba
18650 Li-ion Battery Pack (3.7V) (NCR18650B)
Candidate 2 exactly matches the primary MPN (NCR18650B) specified in the module requirement.
TPS63020 / MP2307 Buck-Boost Regulator (MP2307)
The candidate MP2307 by TE Connectivity matches the primary MPN for the MP2307 buck-boost regulator component class.
ESP32-WROOM-32 (ESP32-WROOM-32)
Candidate 1 (ESP32-WROOM-32) matches the primary MPN exactly.
Build Summary
- Difficulty: Intermediate
- Estimated time: 4-6 hours
- Tools required: Digital Multimeter, Magnifying Glass, ESD Mat, Soldering Iron, Flux Core Solder, Isopropyl Alcohol
See the Build tab for the full step-by-step assembly guide.
Generated by YuanQi AI Design System · Query: ESP32 WROOM module connected to a 1 channel 5V relay module for switching high voltage/current loads. Includes power supply, level shifting or direct GPIO control, and necessary decoupling.