WiFi Water Flow Meter Design

PCB layout placement is complete so far.
What I completed:
  • Resized the board to 100 mm × 80 mm with rounded corners.
  • Set a 4-layer stackup for better ESP32 RF grounding, cleaner power routing, and easier RS485/power routing.
  • Placed all 40 physical components on the top layer.
  • Put:
    • USB-C input/protection on the left edge.
    • ESP32 module near the top edge with antenna facing outward.
    • 12V boost converter near the sensor power connector.
    • RS485 interface near the RS485 field connector.
    • J2/J3 sensor connectors on the right edge.
    • UART programming header and LEDs along the bottom edge.
    • Decoupling/support passives close to their ICs.
Current review state:
  • Placement has no reported component overlap or board-boundary issue.
  • The remaining layout errors are airwires, which are expected because routing has not been performed yet.
What remains:
  • Review the placement visually.
  • If you approve the placement, the next step is PCB routing.
  • After routing, run final DRC and fix any routing/clearance issues.
Route with constraints
Check placement DRC
Adjust RS485 connector
Add mounting holes
Review placement view

Refine this doc
Ask about this doc
Project Specification: ESP32 WiFi Water Flow Meter
Project Overview
Status: Draft schematic implementation.
USB-C powered WiFi-enabled water flow meter interface for an external ultrasonic flow sensor clamped to a 3/4 inch PVC pipe. The board powers the sensor, reads its RS485 output, and transmits flow rate / total volume over WiFi using an ESP32-class module.
Intended Use
  • Prototype/production-intent controller board for a water flow monitoring node.
  • Intended to be installed near a 3/4 inch PVC pipe and connected to an external 12V ultrasonic RS485 flow sensor.
  • Powered from a 5V USB-C supply rated up to 15W.
What the Device Should Do
  • Accept 5V input from USB-C.
  • Generate 12V power for the external ultrasonic flow sensor.
  • Generate regulated 3.3V logic power for the ESP32 and RS485 interface.
  • Communicate with the sensor over RS485.
  • Report flow rate and totalized volume over WiFi.
  • Provide programming/debug UART access.
  • Provide power, WiFi, and flow activity LEDs.
Main Features
  • USB-C 5V power input with sink CC resistors.
  • Input overcurrent, reverse-current/reverse-polarity style protection, and ESD protection.
  • ESP32 WiFi module.
  • RS485 transceiver for external ultrasonic flow sensor.
  • Boost converter for 12V sensor rail.
  • 3.3V regulator for logic rail.
  • UART programming header, BOOT and RESET controls.
  • Status indicator LEDs.
System Architecture

Diagram


USB-C node_5V Input Input Protection Protected node_5V Rail 3.3V Regulator 12V Boost Converter ESP32 WiFi Module RS485 Transceiver External Ultrasonic Flow Sensor Status LEDs UART Programming Header
Hardware Subsystems
Power Input and Protection
  • USB-C sink input using 5.1k pull-down resistors on CC1/CC2.
  • Protected 5V rail feeds 3.3V logic regulator and 12V boost converter.
  • USB VBUS TVS and USB data/ESD protection are included.
Power Regulation
  • 3.3V regulator powers ESP32 and RS485 transceiver.
  • 12V boost converter powers the external ultrasonic sensor.
  • Decoupling and bulk capacitors are required at each IC and rail.
Compute and Connectivity
  • ESP32 module provides WiFi and application firmware.
  • Native UART pins connect to the RS485 transceiver.
  • Separate UART header supports firmware updates and diagnostics.
Sensor Interface
  • External ultrasonic flow sensor is assumed to be a 12V-powered RS485/Modbus-type device.
  • 4-wire sensor connector: 12V, GND, RS485 A, RS485 B.
  • RS485 bus includes termination/biasing/protection provisions.
User Interface and Debug
  • LEDs: power, WiFi status, flow activity.
  • BOOT and RESET buttons.
  • UART programming header exposes 3.3V, GND, TX, RX, EN, and BOOT where practical.
Interfaces and Connections

Table


InterfaceSignalsNotes
USB-C inputVBUS, GND, CC1, CC25V sink, no USB-PD controller assumed
Sensor connector+12V, GND, RS485_A, RS485_BExternal 3/4 inch pipe ultrasonic flow sensor
UART programming3V3, GND, TX0, RX0, EN, BOOT3.3V logic only
LEDsPOWER, WIFI, FLOWGPIO-driven status outputs
Power and Runtime Expectations
  • Source: USB-C 5V external adapter/source.
  • No battery operation required.
  • Peak system input current must stay below the requested 15W budget.
Power Tree and Power Budget
Preliminary budget used for component sizing:

Table


RailLoadTypicalPeak
3.3VESP32 WiFi module240 mA500 mA transient
3.3VRS485 transceiver2 mA60 mA transient/loaded bus
3.3V3 status LEDs6-15 mA15 mA
12VExternal ultrasonic flow sensor50 mA assumed100 mA assumed
Estimated peak input current from 5V:
  • 3.3V rail via LDO/buck-like budget: about 575 mA peak downstream.
  • 12V boost at 100 mA, 85% efficiency: about 282 mA from 5V.
  • Total peak input estimate: about 0.86 A, below 3 A / 15 W USB-C capability.
Assumption: exact ultrasonic sensor current was not provided; 12V boost and input protection are sized with margin for at least 100 mA sensor peak.
Manufacturing and Assembly Expectations
  • Default implementation uses SMD components suitable for assembled PCB production.
  • Use a board-edge ESP32 antenna keepout in layout.
  • Include test points for 5V, 3.3V, 12V, GND, UART, and RS485 where layout proceeds.
Firmware-Relevant Hardware Requirements
  • ESP32 firmware reads RS485 sensor data, likely via Modbus RTU or vendor UART protocol.
  • Control RS485 DE/RE with one GPIO.
  • Drive WiFi and flow activity LEDs from GPIO.
  • Support UART programming/debug header.
Physical Design Expectations
  • ESP32 antenna must face a board edge with copper keepout.
  • USB-C connector should be board-edge accessible.
  • Sensor connector should be board-edge accessible and clearly labeled.
Important Design Decisions
  • Use ESP32 module rather than bare ESP32 chip for RF reliability.
  • Use RS485 transceiver between ESP32 and sensor; do not connect RS485 directly to MCU pins.
  • Generate sensor 12V locally from the 5V USB input.
  • Use 3.3V logic throughout the ESP32/RS485 side.
Assumptions
  • External ultrasonic sensor accepts 12V supply and communicates over half-duplex RS485.
  • Sensor protocol is Modbus RTU or similar; firmware can be adapted after sensor datasheet is known.
  • USB-C source provides enough current for 12V sensor boost and ESP32 WiFi peaks.
  • No USB data connection to ESP32 is required; programming is via UART header.
Change Notes
  • Initial specification created from user request.
  • Project Overview

  • Intended Use

  • What the Device Should Do

  • Main Features

  • System Architecture

  • Hardware Subsystems

  • Power Input and Protection

  • Power Regulation

  • Compute and Connectivity

  • Sensor Interface

  • User Interface and Debug

  • Interfaces and Connections

  • Power and Runtime Expectations

  • Power Tree and Power Budget

  • Manufacturing and Assembly Expectations

  • Firmware-Relevant Hardware Requirements

  • Physical Design Expectations

  • Important Design Decisions

  • Assumptions

  • Change Notes

ESP32 WiFi Water Flow Meter

ESP32 WiFi Water Flow Meter thumbnail
USB-C powered ESP32 WiFi water flow meter interface for a 3/4 inch PVC ultrasonic RS485 flow sensor, including 12V sensor power, 3.3V logic power, protection, status LEDs, and programming/reset support.

Properties

Properties describe core aspects of the project.

Pricing & Availability

Distributor

Qty 1

Arrow

$6.54–$8.31

Digi-Key

$13.73–$13.91

HQonline

$2.93–$3.23

LCSC

$11.74–$12.21

Mouser

$20.84–$20.92

TME

$9.20

Verical

$6.55–$8.26

Controls