My DIY reverse-osmosis purifier now runs from an ESP32 controller. I can see its status in a local web interface and follow its readings in Home Assistant. This guide brings the build together: how to judge whether your purifier is a suitable candidate, choose the parts, assemble the board, install the firmware and connect the water system. It also covers the optional Water Purifier dashboard cards I have made for Home Assistant.
You can reuse suitable pumps, valves and filters from an existing purifier. You do not need to buy the same accessory brands as me. What matters is how those parts are powered, connected and controlled.
The board is a general-purpose RO control platform. The downloadable firmware is specific to the Youth Edition V2.3 board and the assembly configuration below. It is not a universal firmware for purifier boards or generic ESP32 development boards.
| Build detail | Configuration covered here |
|---|---|
| Water system | My 400 GPD, pump-driven, tankless RO installation, using 24 V DC loads |
| Main board | Youth Edition V2.3, with the assembly supplement in Step 3 |
| ESP32 module | ESP32-S3-WROOM-1U-N16R8: 16 MB flash, 8 MB PSRAM and an external antenna |
| Firmware download | 0.16.9, supplied as a compiled binary; the source code remains private |
| U7 monitor address | 0x44 on my PCB batch; 0x41 in the original design |
| Input circuits | AD1/AD2: 10 kΩ pull-ups; AD3 leak electrode: 470 kΩ pull-up to 3.3 V |
| Optional additions | TDS/temperature probes, flow meters, a matching display, UV and Home Assistant monitoring |
Before ordering or downloading: this release expects U7 at 0x44 and retains a voltage correction from my board. To use U7 feedback on the original 0x41 assembly, you need a matching build; a diagnostic scan or web setting does not change the compiled address. The voltage correction is not a calibration of your own board or its current readings. Contact me if your assembly differs.
Start at Step 1 if you are choosing parts. If you already have the matching assembled board, go to Windows firmware installation, then connector definitions. Once the hardware is ready, the separate Web setup tutorial covers the controls, and the enclosure assembly guide covers the printed case and fasteners.
Step 1 — Check whether your purifier is a suitable candidate
1.1 Identify the type of system
Start with the machine you own. Its brand, number of filter stages and membrane GPD rating do not establish controller compatibility.
| Existing system | Assessment |
|---|---|
| Modular RO, 24 V DC booster pump, separate valves and dry-contact pressure switches | Closest to my installation. Continue with the checks below. |
| Pump-driven RO with a pressurized storage tank | A possible adaptation. The firmware includes a pressure-tank mode, but this guide's working example is tankless. The tank arrangement needs separate commissioning. |
| RO with a fixed restrictor and a parallel flush bypass | Potentially suitable if powering the bypass opens the flush path and normal production retains restricted concentrate flow. |
| Passive RO using supply pressure and a mechanical shutoff | Not a direct controller replacement. Adding monitoring would be a different project. |
| Integrated purifier with a communicating pump, proprietary faucet or display bus | Needs model-specific investigation. Matching connectors are not enough. |
| AC pumps, unsupported DC voltages, heating/cooling, or an atmospheric tank controlled by level sensors | Outside the installation described here. |
Before unplugging the original controller, take photographs of its connections and label each cable. Sketch the water route from the inlet to the membrane, product outlet and drain. You will use both records when deciding what can be reused.
1.2 Read the power and load labels
- Read the power supply's DC output label. Record voltage, current rating and polarity; its 100–240 V AC input marking is not the voltage supplied to the board.
- Record the pump's voltage, rated current and control method. This example switches power to a conventional DC pump; it does not command a proprietary motor-control bus.
- Record each valve's coil voltage and power or current. Include the inlet valve, flush valve and any proposed UV equipment in the load list.
- Check startup-current information as well as steady operation. A shared 24 V label does not establish that the switching devices, connectors and power path can carry the load.
- Compare the complete load list with the final assembly's documented electrical limits. Leave missing values marked unknown.
My pump is labelled 24 V DC, 3 A. That is an example, not a rating for every pump this board can drive. The PCB's DC 24V MAX 5A marking does not mean five amps are available at each output. Select the pump, valves and UV unit to suit the load capacity of their individual switching paths as well as the supply.
1.3 Trace the waste-water and flush paths
The flush arrangement matters as much as the electrical ratings. My first machine test failed to produce water because I had reversed the flush command in firmware: the unrestricted path was open during production, so the membrane circuit could not build enough pressure.
The corrected arrangement works like this:
| Operating mode | SV2 command | Required water path |
|---|---|---|
| Producing water | Off | Concentrate still leaves through a restricted path. |
| Flushing | On | A larger path opens to increase flush flow. |
- Find the concentrate outlet from the RO membrane.
- Follow it to the drain, identifying any restrictor, combined restrictor/flush valve, or parallel bypass.
- Establish which path remains open with the flush valve unpowered.
- Confirm that powering the flush valve opens the larger path used by this control sequence.
SV2 off does not mean zero waste water. A normally closed valve that blocks the only concentrate outlet is not an equivalent replacement. Do not choose a valve using “normally closed” alone; its role in the plumbing must match. The earlier machine-test article explains the mistake in my installation.
1.4 Identify the switches and accessories
The reference installation uses two pressure switches with dry contacts:
- The feed-side switch tells the controller whether supply pressure is available.
- The demand-side switch tells it whether another production cycle is needed.
Record the switch terminal arrangement and contact state under both conditions. Check continuity only with the switch disconnected from powered electronics. A three-wire analogue pressure transducer cannot be substituted using the two-wire instructions below.
The board also needs the correct input conditioning. Its current firmware disables the ESP32's internal pull-ups and pull-downs, so an open switch cannot be assumed to produce a defined HIGH without the external circuit described in Step 3.
List any TDS module, temperature probe, flow meter or display you want to keep. For each one, identify its supply, signal voltage, pinout and protocol. Reusing the original screen or electronic faucet is optional and often requires more investigation than reusing a simple pressure switch.
1.5 Decide before ordering
Keep your power/load specifications, water-path sketch, switch types and intended board configuration together. Use them to record one of these conclusions before ordering:
- Close candidate: the electrical requirements, water paths and input types appear to match. Proceed to the exact board and firmware checks.
- Needs adaptation: a specific mismatch must be resolved, such as a different valve arrangement or unsupported sensor protocol.
- Outside this guide: the system requires a different control architecture or load voltage.
- Not enough information: collect the missing labels, specifications or wiring details first.
This is a screening process, not a brand-by-brand approval list. If you only want monitoring and your existing controller works well, replacing the entire controller may be more work than you need.
Step 2 — Get the correct board files
The hardware was designed by yuunt. Start with the Universal IoT Water Purifier Controller V2.3 project on OSHWHub.
- Find 青春版, meaning Youth Edition, and confirm revision V2.3. 标准版 means Standard Edition; it is not the firmware target covered here.
- Save a matching schematic, PCB layout and original bill of materials from that revision.
- Check that the controller module is ESP32-S3-WROOM-1U-N16R8, with 16 MB flash and 8 MB PSRAM. The external-antenna module also needs a suitable 2.4 GHz antenna and matching connector.
- Keep the original BOM together with this guide's assembly supplement. Some optional positions are omitted from the original BOM, and several values or configurations need to differ for this installation.
- Compare the 0.16.9 download in Step 5 with the assembly supplement below. Matching the PCB revision alone does not resolve the U7 address or input-circuit differences.
The bare board outline is approximately 100 × 75 mm. An enclosure needs additional room for connectors, cable bends, mounting and the antenna.
Need a PCB, parts or help with a different accessory?
I have spare PCBs and components from this project. If you would rather skip PCB fabrication or soldering, contact me to ask about bare boards, components or an assembled board. Tell me your country and what you need so we can discuss availability, compatibility, price and shipping.
You can also send photos of accessories you want to reuse or cannot find locally. Where the electrical interface allows it, I can help adapt the firmware for different sensors or controls. Some alternatives need wiring or circuit changes as well as code, so discuss the setup before buying them.
Step 3 — Separate essential materials from optional upgrades
Build the PCB from the Youth V2.3 BOM and the assembly supplement in Step 3.5. The list below covers the equipment that connects to it, separating basic operation from optional monitoring and controls.
Use the photos to recognise each type of part. You do not need the same accessory brands or model numbers: reuse suitable parts from your purifier or source equivalents that meet the electrical, plumbing and communication requirements below.
3.1 Essential hardware
These are the parts needed for the installation described here. Existing compatible parts can stay in the purifier; a new controller does not mean replacing the entire water circuit. Click any small photo to inspect it more closely.
3.2 Optional monitoring and interface additions
You can leave these out of the initial build and add them later. Disable absent accessories in the installation settings; their sockets are not requirements to fill every connector.
| Addition | What it adds and how to choose it |
|---|---|
![]() |
TDS and temperature: an acquisition module at U5 with matching probes for feed and product water. In my setup, each four-wire probe splits into two two-pin plugs: TDS and temperature. U5 uses a 3.3 V supply and the supported 9600-baud, 8N1 checksummed serial protocol. Matching only the connector or baud rate is insufficient. |
![]() |
Flow and volume: up to two 5 V pulse-output meters, FLOW1 for product water and FLOW2 for concentrate. Their signal must be compatible with the board input; each channel is calibrated separately. |
![]() |
Local screen: a compatible TJC serial display with 5 V power, 3.3 V-compatible UART logic and the matching Water HMI 102 or 201 project, communicating at 9600 baud, 8N1. You can operate the controller through the browser without a screen. The controller download does not include screen firmware; ask me for the matching screen project before ordering a display. |
| Home Assistant + MQTT broker | Monitoring and history on your local network. My optional Water Purifier cards provide full, small and medium dashboard views; see Step 9. This release publishes readings and status; MQTT does not remotely operate the pump or valves. |
The four-wire probe plug does not connect directly to a two-pin board socket. Identify its TDS and temperature pairs, then keep the feed-water pair on TDS1 + NTC1 and the product-water pair on TDS2 + NTC2. Step 6 lists the contacts. Wire colors are not standardized between suppliers.
3.3 Optional UV equipment
For this layout, the intended position is final filter → enclosed UV unit → faucet. UVC1 switches the power supply; it is not a constant-current driver for a bare LED. The firmware supports UV during automatic production in tankless mode, with U7 current feedback; manual flushing and output jogs leave it off.
Fit and check a UV unit according to its own filling and operating instructions, then use the Web tutorial to configure it. UV remains an optional part of this build. With UV disabled in a valid configuration, missing U7 feedback does not by itself block basic water production; enabling UV requires valid U7 feedback. This guide still follows the complete board assembly, rather than a separately tested reduced BOM. Electrical feedback reports power draw; it does not establish water-treatment performance.
3.4 Tools and finishing parts
For assembly, prepare a temperature-controlled iron, suitable tips, flux, fine tweezers, solder wick, magnification and a multimeter with manually selectable voltage and resistance ranges. Use rework equipment appropriate to the ESP32 module and small IC packages. A current-limited supply helps with staged power-up, but the limit must suit the circuit being tested.
For the Windows procedure, you also need a 3.3 V logic USB-to-UART adapter, three signal leads, a data-capable USB cable and a Windows PC. No ESP-IDF installation or source-code build is required when using a prepared binary package.
The display, neat enclosure and cable labels improve daily use. Proper insulation, secure connections and strain relief are already needed during testing. For my printed case, the enclosure guide lists the inserts, screw lengths and assembly sequence. Settle the connector and cable routes before finishing the case.
3.5 Apply the assembly supplement
The original BOM is a starting point. In the original schematic, U5 and several input-conditioning resistor positions are excluded from BOM export. Buying only that exported list can leave required input circuitry unpopulated.
| Area | Configuration for this guide | What to verify on your board |
|---|---|---|
| USB-C CC resistors R2/R3 | Each CC line needs its own 5.1 kΩ pull-down to GND; the original design lists 10 kΩ. | Order and fit the corrected values, then inspect both connections. |
| AD1/AD2 dry-contact inputs | Use the reference 10 kΩ pull-ups from AD1/AD2 to 3.3 V at R61/R62, with R21/R23 as 0 Ω series links. Leave the alternative pull-down positions R22/R24 unpopulated for this dry-contact configuration. | Check the fitted values and verify a stable HIGH with each contact open and LOW with it closed. These fitted resistor values and unpopulated positions are confirmed for my board; verify the same configuration on your own assembly. |
| AD3 resistive leak input | My installation uses a 470 kΩ pull-up between AD3 and 3.3 V, serving R63. This circuit requires R26 unpopulated, R25 = 0 Ω, C58 = 100 nF and D6. The two-wire probe connects AD3 to GND. | This analogue electrode configuration differs from the original 10 kΩ input pull-up. Verify dry, actual RO-water contact and recovery readings against the firmware thresholds. |
| U7 / UV monitor | Original PCB: 0x41. My PCB batch: 0x44. The downloadable 0.16.9 build expects 0x44; this difference was present in my PCB batch, not introduced by rework. | Match the firmware to the assembled address. A diagnostic scan does not retarget the driver, and the address cannot be changed in the web interface. This build also retains a separate voltage correction from my board; it does not calibrate another board or its current measurement. |
| U5 / TDS acquisition | Fit only the supported module and probe combination if adding TDS. The 3.3 V U5 interface uses 9600 baud, 8N1 and the supported checksummed frame protocol, not a generic Modbus driver. | Use the matching acquisition module and passive TDS/temperature probes. An arbitrary analogue TDS module or a different serial protocol needs adaptation. |
The CC resistor requirement follows USB-C sink behavior; see the Renesas USB Type-C explanation. It is a correction to the assembly, not proof that these resistors caused my earlier USB data-connection problem.
For AD3, the current firmware declares wet at 2,000 mV or below for 200 ms, and dry at 2,600 mV or above for 1,000 ms. These are fixed thresholds. ADC calibration converts measurements to millivolts; it does not automatically tune the thresholds for a different pull-up or probe. The interface's 470 kΩ label describes the documented configuration, not a measurement of the installed resistor. Record the actual dry/wet readings before relying on this input.
Proceed when: your board assembly matches the firmware configuration, including the pressure-switch inputs and U7 address.
Step 4 — Assemble and check the board in stages
Keep the pump, valves, UV unit and external sensors disconnected while assembling and first flashing. An empty output connector makes it much easier to distinguish a board fault from a wiring or load problem. Before adding components, soldering or changing connections at any stage, disconnect power and allow the supply capacitors to discharge.
4.1 Inspect the bare board and sort components
- Match the PCB revision to the schematic and arrange components by reference designator.
- Identify pin 1 and polarity using the component documentation and PCB pads. Faint printing on an IC is a reason to inspect more closely, not to guess its orientation.
- Separate intentionally unpopulated positions from missing parts using the assembly supplement.
- Photograph each area before taller connectors obscure the solder joints.
I damaged an ESP32 while troubleshooting a reversed U7. The rework failure article documents that mistake. Photographs taken after removing a failed IC are useful records, but they are not an orientation guide for installing a new one.
4.2 Build and check the power section
First identify DC1 and U22. In the original design, the DC barrel connector is center-positive, but its positive contact reaches U22 before the board's input stage. Check the fitted socket and adapter against this reference rather than assuming a plug that fits has the correct polarity.
| Connection | Original PCB definition |
|---|---|
| DC1 center contact, pad 1 | Raw DC positive; connected to U22 pad 2 |
| DC1 outer sleeve, pad 2 | GND; the socket's switched sleeve contact at pad 3 is also grounded |
| U22 pad 1 | GND |
| U22 pad 2 | Raw positive from DC1 |
| U22 pad 3 | Feeds the board's input protection/power stage |
U22 supports direct DC input or a power switch for the DC1 supply. Use the numbered pads in the front-side locator, not the order of pins on a loose switch:
| Power arrangement | Connection |
|---|---|
| Direct 24 V input through U22 | Connect supply +24 V to pad 3 and supply negative to pad 1/GND. Leave pad 2 unused and DC1 unplugged. |
| DC1 supply with a rocker switch | Connect the switch contacts between U22 pad 2 and pad 3. Closing them powers the board; opening them breaks the DC1 feed to the board input stage. |
| DC1 supply without a switch | A suitably rated permanent link between pads 2 and 3 completes the same power path. Install it with power disconnected. |
On the original board, pad 2 is the middle contact and pad 3 is the contact marked +. Pad 1 is GND, not the second switching contact. It can provide the negative connection for a compatible illuminated switch, but the lamp must suit 24 V DC and its terminals must follow that switch's own diagram. Choose a DC-rated switch and wiring for the connected load. Use one supply arrangement at a time.
- Assemble the input protection and regulator stages according to the matched schematic. Check diode orientation, polarized capacitors and regulator pinning.
- With power removed and capacitors discharged, inspect for bridges and check the supply rails for an unintended short. Record the meter mode and units; a continuity beep by itself is not a diagnosis.
- Apply the verified input supply with current limiting appropriate to this partial assembly. Keep loads disconnected.
- Measure the 5 V and 3.3 V rails against board GND and record the readings.
- Remove power and investigate if a rail is wrong, the supply enters current limit unexpectedly, or a component heats rapidly.
- After a successful check, disconnect power and let the capacitors discharge before continuing assembly.
Checkpoint: both regulated rails must be correct before fitting or powering the main controller. Do not use the ESP32 as a way to test an uncertain supply.
4.3 Fit the controller and download interface
- Fit the ESP32 module using the specified footprint and pad arrangement. Inspect the perimeter and address any bridging before power-up.
- Fit the boot/reset circuitry and UART0 connection needed for the download route in Step 5.
- Assemble the USB-C circuitry with the CC resistor correction. Do not assume that board USB and 24 V input may be powered together; that power-path arrangement still needs its own check.
- Fit the external antenna before running wireless firmware.
- Recheck the rails and inspect for unexpected heating with external loads still removed.
4.4 Complete drivers, monitors and input conditioning
- Fit the pump, valve and UVC switching circuits and the reference U6/U7 monitoring circuits. Check IC orientation, shunts, diode polarity and nearby solder bridges.
- Fit the AD1/AD2 and AD3 input components from the final supplement, including the positions that must remain empty.
- Fit connectors, checking their pad numbers against the schematic rather than relying on cable colors.
- Add optional acquisition hardware only when its exact identity and orientation are established.
- Inspect and clean the board as appropriate for the flux used, then allow it to dry before applying power.
The I²C and web diagnostics come after firmware installation. At this stage, the checks are physical inspection, continuity where appropriate and the unloaded power rails.
Step 5 — Install the firmware from Windows
The download below has passed file, signature and merged-image checks, including a download from the public link. I have not yet verified this exact package on a blank board using Windows Flash Download Tools. The steps follow Espressif's documentation. I will add the practical flashing record after assembling a spare board.
This is the first-install procedure for a blank or deliberately reinitialized board. If you are reinstalling a working controller, export its configuration and record its settings first. The merged image overwrites configuration regions; it is not an update that preserves settings. Later application updates will be released separately for the web interface. Do not upload this factory.bin through the web updater.
5.1 Download, extract and check the firmware
Download the Youth V2.3 first-install firmware v0.16.9 — ZIP, 1.3 MB
The ZIP contains exactly two files. Installation instructions stay on this page.
| File | Purpose |
|---|---|
factory.bin |
The merged first-install firmware, written once at 0x0. |
SHA256SUMS.txt |
The SHA-256 checksum of factory.bin; use it to check the extracted firmware. Do not flash this text file. |
| Package detail | This download |
|---|---|
| Firmware | 0.16.9 |
| Board | Youth Edition V2.3, with the assembly configuration in Step 3 |
| U7 configuration | 0x44, with the board-specific voltage correction described at the start of this guide |
| ESP32 module | ESP32-S3-WROOM-1U-N16R8, 16 MB flash and 8 MB PSRAM |
| Flash image settings | 16 MB / DIO / 40 MHz |
| Installation address | 0x0 |
| Partition layout | Layout 2, included in the merged image |
- Download the ZIP from the link above.
- In Windows File Explorer, right-click it and select Extract All. Put the two extracted files in a simple folder such as
C:\RO-controller. Work with the extractedfactory.bin, not a file still being viewed inside the ZIP. - Open
SHA256SUMS.txtin Notepad. Its 64-character value is the expected hash offactory.bin, not of the ZIP. - Open PowerShell and run the following command, adjusting the path if needed:
(Get-FileHash -Algorithm SHA256 "C:\RO-controller\factory.bin").Hash
Compare all 64 characters with the value in SHA256SUMS.txt; uppercase and lowercase letters represent the same hash. If they differ, stop and download/extract again. A match checks the file's integrity, not its compatibility with your hardware. Microsoft documents Get-FileHash here.
The merged image already includes the bootloader, partition table, initial OTA data and signed application. You do not need to find separate binaries or enter their individual addresses. This ZIP contains no ota.bin; future web-update files will have their own download and instructions.
5.2 Prepare Windows and find the COM port
- Download Flash Download Tools from Espressif's official tools page, extract the archive and open the supplied Windows executable.
- Connect the USB-to-UART adapter to the PC without connecting it to the board yet.
- Open Device Manager → Ports (COM & LPT). Note the port that appears, such as
COM5. Unplugging and reconnecting the adapter can help identify it. - If no port appears, check the USB cable and install the driver for the adapter's actual bridge chip from its manufacturer. A generic “ESP32 driver” is not a substitute for identifying that chip.
- Close serial monitors or other programs using the port before flashing.
Espressif's serial connection guide explains port identification and adapter drivers. In this procedure, the COM port belongs to the external adapter; it can appear even while the controller is unpowered.
5.3 Connect the adapter to UART0
Turn off board power before connecting the three signal wires. Use 3.3 V logic, not 5 V TTL or an RS-232 interface.
| USB-to-UART adapter | Youth V2.3 UART0 connection |
|---|---|
| TX | Board RX, GPIO44, connector pad 3 |
| RX | Board TX, GPIO43, connector pad 2 |
| GND | Board GND, connector pad 1 |
| VCC / 5 V / 3.3 V power output | Leave disconnected |
TX crosses to RX because each transmitter must feed the other device's receiver. The numbers refer to PCB connector pads, not the apparent left-to-right order of a loose cable.
- Connect TX, RX and the common GND as shown.
- Keep the pump, valves, UV and other loads disconnected.
- Power the board through its verified DC supply arrangement. Do not power it from the adapter's small 3.3 V output.
- Leave the board's native USB connection out of this route; simultaneous USB/24 V power behavior has not been established by these instructions.
The board has native USB hardware, but using it is a separate power-and-download configuration. Selecting USB in the tool while physically using UART0 does not switch the wiring for you.
5.4 Put the ESP32 into download mode
With the board powered:
- Press and hold BOOT.
- Press and release RESET/RST while continuing to hold BOOT.
- Release BOOT.
This holds GPIO0 low during reset so the ESP32-S3 enters its ROM download mode. A basic three-wire adapter will not automatically perform this sequence using DTR/RTS. See Espressif's boot-mode explanation.
If you opened a serial monitor to inspect the boot message, close it again before the next step so the flashing tool can use the port.
5.5 Enter the file and settings in Flash Download Tool
The tool's appearance varies by version. For the external UART route and the 0.16.9 merged image above, use the following setup:
| Field | Selection |
|---|---|
| Chip type | ESP32-S3 |
| Work mode | Develop |
| Load mode | UART |
| File row | Select the extracted C:\RO-controller\factory.bin |
| Address for that row | 0x0 |
| Row checkbox | Checked |
| Other file rows | Unchecked for this single merged-image procedure |
| COM | The adapter's port from Device Manager |
| BAUD | 115200 for this first attempt |
| Image parameters | Preserve the package's image header; keep DoNotChgBin selected where offered. |
| SPI parameters, if displayed | This image uses DIO / 40 MHz / 16 MB. Keep the image parameters rather than changing them to another board's defaults. |
- Select the chip, work mode and load mode in the launcher.
- In the download panel, choose the file, enter its address and enable that row.
- Check that exactly one file row is enabled, its file ends in
factory.bin, and its address is0x0. Neither0x1000nor the application-only offset0x20000is correct for this merged file. - Check the port and baud rate once more before starting. Develop is the tool's work mode here; the name
factory.bindoes not mean you should select its multi-device Factory mode.
Recent versions preserve the binary's SPI parameters by default; older interfaces may show more editable fields. Do not force different flash settings to make an unrelated binary load. The labels and controls are described in Espressif's Flash Download Tool manual.
You already have a merged image, so CombineBin is unnecessary. ERASE is not a normal first troubleshooting step: it clears flash contents. This procedure also requires no security eFuse, encryption or force options. Readers do not need the firmware's private signing key.
5.6 Write the image and restart normally
- Click START and leave the board powered and the cable connected while writing proceeds.
- Wait for the tool to report successful completion, and keep a screenshot of the result and file/address settings. A started progress bar is not a completed installation.
- If connection fails before writing starts, recheck the COM port, crossed TX/RX, common GND, board power and BOOT/RESET sequence. Keep the initial baud rate at 115200 while resolving it.
- Once writing succeeds, close or release the flashing tool's serial connection.
- Reset the board with BOOT released so it starts the installed application instead of returning to download mode.
Do not erase or change security settings in response to an unexplained compatibility or security error. First check that the module and package are the intended pair.
5.7 Check the first application boot
- Open a serial monitor on the same adapter at 115200 baud, 8 data bits, no parity, 1 stop bit, with hardware flow control disabled.
- Reset the board normally and inspect the startup output. Confirm that the application starts and reports 0.16.9.
- Watch for repeated resets or unexpected heating. Keep the loads disconnected while investigating either symptom.
- For an unconfigured board, read
SETUP: SSID=Water-XXXXXXandSETUP password=…from the startup log. Keep the generated password private. - Join that
Water-XXXXXXnetwork from a phone or computer using the logged password. Stay connected if it reports no internet, then openhttp://192.168.4.1in the browser. The dashboard opens under/ui/. - This build does not require a separate administrator token to open the local dashboard. The password above protects the setup Wi-Fi network. Keep the management interface on a trusted local network and do not port-forward it to the internet.
- Use the connection and read-only diagnostics instructions in the web tutorial. Keep operation stopped; complete Step 6 here before the configuration and operating checks in Step 7.
- In board diagnostics, verify supply readings and the required monitor/input feedback before connecting loads. A successful flash does not prove the analogue, power or input circuits work.
If the controller is already connected to your home Wi-Fi, use the address shown by your router or startup log instead of 192.168.4.1. Connect the computer or phone to the same local network.
If the web interface explicitly shows a pending update confirmation, handle it before attempting to save Wi-Fi or installation settings. The current OTA flow allows Keep this version after the initial startup check, from ten seconds after boot and within the three-minute confirmation window. A blank-board factory installation may not enter that state; do not look for a confirmation button that is not shown.
Checkpoint: the board boots the intended version, remains stable without loads and can be reached through the documented setup route. Do not treat a COM port appearing in Windows as proof that the application is running.
Optional: use the command line instead
If you already use Espressif's current esptool, the equivalent write command for this same merged package is:
py -m esptool --chip esp32s3 --port COM5 --baud 115200 write-flash 0x0 factory.bin
Run it from the folder containing the file and replace COM5 with your actual port. This uses the same UART wiring and boot-mode sequence. Follow the official esptool installation and write-flash documentation; the command is an alternative to the Windows graphical tool, not an additional step after it.
Step 6 — Wire the purifier using the connector pad numbers
Disconnect power before changing wiring. Keep the original-controller photographs and cable labels beside the schematic. Before opening pipework, shut off the feed, isolate any storage tank and relieve pressure using the purifier’s normal service procedure.
Connect the input and optional sensor circuits first. Prepare and label the load leads, but leave the pump, valve and UV plugs disconnected until the unloaded checks in Step 7 are complete.
The overview below brings the external devices together. It shows two views of the same board, with one line representing a cable bundle. Optional accessories carry an OPTIONAL label; the USB-to-UART adapter is for service. Use the printed pad mappings and the locator images below for the individual contacts; a line ending on a connector housing does not identify a particular pin.
Complete wiring overview. Click to enlarge and read the cable labels. The U22 callout refers to the direct-input and rocker-switch connections in Step 4.2. This is an electrical connection overview, not a water-plumbing diagram.
Locate the connectors and read the pad numbers
Start with the two locator images below to find the connectors and pad 1 on the board. The tables in the following sections specify what connects to each numbered pad. Confirm the numbers against the matching PCB files and check continuity on the unpowered board. These are not cable-plug face views: looking into the mating connector or turning the board over can reverse the apparent order. Cable colors in the overview distinguish connections; they do not specify a supplier's wire colors.
Front: component side facing you. Hold the board with DC1 at the upper left and USB1 at the lower left. Amber numbers identify individual electrical pads; the larger original OUT silkscreen numbers 1–6 identify pairs. UART0, I2C and DISP each run 4, 3, 2, 1 from top to bottom in this view.
Front connector locator, annotated from the board rendering and checked against the PCB pad definitions. Click to enlarge the individual pin numbers.
Back: flip the board left-to-right, keeping the same upper edge. DC1 is now at the upper right and USB1 on the lower part of the right edge. AD_IN1 and FLOW are on this side, together with NTC1/NTC2. In this view, AD_IN1 runs 12 → 1 left-to-right, FLOW runs 6 → 1 left-to-right, and each NTC pair runs 1 → 2 top-to-bottom.
Back connector locator, annotated on the supplied board rendering and checked against the PCB pad definitions. NTC labels point to the two electrical leads, not the mounting tabs. Click to enlarge.
Use the locator images to identify a port, then use the tables below for its electrical function. A photograph of the component side alone cannot show the back-mounted sockets.
| Board marking | Location in the original PCB | Use with firmware 0.16.9 |
|---|---|---|
| DC1 / U22 | Component side | DC input and its separate power path; see Step 4.2 |
| MT | Component side | Booster pump |
| OUT | Component side | SV1 inlet and SV2 flush; remaining channels reserved |
| UVC1 | Component side | Optional compatible UVC LED assembly |
| AD_IN1 | Back | Pressure switches and leak probe |
| FLOW | Back | Optional product/waste flow meters |
| UART0 | Component side | Flashing and startup log |
| USB1 | Component side | Native USB interface; this guide uses UART0 for flashing |
| DISP | Component side | Matching serial display |
| I2C | Component side | Shared service/expansion bus; no generic accessory support |
| TDS1 / TDS2 | Component side | Matching feed/product TDS probes, through U5 |
| NTC1 / NTC2 | Back | Matching feed/product temperature probes, through U5 |
Large solder tabs used to secure some connectors are not extra wire terminals. For example, OUT and AD_IN1 have 12 signal/power contacts plus mounting pads 13/14; FLOW has 6 contacts plus mounting pads 7/8. The small TDS/NTC connectors each have two probe contacts, not four usable contacts.
6.1 Connect pressure and leak inputs
| Channel | GND | Signal | Adjacent supply contact | Connection in this guide |
|---|---|---|---|---|
| AD1 | 10 | 11 | 12 | Feed-pressure switch between 11 and 10; leave 12 unused |
| AD2 | 7 | 8 | 9 | Demand-pressure switch between 8 and 7; leave 9 unused |
| AD3 | 4 | 5 | 6 | Leak electrodes between 5 and 4; leave 6 unused |
| AD4 | 1 | 2 | 3 | Unused by this firmware; leave disconnected |
- Use the signal/GND pair for each two-wire device. The adjacent supply pads are not part of this dry-contact connection.
- Verify the external pull-up configuration for AD1/AD2 and the resistor configuration for AD3 from Step 3.
- Confirm each actual input state through the web installation procedure before assigning its meaning. Do not copy a HIGH/LOW choice from a screenshot.
An improperly conditioned pressure input can float and must not be mistaken for a reliable “water available” signal. With the documented AD3 pull-up fitted, an unplugged or broken leak-probe cable can instead appear steadily dry. Dry alone does not prove that the probe is connected. Verify the probe with actual water contact during commissioning.
Keep the supply contacts out of these two-wire circuits. AD1/AD2 use the 10 kΩ external pull-ups in Step 3. AD3 uses a 470 kΩ pull-up to 3.3 V with R26 unpopulated. A powered leak module is not a substitute for the two-wire electrodes shown here.
Those AD_IN1 supply contacts share a selectable rail. In the original reference, R79 = 0 Ω selects 3.3 V and the alternative R78 5 V link is omitted. Do not fit both links; that would join the two supply rails. Check the actual assembly and voltage before using any supply contact for a future adaptation.
6.2 Add optional flow meters and sensors
The FLOW connector uses the following pad order:
| Meter | GND | Signal | Supply |
|---|---|---|---|
| FLOW1, product water | 1 | 2 | 3, +5 V |
| FLOW2, waste water | 4 | 5 | 6, +5 V |
The connector supply does not prove that a sensor's pulse voltage is suitable. Check the complete electrical interface, including output type and signal level, before connecting a replacement sensor.
- Install FLOW1 in the product-water route and FLOW2 in the concentrate route, following each meter's direction marking.
- In a pressure-tank arrangement, place the product meter before the tank/faucet branch, with the product-side check valve preventing tank water from flowing backwards through it. In that arrangement it measures newly produced RO water, not faucet draw or tank contents. Stopping the pump and closing SV1 do not isolate water already stored in the tank.
- Configure and calibrate each meter separately in the web interface. A pulses-per-litre figure from a different listing is not a universal value.
- Connect TDS, temperature and display hardware only using their matching module documentation and the final assembly supplement.
6.3 Prepare the power-controlled load connections
| Connector / PCB pads | Positive supply | Controlled return | Firmware 0.16.9 role |
|---|---|---|---|
| MT | 2, +24 V | 1, PUMP | Booster pump |
| OUT 1 / 2 | 1, +24 V | 2, SV1 | Inlet valve |
| OUT 3 / 4 | 3, +24 V | 4, SV2 | Flush valve; off during production in this water circuit |
| OUT 5 / 6 | 5, +24 V | 6, SV3 | Reserved; leave disconnected |
| OUT 7 / 8 | 7, +24 V | 8, SV4 | Reserved; leave disconnected |
| OUT 9 / 10 | 9, +24 V | 10, SV5 | Reserved; leave disconnected |
| OUT 11 / 12 | 11, +24 V | 12, SV5 | Same SV5 output, not a separate SV6; leave disconnected |
| UVC1 | 2, +24 V | 1, UVC | Compatible optional UV assembly |
These are low-side switched outputs. A load's negative lead must return through its designated controlled pin. Connecting it directly to common GND can bypass the switch and leave the load energized independently of the intended command.
- Identify each connector's pad 1 from the PCB files and actual board.
- Confirm the load's identity and polarity before crimping or plugging it in.
- Label the prepared leads one circuit at a time and record their intended positions. Leave the load plugs disconnected until Step 7.
- Check that no loose strands bridge adjacent terminals and that the leads are supported.
Additional output positions are not a promise of configurable functions in this firmware. In the original hardware, the last two valve connector pairs share SV5: six pairs do not mean six independent channels.
6.4 Define the display, probe and service connections
For the display, TX and RX are named from the board's perspective. Connect board TX to display RX and board RX to display TX. A connector fitting mechanically does not establish voltage or protocol compatibility.
| Connector | PCB contacts | How to use them |
|---|---|---|
| DISP | 1: +5 V; 2: board RX (GPIO16); 3: board TX (GPIO15); 4: GND | Matching display VCC → 1, TX → 2, RX → 3, GND → 4. Check display firmware and 3.3 V-compatible serial logic. |
| UART0 | 1: GND; 2: board TX (GPIO43); 3: board RX (GPIO44); 4: VCC (3.3 V) | For flashing, adapter GND → 1, RX → 2, TX → 3. Leave board pad 4 and the adapter power pin unused; see Step 5. |
| I2C | 1: SDA (GPIO1); 2: SCL (GPIO2); 3: VCC (3.3 V); 4: GND | Shared with the board's current monitors and EEPROM. No generic external sensor driver is provided; leave unused for this build. |
| TDS1 | 1: acquisition front end; 2: TDS1+ | Matching feed-water TDS probe through U5. Both contacts belong to the measurement circuit; neither is a supply terminal. |
| TDS2 | 1: TDS2+; 2: acquisition front end | Matching product-water TDS probe through U5. |
| NTC1 | 1: acquisition front end; 2: NTC1+ | Matching feed-water temperature probe through U5. |
| NTC2 | 1: NTC2+; 2: acquisition front end | Matching product-water temperature probe through U5. |
Connecting a four-wire probe: In my installation, each probe's four-wire cable is split into two two-pin plugs, one carrying the TDS pair and the other carrying the temperature pair. Keep both measurements from the same water location together: the feed-water probe uses TDS1 + NTC1, and the product-water probe uses TDS2 + NTC2. The original four-position plug does not fit directly into either two-pin board connector. For a combined probe, the separate TDS and temperature symbols in the wiring overview represent its two measurement connections.
Identify the TDS and temperature wire pairs using the probe’s own wiring information, and use a temperature element compatible with the acquisition circuit. The table gives the board-side contacts; the probe connections are measurement inputs, not power outputs. Connector mounting tabs are not probe terminals.
USB1: its USB supply reaches the board's 5 V rail through F1; it does not generate the 24 V load supply. Simultaneous USB and DC input has not been verified for reverse-current behavior. Keep native USB disconnected when using the separately powered UART0 flashing arrangement in Step 5.
Step 7 — Configure, then supervise the first production cycle
Use Set Up and Use Your DIY RO Controller for the exact web controls. It covers input verification, installed hardware, optional features, network settings, Home Assistant, backups and OTA. This section describes what the physical installation needs to demonstrate.
- Complete unloaded diagnostics. Confirm the rails, required monitor responses and actual input transitions. Fix unexplained missing or implausible feedback before relying on it for protection.
- Configure the actual water circuit. Verify and save the feed, demand and leak input settings first. Then read back, confirm and save the supported machine-mode and hardware settings. Changing input settings can invalidate installation confirmation, so keep this order. Enable only accessories that are present and working.
- Secure the installation and connect loads with power off. Mount the board on insulation and spacers, support the cables, and connect the identified pump/valve/UV leads from Step 6. Check tubing and fittings before restoring the water supply and board power. Temporary cardboard under a loose PCB is not the finished installation standard.
- Enable operation, then supervise the first demand cycle. After the restart, check the saved installation and current diagnostics again. Use Enable operation in the web interface when those checks pass; applying power alone does not start automatic operation in this build. Confirm that the inlet and pump respond as intended, product water appears, and concentrate continues through its restricted path. SV2 should be off during normal production in this arrangement.
- Verify the stop condition. Check the real demand switch and water circuit, rather than relying only on an animated web diagram. Confirm the expected transition out of production.
- Verify flushing and protective responses using the commissioning procedure. Check the leak probe dry, in contact with actual RO water, and after drying it again; observe both the reading and the controller state. The separate Web guide explains the controls. Do not deliberately dry-run the pump or disconnect live wiring to create a test condition.
- Record the result. Keep the firmware version, assembly revision, settings and observations so that later changes can be compared with this first working configuration.
The dashboard shows commands as well as measurements. “Commanded OFF” is not direct proof of valve position, and a low TDS reading is not a comprehensive water-safety test. Use the displayed values for the purpose actually supported by each sensor.
Step 8 — Fit the enclosure and finish the installation
The first-version enclosure assembly guide continues from a working, identified board. It covers fitting the printed parts, installing the inserts, checking connector clearance and assembling the optional display frame.
My enclosure uses M3 × 4 × 4.6 heat-set inserts, M3 × 20 mm controller-assembly screws and M3 × 5 mm display screws. Keep those screw lengths separate. The enclosure is a first revision: the fit, mounting and cable routing still have room for improvement. The enclosure article’s download section now includes both STL files in one ZIP.
Disconnect power before fitting the case. Support the board on its intended mounts, leave room for plugs and cable bends, keep BOOT/RESET accessible and avoid pinching the antenna lead. Secure the finished enclosure and cable bundles independently of the PCB connectors, away from leaks and wet surfaces.
After reinstalling it, repeat the first-cycle checks in Step 7. A successful open-board test does not show whether closing the case has strained a connection. From there, use the Web setup and operation guide for day-to-day controls, calibration, monitoring and later updates.
Step 9 — Add the Home Assistant dashboard cards (optional)
I have published Water Purifier Card on GitHub so the controller can have its own place on a Home Assistant dashboard. There are three cards, all supplied by one JavaScript file:

Full-card layout from the repository's browser preview. These are example readings, not measurements from my purifier. Click the image to enlarge.
| Card | What it shows | Where I would use it |
|---|---|---|
| Full water-circuit card | TDS, a configured water-path diagram, filter reminders and more detailed sensor information | A dedicated purifier dashboard |
| Small status card | Operating state, product-water TDS and product flow | A quick overview alongside other home devices |
| Medium history card | Feed/product TDS, a recorded TDS trend, cumulative usage counters and filter reminders | A dashboard where water quality and usage matter more than the full circuit |
The cards support English and ten other interface languages. They follow the HA user's language automatically, or you can choose a language in each card's editor.
9.1 Connect the readings before adding the card
The data route is controller → MQTT broker → Home Assistant entities → dashboard card. Follow the MQTT setup instructions first and confirm that the WATER device and its readings appear in Home Assistant. A card cannot supply data that the controller has not published.
These cards run in Home Assistant's frontend; they are not another ESP32 firmware image. If the required entities are already available, adding the cards does not require reflashing the board. For the 0.16.9 firmware package in this guide, check the entities your device actually exposes and map those readings. Later or optional card fields do not imply that every firmware version publishes them.
9.2 Install the file and choose a layout
The repository currently provides the 0.4.0 source candidate, rather than a tagged release. Use the manual installation documented in the Web setup guide's card section: copy water-purifier-card.js into Home Assistant's www directory, register it as a JavaScript module, then add a card and select the WATER device in its editor. One registered file provides all three card types, so you can use more than one layout on the same dashboard.
The card code is public under the repository's MIT license. This is separate from the controller firmware download, whose source code remains private. HACS installation is an alternative still being validated; it is not required for the manual route.
9.3 Check the display against your installation
Compare the card's readings with the underlying HA entities. If automatic matching does not find a field, select the correct entity manually. For an unfitted sensor, choose Hide for that field, or set its role to null under entities in YAML; leaving a role unspecified allows automatic matching. Filter labels and their positions in the full diagram should match your own water circuit.
The full and medium cards get their TDS graphs from Home Assistant history/Recorder, so the entity needs recorded history before a graph can appear. Usage totals are cumulative device counters, not today's usage. The cards are read-only: they display data and can link to the controller's own web interface, but do not start the pump, open valves or trigger a rinse.
Troubleshooting
| Symptom | What to check first |
|---|---|
| Firmware hash does not match | Check the extracted factory.bin against SHA256SUMS.txt, not the ZIP. Download and extract again before flashing. |
| No COM port in Windows | Adapter, data cable, bridge-chip driver and Device Manager. The port is an adapter check, not a board-power check. |
| COM port exists but the tool cannot connect | Correct port, another program holding it, TX/RX crossover, common GND, board supply and BOOT/RESET timing. |
| Write completes but application does not start | BOOT released, startup log, correct merged image and address, matching board/memory/partition layout, and stable supply. |
| Setup Wi-Fi connects but there is no internet | This is expected for the setup hotspot. Keep that Wi-Fi connection and open http://192.168.4.1; the hotspot password comes from the serial log. |
| Board boots but does not start production | Check installation verification and the Enable operation control, then actual feed/demand inputs. A successful flash alone does not enable an unchecked installation. |
| 5 V or 3.3 V rail is wrong, or an IC heats rapidly | Remove power. Inspect orientation, bridges and the affected power path before another attempt. |
| U7 is not detected | Release address versus assembled address, orientation, joints and supply. Disconnect power before inspecting or reworking the board; do not assume every I²C response identifies U7. |
| U7 shows voltage while UV is off | U7 measures the supply side, so voltage can remain present. Read the output command and current together; supply voltage alone does not show whether the light is on. |
| Pressure state changes unpredictably | Switch wiring, actual contact states and external pull-ups, especially BOM-excluded positions. |
| Pump runs but little or no product water appears | Flush path state, restrictor arrangement, supply and plumbing. Reversed SV2 logic caused this in my first test. |
| TDS, flow or screen is missing | Whether that option is installed/enabled, its exact protocol/pinout and its individual configuration. Connector shape is insufficient. |
| HA card says “Custom element doesn't exist” | Confirm that the actual JavaScript file is served from the registered resource URL, its type is JavaScript module, and the browser has reloaded. Register the shared file only once. |
| HA card loads but readings or history are missing | Check MQTT entities first, then the selected WATER device and entity mappings. A history graph also needs records for that entity in HA Recorder. |
| A web update returns to the previous version | Check the update/recovery record and pending-confirmation procedure before concluding that flash memory is damaged. |












Comments
Questions about this build? Share what you tried and what happened.
Loading the discussion…
Comments could not load. You can keep reading and try again.
New comments are closed for this article. Existing discussions are still available to read.
Your submitted comments
Shown only to you. Not part of the public discussion yet.
Discussion
No comments yet. Questions and build notes are welcome.
Replying to
Replying to