eng-ahmad-abusaif

/

All changes saved

0

0

Files

Schematic

PCB

Log InSign Up

Smart Home Relay Board Overview

flux

0:56

Here’s a block-by-block walkthrough of the ESP12-F Relay Board schematic you provided, showing its purpose, components, and signal flow. All component mentions are linked to Flux searches so you can inspect footprints, specs, or swap parts.

1. AC Input & Protection


ComponentFunction
2-Position Screw TerminalAC mains in
696105003002 (F1)Fuse for over-current protection
MOV-07D471KTR (Z1)Surge transient suppression
CC1H103ZA1ED3F4D1100 (U2)EMI/RFI common-mode choke
865090368008 (C1)AC-line X-cap, noise attenuation
Flow: AC → fuse → MOV & EMI filter → relay contacts (see section 4).

2. Isolated 5 V DC Supply


ComponentFunction
HLK-PM01 (PS1)220 VAC→5 VDC isolated module
MLCC 0.1 µFHigh-frequency bypass at module VIN
MLCC 10 µFBulk decoupling at VIN and VOUT
Notes: HLK-PM01 provides up to ~300 mA; keep it clear of hot parts, and use proper creepage distances.

3. 3.3 V Regulator & Decoupling


ComponentFunction
NCP176BMX330TCG3.3 V LDO (500 mA)
MLCC 10 µFInput & output bulk decoupling
MLCC 0.1 µFLocal high-freq bypass at ESP module
This clean 3.3 V rail powers the ESP-12F and logic.

4. ESP-12F Microcontroller


ComponentFunction
ESP-12F fZ1a (U3)Wi-Fi SoC; runs firmware to drive relays
10 kΩ pull-ups / pull-down resistorsBias EN, RST, GPIO0, GPIO2 (high), GPIO15 (low)
UART header (unpopulated)Serial flash/program
Boot-mode caps & jumpersEnsure normal boot from flash
Key nets:
  • 3V3 → VCC pin
  • GND → module GND
  • EN, RST, GPIO0, GPIO2, GPIO15 bias resistors to set boot mode
  • TXD/RXD → programming header

5. Relay-Driver Stage


ComponentFunction
BC547CTA (Q1–Q4)NPN switches coil current
Generic resistors (~4.7 kΩ–10 kΩ)Base current limit
1N4007W (D1–D4)Flyback diodes across coils
LED THT (D5–D8)Channel ON indicators
Signal flow: GPIO → resistor → transistor base → coil to 5 V → transistor → GND.

6. Relay & Load Outputs


ComponentFunction
SRD-05VDC-SL-C (K1–K4)SPDT relays switching mains to loads
282836-3 (J2–J5)Screw terminals for switched AC outputs
Each relay’s COM tied to incoming AC; NO/NC routes to load connectors.

7. Firmware & Functionality
  • ESP-12F runs user code (e.g., MQTT, HTTP API) to toggle GPIOs.
  • Status LEDs reflect relay states.
  • UART for debug or OTA bootloader support.

8. Trade-offs & Optimizations
  • Mechanical relays: reliable and easy but noisy and wear out (~100 k cycles). Consider SSRs for silent, long-life switching.
  • HLK-PM01: compact but limited current. For >300 mA, use a discrete isolated buck + transformer or larger certified module.
  • BC547 drivers: simple; MOSFET low-side drivers can reduce power loss if switching DC loads.

9. Challenges & Considerations
  • Creepage/clearance: maintain ≥4 mm between mains and low-voltage.
  • EMC: ensure filter caps and board shielding don’t detune the Wi-Fi antenna.
  • Inrush currents: lamp loads may exceed fuse rating—NTC inrush limiters can help.
  • Boot stability: clean bias resistor layout near ESP pads prevents stray capacitance mis-boots.

10. Future Enhancements
  • Zero-cross/dimming: add optocoupler ZCD for AC-phase control.
  • Current sensing: integrate shunt + ADC for per-channel power monitoring.
  • Solid-state relays: reduce acoustic noise and increase switching speed.
  • Modular I/O expander: drive >4 channels with I²C GPIO expanders.

This schematic cleanly separates mains protection, power conversion, control logic, and load switching. Its modular approach makes swaps (ESP→ESP32, relays→SSRs) straightforward. Let me know if you’d like to update any section in your Flux project!
Use SSRs
Define net classes
Add inrush limiter
Integrate zero-cross
LDO dissipation
288 days

​
Sign up to send

To get started, talk to Flux or create a New Document.

Reviews

Documents

    Documents are markdown text files which describe project goals, capture details, or even simulation outputs.

    Assets

    Assets are files uploaded to this project which can be used in various ways.

    Smart Home Board thumbnail
    Welcome to your new project. Imagine what you can build here.

    Properties

    Properties describe core aspects of the project.

    Pricing & Availability

    Distributor

    Qty 1

    Arrow

    $2.45–$4.70

    Digi-Key

    $3.93–$10.77

    LCSC

    $11.28–$12.14

    Mouser

    $6.87

    TME

    $4.32

    Verical

    $2.36–$4.93

    Controls

    Welcome 👋

    Flux helps you build PCBs faster with an AI teammate!

    Create your account to collaborate, stay updated, fork your own version, and get instant answers from our AI agent.

        Introducing AI Placement!
        AI Placement Demo

        AI-Powered Component Placement

        Let AI place your components intelligently. AI Placement analyzes your schematic and positions components for optimal routing, signal integrity, and board density.

        From Schematic to Layout in Seconds

        Skip the tedious manual placement. AI Placement generates a starting layout you can refine, saving hours of repetitive work on every new design.

        Works With Auto-Layout

        Pair AI Placement with Auto-Layout for a complete AI-driven PCB design flow — from component placement through trace routing, all with one click.

        Try it