Complete reverse osmosis water treatment skid with pre-filters, high-pressure pump, membrane housing, and EQSP32 controller

The Control Problem

Reverse osmosis is well understood as a process: pressurize feed water through a semi-permeable membrane, collect the permeate, discharge the brine. The hydraulics are simple. The control problem is not.

Off-the-shelf RO controllers handle small, fixed installations — a few float switches, a TDS alarm, and a pump relay. For a custom skid with higher flows, multiple tanks, 4–20 mA instrumentation, and a requirement for remote monitoring, those controllers become a ceiling rather than a foundation. They cannot accept continuous pressure transmitters, cannot integrate motor winding temperature, and offer no path to remote data access.

This application note describes how the EQSP32 was used to automate a full-scale RO skid, integrating the complete sensor suite, implementing a safe operating sequence with interlock logic, and streaming live telemetry over MQTT for remote supervision.

Reverse osmosis system showing pre-filtration stages, high-pressure pump, membrane assembly, and EQSP32 controller panel
The completed RO skid. Pre-filters, high-pressure pump, membrane housing, and instrumentation are controlled and supervised by a single EQSP32 on DIN rail. All sensor wiring terminates at one controller.

I/O Inventory

All signals were mapped before any logic was written. The EQSP32 consolidates a sensor suite that would normally require multiple separate modules on a conventional PLC rack:

SignalTypeNotes
RO high-pressure pumpRelay outMain pump enable
Well tank inlet valveRelay outSolenoid, normally closed
Flush valveRelay outLow-pressure membrane rinse, normally closed
Pump inlet pressureAnalog in (4–20 mA)Pre-membrane pressure transmitter
Pump outlet pressureAnalog in (4–20 mA)Post-pump pressure transmitter
Well tank levelAnalog in (4–20 mA)Hydrostatic depth transmitter
Clean water tank levelAnalog in (4–20 mA)Hydrostatic depth transmitter
Feed TDSAnalog in (0–5 V)Conductivity probe, feed line
Permeate TDSAnalog in (0–5 V)Conductivity probe, permeate line
Feed flow meterDigital inHall-effect pulse, feed line
Permeate flow meterDigital inHall-effect pulse, permeate line
Motor winding temperatureTemp (NTC)Embedded thermistor in pump motor
Water temperatureTemp (NTC)Feed water temperature

No external modules required. 4–20 mA current inputs, 0–5 V analog inputs, NTC thermistor channels, and pulse-counting digital inputs are all native to the EQSP32. A conventional PLC would require separate analog expansion cards for this sensor mix, adding panel space, wiring complexity, and cost.

Hydraulic Flow Path

Water is drawn from the well tank, passes through a pre-filtration stage (sediment and carbon cartridges), and is pressurized by the high-pressure pump before reaching the RO membrane. The membrane splits the flow: permeate collects in the clean water tank, brine discharges through a flow restrictor back toward the well tank.

The well water in this installation is regularly replenished from the source and is used for other purposes in parallel, so brine return does not meaningfully concentrate the feed water over time. Feed TDS is monitored continuously and would trigger an alert if it rose outside the expected range.

Hydraulic circuit diagram of the reverse osmosis system showing well tank, pre-filters, high-pressure pump, membrane, permeate collection, and brine return
Hydraulic circuit. Feed water flows from the well tank through pre-filtration, through the high-pressure pump, and across the RO membrane. Permeate is collected in the clean tank. Brine returns through a restrictor. Flow meters on both the feed and permeate lines allow real-time recovery ratio calculation.

Wiring and Electrical Integration

The EQSP32 is mounted on DIN rail and powered from a 24 V DC supply fed by the panel mains. All sensor and actuator wiring terminates at the controller terminals. The 4–20 mA transmitters are loop-powered from the 24 V rail; the TDS probes use the EQSP32's 5 V output for excitation; the NTC thermistors connect directly to the dedicated temperature input channels.

Wiring diagram for the EQSP32 RO skid controller showing pressure transmitters, depth transmitters, TDS probes, NTC thermistors, flow meters, and relay outputs for pump and valves
Wiring diagram. Pressure transmitters (4–20 mA), depth transmitters (4–20 mA), TDS probes (0–5 V), NTC thermistors, and flow meter pulse outputs all wire directly to EQSP32 inputs. Relay outputs drive the pump contactor, inlet valve, and flush valve. The EQSP32 is the only active control device in the panel.

Operating Sequence

The firmware implements a structured state machine. Each state has defined entry conditions and exit conditions. No transition executes unless all prerequisites are satisfied.

StateOutputsExit condition
Idle All off Scheduled start time reached AND well level above minimum AND clean tank below full
Pre-fill Inlet valve open Inlet pressure rises above pre-charge threshold within timeout; fault if not
Run Inlet valve open, pump on Clean tank reaches full level OR scheduled duration elapsed OR any interlock trips
Flush Pump off, inlet valve open, flush valve open Flush timer complete (configurable, typically 5 min)
Shutdown All valves closed, pump off Automatic; returns to Idle
Fault All outputs off, alarm published via MQTT Manual reset required after fault condition cleared

Flush sequence

At the end of every production run, before the pump stops, the flush valve opens. With the pump off and the inlet valve still open, low-pressure water flows across the membrane surface, sweeping accumulated salt and scale deposits toward the brine discharge. Running this flush at low pressure rather than high pressure reduces the risk of forcing deposits deeper into the membrane structure. Duration is configurable in firmware; the default is five minutes.

Why flush matters. Skipping the post-cycle flush allows salt concentration at the membrane surface to crystallize during the idle period. Over time this reduces membrane permeability and recovery ratio, and can cause irreversible fouling. The automated flush adds no manual steps for the operator.

Safety Interlocks

Three independent interlock conditions will immediately stop the pump and transition the system to Fault state, logging the event and publishing an MQTT alert:

All interlocks log to MQTT. Each fault event is timestamped and published with the fault condition and the sensor reading that triggered it. Remote operators can diagnose the cause before dispatching a technician.

Flow Monitoring and Recovery Ratio

Hall-effect flow meters on both the feed line and the permeate line give the controller real-time data on water throughput. The EQSP32 measures pulse frequency on each meter and converts it to volumetric flow rate using each meter's calibration constant.

From these two values the firmware calculates the recovery ratio continuously:

Recovery = Permeate flow / Feed flow × 100%

A significant drop in recovery ratio at constant operating pressure indicates membrane fouling or a feed-side restriction. A rise above the design point may indicate a membrane integrity issue. Both conditions are flagged as alerts and visible in the remote dashboard. Daily and lifetime permeate production totals are accumulated and published for reporting.

TDS Monitoring and Water Quality

Inline conductivity probes on both the feed and permeate lines provide continuous TDS readings as 0–5 V analog signals. The controller reads both channels, converts the voltages to TDS values using sensor-specific calibration factors, and publishes them over MQTT.

The rejection ratio — the percentage of dissolved solids blocked by the membrane — is calculated from the two readings and tracked over time. A declining rejection ratio is an early indicator of membrane degradation and gives the operator lead time to schedule maintenance before water quality is compromised. Noisy sensor readings are smoothed using a rolling average in firmware before display or alarm evaluation.

Scheduling and Remote Operation

The EQSP32 synchronizes its real-time clock with an NTP server at startup. Production cycles run on a programmed schedule — start time, maximum duration, and days of the week are all configurable without reflashing firmware. The clean tank full condition overrides the timer: if the tank fills before the scheduled duration elapses, the system moves to the flush sequence and shuts down early. If the tank is already full at the scheduled start time, the cycle is skipped entirely.

In addition to scheduled automatic mode, the operator can trigger a manual production run or a standalone flush via the remote dashboard, useful for maintenance and commissioning.

MQTT Telemetry and Remote Dashboard

The EQSP32 publishes the full sensor dataset to an MQTT broker at a configurable interval. All key process values are available as individual topics:

Remote monitoring dashboard showing RO skid data including pressure gauges, tank levels, flow meters, TDS readings, and system state
Remote monitoring dashboard. Inlet and outlet pressures, tank levels, feed and permeate flow, TDS values, motor temperature, and system state are all visible in real time. Historical trends allow operators to track membrane performance and water quality over weeks and months.

Broker options: the EQSP32 connects to any standards-compliant MQTT broker. Managed cloud brokers (HiveMQ Cloud, EMQX Cloud, AWS IoT Core) provide TLS-secured access with no infrastructure to maintain. For installations where data must remain on-premises, a local Mosquitto broker on a small Linux server or NUC is equally supported. The firmware configuration is identical in either case.

Why EQSP32 for This Application

Native 4–20 mA inputs

Pressure transmitters and depth transmitters connect directly without external analog input modules or signal converters.

NTC thermistor channels

Motor winding temperature connects directly to a dedicated temperature input. No transmitter or signal conditioner required.

Dual hardware pulse counters

Feed and permeate flow meters each connect to a dedicated hardware pulse counter peripheral, capturing signals accurately from a few Hz to several hundred Hz regardless of firmware execution timing. No missed pulses, no external counter hardware.

Native MQTT client

Built-in MQTT stack with TLS support connects to any standards-compliant broker without external libraries or gateways.

Programmable logic

Flush timing, interlock thresholds, scheduling parameters, and alert limits are all configurable in firmware, not in hardware jumpers.

Single DIN-rail device

Replaces separate relay boards, analog input modules, data loggers, and communication modules. All functions in one compact housing.

Ready to design your RO control system?

EQSP32 datasheet, I/O reference, MQTT integration guide, and application source code available.

View the EQSP32