WiFi Water Flow Meter Design

6:35

Thought for 9 sec

Thought for 8 sec

Thought for 6 sec

Thought for 15 sec

Thought for 9 sec

Thought for 5 sec

Thought for 2 sec

Read schematic.

Thought for 5 sec

Thought for 5 sec

Thought for 8 sec

6/7 Create firmware starter project file with real ESP32 RS485/Modbus code

Thought for 55 sec

Thought for 7 sec

7/7 Run review, fix violations, and document remaining assumptions

Thought for 5 sec

Completed design checks — found 108 issues.

Read schematic.

Thought for 20 sec

Thought for 8 sec

7/7 tasks completed.

Thought for a moment

Complete: I created and wired the full schematic for the USB-C powered ESP32-S3 WiFi water flow meter, including 3.3 V buck regulation, 12 V boost sensor power, MAX3485 RS485 interface, USB-C protection/CC resistors, reset/boot circuitry, UART header, and status LEDs. Review returned no ERROR/WARNING/OPEN ERC issues.
I also created Design Notes with the architecture, power budget, assumptions, and pin map, plus Firmware Starter with PlatformIO/Arduino Modbus RS485 starter code. The main remaining assumption is the exact ultrasonic sensor’s Modbus register map; update the firmware once the sensor datasheet is chosen.
Schematic is ready for layout. Want me to proceed with board sizing and component placement?
Size the board and perform placement

0:25

Thought for 20 sec

Thought for a moment

I’ll size the PCB first, set an appropriate stackup, then place components by functional block with the ESP32 antenna at an edge, USB and sensor connectors on board edges, and decoupling/power passives near their ICs. After placement I’ll run a DRC review and adjust if needed.

7:48

Thought for 2 sec

1/4 Inspect current PCB layout state and dimensions

Thought for 3 sec

Completed 3 design checks — found 108 issues.

Read schematic.

Read layout.

Thought for 5 sec

2/4 Set board size and stackup before placement

Thought for 5 sec

Editing board size.

Thought for 8 sec

3/4 Place components with ESP32 antenna and connector constraints

Thought for 10 sec

Thought for 1 sec

Thought for 7 sec

Thought for 3 sec

Thought for 4 sec

Thought for a moment

Thought for 8 sec

Thought for 9 sec

Thought for 3 sec

Thought for 16 sec

Thought for 34 sec

Thought for 21 sec

Thought for a moment

Thought for 13 sec

Thought for a moment

Thought for 1 min 7 sec

Thought for 11 sec

Thought for 28 sec

Thought for 8 sec

Thought for a moment

Thought for 24 sec

Thought for 11 sec

Thought for 8 sec

Thought for a moment

Thought for 7 sec

Thought for a moment

Thought for 5 sec

Thought for a moment

Thought for 4 sec

Thought for 8 sec

Thought for 4 sec

4/4 Run post-placement DRC and fix placement issues

Thought for 6 sec

Completed design checks — found 95 issues.

Read layout.

Thought for 5 sec

4/4 tasks completed.

Thought for a moment

Done. I resized the PCB to 100 × 80 mm with rounded corners and a 4-layer stackup, then placed all components by functional block.
Placement is clean: ESP32 is at the top edge with antenna overhang, USB-C is on the left edge, the sensor terminal is on the right edge, power stages are grouped, and user-facing LEDs/buttons/header are accessible. The only review errors now are expected unrouted connections because routing has not been performed yet.
Ready for routing when you are.
Yes route board
Set routing rules
Check antenna keepout
Review placement details
Add mounting holes

Waiting for input

Refine this doc
Ask about this doc
Design Notes — ESP32 WiFi Water Flow Meter
Architecture
USB-C 5 V input powers two rails:
  • VBUS_RAW from USB-C VBUS pins.
  • 5V_SYS after resettable fuse F1.
  • 3V3 generated by U2 TPS560430X3FDBVR buck regulator for ESP32-S3 and MAX3485 logic.
  • 12V_SENSOR generated by U3 LM27313 boost converter for the external ultrasonic flow sensor.
The external sensor connects on J2:

Table


J2 PinNetFunction
112V_SENSORSensor 12 V supply
2GNDSensor return/reference
3RS485_ARS485 A / non-inverting
4RS485_BRS485 B / inverting

Selected Active Components


FunctionDesignatorPartKey Datasheet Basis
WiFi MCUU1ESP32-S3-WROOM-1-N16R83.0–3.6 V supply, 0.5 A external supply requirement, native USB on IO19/IO20
3.3 V railU2TPS560430X3FDBVR3.3 V buck, 600 mA, 12 µH/22 µF application values
12 V railU3LM27313XMFX/NOPB5 V to 12 V boost example with 10 µH, Schottky, 2.2 µF input, 4.7–10 µF output, 117 kΩ/13.3 kΩ feedback
RS485U4MAX3485AEASA+3.0–3.6 V supply, DE and nRE controls, failsafe receiver, 20 Mbps max
USB D+/D- ESDD2TPD2E2U06DCKRLow-capacitance USB 2.0 ESD array, placed at connector in layout
Power Budget
Assumptions used for component sizing:

Table


RailLoadCurrent
3.3 VESP32-S3 WiFi peak500 mA
3.3 VMAX3485 + LEDs50 mA
12 VExternal ultrasonic RS485 sensor100 mA
Estimated USB input current:
  • 3.3 V load: 3.3 V × 0.55 A / 0.88 / 5 V = 0.41 A.
  • 12 V load: 12 V × 0.10 A / 0.85 / 5 V = 0.28 A.
  • Total estimated operating input current: about 0.70 A, before startup/inrush margin.
F1 is a 1.85 A hold resettable fuse. This is adequate for the current budget with margin, but it is not intended to guarantee continuous 3 A draw. If the product must draw the full USB-C 15 W continuously, replace F1 with a higher-current eFuse/current limiter and add Type-C current advertisement detection.
Important Assumptions and Risks
  • The external ultrasonic flow sensor model is not specified. The schematic assumes a 12 V RS485/Modbus RTU sensor consuming up to 100 mA.
  • No USB-C PD controller is included. The design is a 5 V sink using 5.1 kΩ CC pull-downs; it should be powered from a USB-C 5 V adapter capable of at least 1.5 A.
  • The TPS560430 600 mA rating is close to the ESP32-S3 0.5 A peak supply requirement plus logic/LED loads. It is acceptable for this schematic, but a 1 A buck is recommended if expansion loads are expected.
  • RS485 termination R8 is populated as 120 Ω. If the external sensor or cable already terminates the bus, make R8 DNP or jumper-selectable in PCB/BOM.

ESP32 Pin Map


NetESP32-S3 Pin
USB_D_MINUSIO19
USB_D_PLUSIO20
RS485_TXDIO17
RS485_RXDIO18
RS485_DE_REIO16
BOOST_ENIO15
LED_WIFI_GPIOIO4
LED_FLOW_GPIOIO5
ESP_BOOTIO0
ESP_ENEN
UART0_TXDTXD0
UART0_RXDRXD0

    Architecture

    Selected Active Components

    Power Budget

    Important Assumptions and Risks

    ESP32 Pin Map

Documents

    Project Specification

    Design Notes — ESP32 WiFi Water Flow Meter

    Firmware Starter — ESP32-S3 WiFi Water Flow Meter

Assets

No assets added.

ESP32 WiFi Water Flow Meter

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

Properties

Properties describe core aspects of the project.

Pricing & Availability

Distributor

Qty 1

Arrow

$6.78–$9.00

Digi-Key

$13.75–$15.54

HQonline

$1.39–$1.43

LCSC

$12.63–$12.73

Mouser

$20.76–$20.96

TME

$1.18–$1.31

Verical

$7.56–$10.20

Controls