Looking for some feedback and constructive criticism on my latest board design. If you see anything, please let me know what i got right/wrong/ could've done differently.
Project description: Smart Light Switch: A PCB controlling a Wi-Fi-enabled light switch, allowing users to control lights remotely via a smartphone app.
1. Microcontroller (MCU):
Schematic:



Board:

Project description: Smart Light Switch: A PCB controlling a Wi-Fi-enabled light switch, allowing users to control lights remotely via a smartphone app.
1. Microcontroller (MCU):
- A microcontroller with Wi-Fi capability, such as the ESP8266 or ESP32. These chips handle both the processing and the Wi-Fi communication.
- AC to DC Converter: Converts the mains AC voltage (e.g., 120V or 240V) to a DC voltage suitable for the microcontroller (typically 3.3V or 5V).
- Voltage Regulator: Ensures a stable DC voltage to the MCU (e.g., an LDO or a buck converter).
- Relay: An electromechanical switch that controls the high voltage side (lights).
- Triac: A semiconductor device used for switching and controlling the AC load.
- Provides isolation between the low-voltage MCU circuit and the high-voltage AC circuit to protect the MCU.
- Decoupling Capacitors: Typically 0.1µF and 10µF capacitors near the power pins of the MCU for noise reduction.
- Bulk Capacitors: Larger value capacitors for stabilizing power supply (e.g., 100µF).
- Pull-up/Pull-down Resistors: Used for ensuring correct logic levels on inputs and outputs.
- Current-Limiting Resistors: Typically used with LEDs or other components that need current regulation.
- Flyback Diode: Protects the relay coil from voltage spikes.
- Rectifier Diodes: If designing an onboard AC to DC converter.
- Used to indicate the status of the switch (e.g., power on, Wi-Fi connected).
- Screw Terminals: For connecting the high-voltage AC wiring.
- Programming Header: For flashing the microcontroller during development.
Schematic:



Board:
