Skip to content

15. System Intergration

Modules

Power Module

Main controller

Display

Switch

IDea

Smart Water Purification System — Power Board Wiring Documentation Project Overview

This document explains the complete wiring and architecture of the power management section for the modular smart water purification and monitoring system.

The board is designed to:

receive power from a 12V battery and solar charging system, protect the electronics from faults and surges, distribute regulated power to the controller and sensors, provide stable power rails for high-power and low-power devices, support future modular expansion and maintenance.

The design is intended for implementation in KiCad and fabrication using professional PCB workflows.

  1. System Power Architecture

The system operates using three main power domains:

Power Rail Purpose 12V Rail Pump and solenoid valves 5V Rail ESP32, LCD, turbidity sensor 3.3V Rail Logic and low-voltage sensor signals

The power flow is:

Solar Panel ↓ Charging Module ↓ 12V Battery ↓ Power Protection Stage ↓ 12V Distribution Rail ↓ Buck Converter (12V → 5V) ↓ ESP32 + Sensors + LCD

  1. Power Input Section

Components Used Reference Component Footprint J1 Battery Input Terminal TerminalBlock_bornier-2_P5.08mm F1 2A Fuse Holder Fuseholder_5x20mm D1 SS54 Schottky Diode D_SMA D2 SMBJ12A TVS Diode D_SMB C1 470uF Electrolytic Capacitor CP_Radial_D10.0mm C2 100nF Ceramic Capacitor C_0805

3.Battery Input Terminal (J1)

Wiring Pin Connection Pin 1 Battery Positive Pin 2 Ground Purpose

The screw terminal provides a strong and removable connection point for the external 12V battery.

Why This Is Important easy field maintenance, secure wire connection, suitable for outdoor systems, supports thicker power wires. PCB Placement

Place at the edge of the PCB for easy external cable access.

  1. Fuse Section (F1)

Wiring Battery Positive → Fuse → Protection Diode Purpose

The fuse protects the PCB and connected devices from excessive current.

Why a Fuse Is Necessary

Without a fuse:

PCB traces may burn, wires may overheat, battery damage can occur, fire risk increases. Why 2A Was Selected

The 2A fuse supports:

ESP32 controller, LCD display, sensors, one solenoid valve, small pump loads.

The fuse value can later be adjusted depending on actual pump current.

PCB Placement

Place directly after the battery terminal.

  1. Reverse Polarity Protection (D1 — SS54)

Wiring Pin Connection Anode Fuse Output Cathode +12V Main Rail Purpose

Protects the board if the battery is accidentally connected backwards.

Why SS54 Was Selected

The SS54 Schottky diode provides:

low voltage drop, fast switching, high current capability, efficient protection. Why Reverse Protection Is Important

Incorrect battery polarity can destroy:

ESP32, sensors, buck converter, MOSFET drivers. PCB Placement

Place immediately after the fuse.

  1. Main 12V Rail

Net Name +12V_MAIN Purpose

This is the central power distribution line.

It powers:

pump, solenoid valves, buck converter input, future expansion modules. PCB Design Notes

Use thick traces:

1.5mm–2mm width recommended.

This minimizes:

voltage drop, heating, power loss.

  1. Surge Protection (D2 — SMBJ12A TVS)

Wiring Pin Connection Cathode +12V_MAIN Anode Ground Purpose

Protects the system against voltage spikes and transient surges.

Why TVS Protection Is Necessary

Inductive devices such as:

pumps, valves, long cables, solar systems,

can generate dangerous voltage spikes.

The TVS diode absorbs these spikes before they damage sensitive electronics.

PCB Placement

Place very close to the battery input.

8.Bulk Filtering Capacitor (C1 — 470uF)

Wiring Pin Connection Positive +12V_MAIN Negative Ground Purpose

Stabilizes the power rail and smooths voltage fluctuations.

Why Bulk Filtering Is Important

When the pump starts, sudden current draw may cause:

voltage dips, ESP32 resets, unstable sensors.

The large capacitor stores energy temporarily and stabilizes the rail.

Why 470uF Was Selected

Provides good filtering for:

pumps, solenoids, switching regulators. Voltage Rating

Minimum:

25V

  1. High Frequency Noise Capacitor (C2 — 100nF)

Wiring Pin Connection Side 1 +12V_MAIN Side 2 Ground Purpose

Filters high-frequency electrical noise.

Why This Capacitor Is Important

Switching regulators and motors generate:

EMI, fast spikes, switching noise.

The ceramic capacitor suppresses these high-frequency disturbances.

PCB Placement

Place close to the buck converter input.

  1. Buck Converter Section (LM2596 Module)

Components Used Reference Component Footprint J2 LM2596 Header PinHeader_1x04_P2.54mm_Vertical

  1. LM2596 Header Wiring

Pin Mapping Pin Connection IN+ +12V_MAIN IN- Ground OUT+ +5V OUT- Ground

  1. Purpose of the LM2596

The LM2596 converts:

12V → 5V

required for:

XIAO ESP32C3, LCD display, turbidity sensor.

  1. Why Use an External LM2596 Module

Instead of designing the switching converter directly on the PCB, an external module is used.

Advantages easier for beginners, reliable, replaceable, easier debugging, fewer switching noise problems, faster development. Why Switching Supplies Are Difficult

Buck converters require:

careful routing, inductor selection, thermal design, EMI management.

Using a module simplifies the design greatly.

  1. 5V Rail

Net Name +5V Powered Devices Device XIAO ESP32C3 LCD Display Turbidity Sensor

  1. Power Indicator LED

Components Used Reference Component Footprint LED1 Green LED LED_0805 R1 1k Resistor R_0805

  1. LED Wiring

+5V → R1 → LED1 → Ground Purpose

Shows when the board is powered correctly.

Why This Is Useful

Helpful during:

debugging, installation, maintenance, field servicing.

  1. Grounding Strategy

Recommended Method

Use:

Full Ground Plane

inside KiCad PCB Editor.

Why Ground Planes Are Important

Advantages:

lower electrical noise, easier routing, better ESP32 stability, improved signal integrity, better heat dissipation.

  1. Trace Width Recommendations

Trace Type Width Battery traces 2mm 12V rail 2mm Pump traces 2mm 5V rail 1mm Signal traces 0.25mm

  1. PCB Physical Arrangement

Left Side

Place: battery terminal, fuse, SS54 diode, TVS diode.

This keeps protection close to power entry.

Center Section

Place:

filtering capacitors, LM2596 module.

This becomes the power regulation zone.

Right Side

Place:

ESP32 section, LCD connectors, sensor connectors.

This isolates sensitive electronics from switching noise.

  1. Important Engineering Rules

Keep High Current Away From ADC Signals

Avoid routing:

pump traces, solenoid traces, buck converter switching lines,

near:

turbidity sensor analog lines, ESP32 ADC pins.

  1. Recommended Modular Philosophy

The PCB should support:

easy maintenance, removable modules, future upgrades, field repair.

Use:

screw terminals, JST connectors, socketed ESP32 modules.

  1. Final Power Distribution Summary

12V Devices

Powered directly from:

+12V_MAIN

Examples:

pump, solenoid valves. 5V Devices

Powered from:

+5V

Examples:

XIAO ESP32C3, LCD, turbidity sensor. 3.3V Devices

Generated internally by the XIAO ESP32C3.

Examples:

flow sensor logic, ESP32 GPIO logic.

  1. Conclusion

This architecture creates a professional modular embedded power system suitable for:

water purification systems, IoT monitoring, field deployment, solar-powered embedded systems, Fab Academy final project integration.

The design emphasizes:

electrical protection, modularity, maintainability, safety, clean power distribution, beginner-friendly fabrication.