WiFi Water Flow Meter

Created 5 project docs

Project Specification — WiFi Water Flow Meter

View Document

Status: Draft schematic complete / pre-layout. USB-C powered ESP32 WiFi controller for an external 12 V RS485 ultrasonic water-flow sensor i...

Design Notes and Power Budget — WiFi Water Flow Meter

View Document

USB-C 5 V input is protected by MP5016 eFuse and monitored by TUSB320 Type-C controller. SYS_5V feeds a TPS62162 3.3 V / 1 A buck regulator ...

Firmware Starter — ESP32-WROOM-32 Water Flow Meter

View Document

MCU: ESP32-WROOM-32 Framework: Arduino via PlatformIO

Board Bring-Up Plan — WiFi Water Flow Meter

View Document

Current-limited USB-C 5 V supply or bench supply capable of 3 A. Multimeter and oscilloscope.
Show 1 More
Completed the schematic for the WiFi water flow meter: USB-C input protection/current detection, 3.3 V buck, firmware-controlled 12 V boost, ESP32-WROOM-32, RS485 sensor interface, UART programming header, reset/boot, LEDs, and support passives are all wired. Functional ERC/passive/component checks came back clean; remaining broad review warnings are schematic readability/label-placement cleanup items, not functional connectivity errors.
Created project files:
Open items:
  • Confirm the exact ultrasonic sensor current draw and Modbus register map.
  • Before PCB layout, clean up schematic visual label/placement warnings.
  • For long outdoor/industrial RS485 cables, consider upgrading to a dedicated RS485 surge TVS array.
Suggested next steps:
  1. Clean up schematic readability.
  2. Set board size/stackup and place components with ESP32 antenna keepout.
  3. Route PCB and run DRC/PI checks.
  4. Update firmware once the sensor datasheet/register map is known.
Clean, constrain and layout
Clean schematic readability
Create layout constraints
Place PCB components
Harden RS485 protection
Check BOM manufacturability

Refine this doc
Ask about this doc
Project Specification — WiFi Water Flow Meter
Project Overview
Status: Draft schematic complete / pre-layout.
USB-C powered ESP32 WiFi controller for an external 12 V RS485 ultrasonic water-flow sensor intended for a 3/4 inch PVC pipe. The board provides protected USB-C 5 V input, a protected 5 V system rail, 3.3 V logic, a firmware-controlled 12 V sensor rail, RS485 communication, programming access, reset/boot controls, and status LEDs.
Intended Use
  • Prototype or production-intent controller board for a packaged ultrasonic flow sensor, not raw ultrasonic transducers.
  • External sensor is assumed to clamp/mount to 3/4 inch PVC and provide RS485 data, likely Modbus RTU.
  • Device reports flow rate and totalized volume over WiFi.
What the Device Should Do
  • Accept 5 V USB-C power.
  • Detect USB-C source current capability via TUSB320.
  • Power ESP32 and logic from a 3.3 V rail.
  • Generate 12 V for the external flow sensor under firmware control.
  • Communicate with the sensor over half-duplex RS485.
  • Provide UART programming/debug access.
  • Indicate power, WiFi status, and flow activity.
Main Features
  • USB-C 5 V sink input with MP5016 eFuse protection.
  • TPS62162 3.3 V / 1 A buck regulator.
  • LM27313 5 V to 12 V boost rail based on TI 5 V to 12 V reference circuit.
  • ESP32-WROOM-32 WiFi MCU module.
  • SP3485 3.3 V RS485 transceiver with termination, weak bias, and ESD clamps.
  • 4-position external sensor connector: +12V, GND, RS485_A, RS485_B.
  • 6-pin UART programming header plus RESET and BOOT buttons.
System Architecture

Diagram


USB-C node_5V Input MP5016 eFuse / OVP / Current Limit TUSB320 Type-C CC Current Detect SYS_5V TPS62162 Buck 3V3 Logic Rail LM27313 Boost, ESP32 Enabled 12V_SENSOR ESP32-WROOM-32 SP3485 RS485 Sensor Connector
Hardware Subsystems
Power Input and Protection
  • J1 USB4105-GF-A USB-C receptacle.
  • U6 TUSB320 configured as UFP sink: PORT to GND, ADDR to GND, EN_N to GND, VBUS_DET via 900 kΩ.
  • U1 MP5016 eFuse current limit set near 3 A, MODE tied low for ~5.75 V OVP clamp, DV/DT capacitor for soft start.
3.3 V Logic Rail
  • U2 TPS62162 fixed 3.3 V buck regulator.
  • L1 2.2 µH inductor, C6 10 µF input, C7 22 µF output.
  • 3V3 powers ESP32, TUSB320 I/O, RS485 transceiver, LEDs, and pull-ups.
12 V Sensor Rail
  • U3 LM27313 boost converter using 10 µH inductor, Schottky rectifier, 117 kΩ / 13.3 kΩ feedback, and 220 pF feed-forward capacitor.
  • BOOST_EN from ESP32 IO25 drives SHDN high to enable; R10 pulldown keeps the rail off during reset.
  • Designed around the LM27313 5 V to 12 V / ~250 mA reference circuit.
MCU / WiFi
  • U4 ESP32-WROOM-32 module.
  • EN has 10 kΩ pull-up and 1 µF RC delay plus reset button.
  • GPIO0 has 10 kΩ pull-up plus boot button.
  • UART0 is routed to J3 for programming.
RS485 Sensor Interface
  • U5 SP3485 at 3.3 V.
  • ESP32 UART2: IO17 TX to DI, IO16 RX from RO.
  • IO4 controls tied DE and /RE, with pulldown for default receive mode.
  • A/B routed to J2 with 120 Ω termination, 10 kΩ weak failsafe bias, and ESD clamps.
Interfaces and Connections

Table


InterfaceNets / PinsNotes
USB-C powerVBUS_RAW, GND, CC1, CC2No USB data used; DP/DN/SBU marked NC
Programming header J33V3, GND, ESP_TXD0, ESP_RXD0, ESP_BOOT_GPIO0, ESP_EN3.3 V UART only
Sensor connector J212V_SENSOR, GND, RS485_A, RS485_BFor external powered RS485 ultrasonic sensor
I2CIO21 SDA, IO22 SCLTUSB320 current detector, addr 0x60
Status LEDsIO26 WiFi, IO27 Flow, 3V3 Power LEDActive-high GPIO LEDs to GND
Power Tree and Power Budget

Table


RailLoadTypicalPeak / Design
3V3ESP32 WiFi module240 mA500 mA
3V3SP3485 + TUSB320 + LEDs~20 mA~60 mA
12V_SENSORExternal ultrasonic RS485 sensorassumed 100 mAdesign reference up to ~250 mA
SYS_5V input3V3 buck reflected + 12V boost reflected~0.6 A~1.4 A with 12 V at 250 mA
Important: USB-C without USB PD is always 5 V. Full 15 W operation requires a Type-C source advertising 3 A. Firmware should check TUSB320 current capability before enabling the 12 V boost at full load.
Manufacturing and Assembly Expectations
  • SMD passives are used by default.
  • Layout must keep the ESP32 antenna at a board edge with copper keepout.
  • Switching-regulator loops for U2 and U3 need compact layout and solid ground return.
  • RS485 connector should be placed at board edge; termination/bias may be made optional in layout if this board is not always an RS485 bus end.
Firmware-Relevant Hardware Requirements
  • Read flow via RS485/Modbus on UART2: RX IO16, TX IO17, DE/RE IO4.
  • Control 12 V sensor rail via BOOST_EN on IO25.
  • Read Type-C source capability from TUSB320 over I2C at address 0x60.
  • Drive WiFi LED on IO26 and flow LED on IO27.
  • Use UART0 programming header with BOOT/RESET buttons.
Physical Design Expectations
  • Board edge placement required for ESP32 antenna.
  • USB-C and sensor terminal should face outward for cable access.
  • Add test points in layout for VBUS_RAW, SYS_5V, 3V3, 12V_SENSOR, GND, RS485_A, RS485_B, ESP_EN, and BOOST_EN.
Important Design Decisions
  • Used a buck regulator for 3.3 V instead of an LDO to avoid ESP32 WiFi thermal margin issues.
  • Added Type-C current detection so firmware can avoid overloading default-current USB-C sources.
  • Made 12 V boost firmware-enableable and default-off.
  • Used a packaged RS485 ultrasonic sensor assumption; raw ultrasonic transducers would require a different analog front-end design.
Assumptions
  • External ultrasonic sensor accepts 12 V and draws <=250 mA peak.
  • Sensor protocol is Modbus RTU or similar register-based RS485.
  • Product may require a 5 V / 3 A USB-C source for full sensor power.
  • RS485 common-mode stress is moderate because this board powers the sensor and shares ground.
Change Notes
  • Initial schematic created with power input, regulators, ESP32, RS485 interface, sensor connector, LEDs, programming header, and support passives.
  • ERC functional checks currently show no open ERROR/WARNING items for the selected electrical/passive/component review set.
  • Project Overview

  • Intended Use

  • What the Device Should Do

  • Main Features

  • System Architecture

  • Hardware Subsystems

  • Power Input and Protection

  • 3.3 V Logic Rail

  • 12 V Sensor Rail

  • MCU / WiFi

  • RS485 Sensor Interface

  • Interfaces and Connections

  • Power Tree and Power Budget

  • Manufacturing and Assembly Expectations

  • Firmware-Relevant Hardware Requirements

  • Physical Design Expectations

  • Important Design Decisions

  • Assumptions

  • Change Notes

WiFi Water Flow Meter

WiFi Water Flow Meter thumbnail
USB-C powered ESP32 WiFi water-flow-meter controller for an external 12V RS485 ultrasonic sensor on 3/4 inch PVC pipe, with protected power input, 3.3V logic rail, 12V boost rail, programming header, reset/boot controls, and status LEDs.

Properties

Properties describe core aspects of the project.

Pricing & Availability

Distributor

Qty 1

Arrow

$3.95–$6.20

Digi-Key

$0.63

HQonline

$6.36–$6.38

LCSC

$6.89–$6.92

Mouser

$12.80

TME

$2.35

Verical

$5.02–$5.90

Controls