
The temporary installation during testing. The controller and display are connected; cable management and an enclosure are still to come.
My DIY reverse-osmosis controller is now assembled and running in the purifier. After the U7 rework mistake that damaged the ESP32, getting the board to this stage is a welcome step forward.
Assembly went fairly smoothly this time. The first test in the machine did uncover a firmware mistake, though: I had reversed the control logic for the flush valve. During water production, the valve was energized when it should have been off, and the purifier could not produce water. I found the mistake fairly quickly and corrected the code.
With that fixed, the machine is producing water, and I can see its operating data in the web interface. There is still plenty to finish, starting with the wiring you can see in the photos.
Installing the controller in the purifier
This is the Youth Edition V2.3 board, based on yuunt’s open-source water purifier controller design. My work on this project is assembling the hardware, developing the firmware, and testing it in my own purifier.
In the previous round of testing, I had managed to boot the firmware, connect to Wi-Fi, and get a voltage reading before the later hardware failure. This stage takes the controller into the actual machine, where its outputs need to operate the pump and valves as part of the water-production process.
The firmware is running; the cable management is still in beta. For now, the wires are doing their own thing, and a piece of cardboard is standing in for a mounting plate. This is the current test setup, without an enclosure. Once testing is complete, I’ll tidy up the wiring, secure the components, and design a 3D-printed case for the controller.
The assembled controller during testing. The board is connected and powered; the mounting arrangement is temporary.
Fixing the flush valve logic
The issue I ran into was the control rule for the flush solenoid, labelled “Waste valve SV2” in my web interface. In this particular setup, the valve should work like this:
| Operating mode | Power to the flush solenoid |
|---|---|
| Normal water production | Off |
| Flushing | On |
I had implemented that logic the wrong way round. The firmware energized the valve during normal water production, leaving it open. As a result, the system could not build enough pressure at the RO membrane to produce water.
Once I found the mistake, I changed the firmware so that the valve was energized for flushing and left unpowered during normal production. That resolved the problem encountered in this test.
It gave me a concrete check to carry into future firmware changes: confirm what each output command makes the connected hardware do, and then check when that action belongs in the operating sequence. Here, the valve could open, but my code was asking it to open at the wrong time.
Seeing the system in the browser
The web interface now displays the controller’s operating state and sensor readings alongside a diagram of the water circuit. The screenshot below captures the system in its water-production state, after the valve-logic correction.
A snapshot during testing: “Producing water,” with the inlet valve and pump commanded on and the flush valve commanded off. Click to enlarge.
At that moment, the dashboard displayed a feed TDS reading of 172.8 ppm and a product-water reading of 8.0 ppm. It also displayed temperatures and flow readings. These figures record the values shown at that point in the test.
Having the operating state, readings, and output commands together makes the page useful for following the controller’s behavior. The output labels show what the firmware is commanding, rather than a measurement of each valve’s physical position.
The page still needs some visual work, but it already gives me a way to check the system through a browser. That was one of the things I wanted when I started this controller project.
Next steps for the interface and enclosure
After correcting the flush-valve logic, I have not found another obvious issue in this round of testing. I’ll keep using and observing the controller as development continues.
Next, I want to improve the web interface and the physical installation. That means tidying up the page layout, organizing the wiring, and designing a 3D-printed enclosure so the board has a proper home inside the machine.
Home Assistant integration is also still ahead. The controller is now running in the purifier; connecting it to the rest of my smart home is the next part of the project.
What this machine test established
This record covers water production and the readings displayed during the test described above.
Installed the controller in the purifier, corrected the flush-valve command, and repeated the water-production test while checking the local dashboard.
Water production resumed. The dashboard showed Producing water, with feed TDS at 172.8 ppm and product-water TDS at 8.0 ppm in the recorded screenshot.
Limitations: These are displayed readings from this installation, not a sensor-calibration or water-treatment validation. Output commands do not independently measure valve position, and this test does not establish long-term reliability.


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