A single-screen, two-tier electronics platform for the SM-379 vertical-membrane RO line — automatic backwash, live TDS/pH, flow, pump, antiscalant and membrane monitoring, built around Raspberry Pi + ESP32.
A single Raspberry Pi doing everything — HMI, sensor polling, relay switching — is the tempting design and the wrong one for an unattended appliance sitting next to a 3-phase pump. Split the job instead.
Runs the full-screen touch app only: live dashboard, TDS setpoint entry, alarms, history log, service reminders. It is the "brain for decisions," not the thing switching a contactor.
Polls every sensor, drives every relay, and runs the actual backwash/pump-protection logic on its own — independently of the Pi. If the touchscreen freezes, reboots, or updates, the machine keeps running (or safely stops) on its own.
They talk over a simple UART link (JSON packets, ~1 Hz). The Pi never touches the pump directly. That single decision is what makes "unattended operation" — a claim already on your site for the SM-379 — actually true rather than aspirational, and it's the difference customers eventually notice as reliability.
Four bands, top to bottom: the wetted/process path, the field sensors reading it, the control electronics, and the electrical power section. Boxes are grouped by function, not by literal wire routing — your panel wiring diagram will fan out from here.
Note on "backwash": spiral-wound RO membranes themselves generally aren't backwash-tolerant — the automatic backwash cycle applies to the sediment/multimedia pre-filter stage ahead of the membrane, with effluent routed to the same waste line. If your SM-379 uses a backwashable UF or capillary stage instead, the same V1–V3 solenoid + timer/ΔP logic applies unchanged — worth confirming with your mechanical drawing so the trigger (timer vs pressure-drop) is set correctly.
One row per feature you listed. "Interface" is what actually lands on the ESP32 — RS-485 for the two parameters customers read most closely (TDS, pH), simple pulse/analog for the rest.
| Feature | Sensor / transmitter | Interface | Mounts at |
|---|---|---|---|
| Live TDS + setpoint | Online EC/TDS transmitter | RS-485 Modbus RTU | Permeate (product) line |
| Automatic pH output | Online pH transmitter | RS-485 or 4-20mA | Permeate (product) line |
| LPH in | Hall-effect paddlewheel flow sensor | Pulse (interrupt) | Raw water inlet |
| LPH out | Hall-effect paddlewheel flow sensor | Pulse (interrupt) | Permeate outlet |
| Pump status | Contactor aux contact (+ optional CT clamp) | Opto-isolated digital in | Pump contactor |
| Antiscalant level | Waterproof ultrasonic (non-contact) | Analog / trigger-echo | Dosing tank lid |
| Membrane status | 2× pressure transducer (feed + reject), ΔP computed | 4-20mA or RS-485 | Membrane housing inlet/outlet |
| Automatic backwash | 3× solenoid valve (V1–V3) + timer or pre-filter ΔP switch | Relay out (ESP32) | Pre-filter manifold |
| Feed-tank level (2nd sensor, assumed) | Float switch or ultrasonic | Digital / analog | Raw feed tank |
Reject/waste flow isn't in your list of two flow points — it's cheap to derive as (LPH in − LPH out) for display, or add a third paddlewheel sensor on the waste line if you want a true, independently-measured recovery % on the HMI. Recovery % is a strong "premium" number to show a customer that a base fabricated unit can't.
This is the loop that runs on the ESP32 — the Pi only observes and displays it. Pump start is gated on level interlocks; backwash interrupts filtration on its own schedule; any fault de-energizes the pump and returns to idle.
flowchart TD
A[Power ON] --> B[ESP32 self-test: sensors, relays, comms]
B --> C{Fault found?}
C -- Yes --> D[HMI shows fault code · pump locked out]
C -- No --> E[Idle — waiting for START]
E --> F{START pressed?}
F -- No --> E
F -- Yes --> G{Antiscalant OK AND feed-tank level OK?}
G -- No --> H[HMI alert: low level · pump does not start]
H --> E
G -- Yes --> I[Energize pump contactor]
I --> J{Run-feedback received within 3s?}
J -- No --> K[Trip: pump fault · de-energize · alarm]
K --> E
J -- Yes --> L[Filtering — stream TDS, pH, flow, pressure to HMI]
L --> M{Backwash due? timer or pre-filter ΔP}
M -- Yes --> N[Pause filtration · run backwash sequence]
N --> L
M -- No --> O{Alarm? high TDS / high membrane ΔP / low antiscalant / STOP}
O -- No --> L
O -- Yes --> P[De-energize pump · close valves · log event]
P --> E
Two valid triggers — pick one, or offer both as a setting:
Simplest, cheapest — no extra sensor. ESP32 counts pump run-hours and fires backwash every N hours, configurable from the HMI. Predictable, but wastes water/time if the feed is unusually clean, or under-cleans if it's unusually dirty.
A third pressure point (or a simple differential-pressure switch) across the pre-filter fires backwash only when it's actually fouled. Slightly more hardware, meaningfully smarter — and it's a genuine "intelligent automation" talking point, not just a marketing phrase.
Figures are indicative single-unit market prices in India (Sept 2026) gathered for planning, not a quote — get formal pricing from your electrical BOM supplier at your volumes before costing the product. Essential = lowest defensible cost for the full feature set. Pro = what actually justifies a premium price tag next to a "just automatic start/stop" competitor.
| Item | Essential (₹) | Pro (₹) | Why upgrade |
|---|---|---|---|
| Compute + HMI | Pi 4B 4GB — ~5,500 | Pi 5 4GB — ~6,700 | Headroom for cloud dashboard / richer UI |
| Touchscreen | 7" HDMI capacitive — ~5,500–7,000 | 8"–10.1" all-in-one industrial panel (alloy case, Pi included) — ~20,000–30,000 | Bolts straight into a panel door; IP-rated front |
| I/O controller | ESP32-WROOM-32 DevKit — ~500 | Same module on custom PCB at volume — ~150–250/unit | Volume manufacturing, not hobby boards |
| RS-485 transceiver | MAX485 module — ~60 | Built into Pro transmitters below | — |
| TDS / EC | Analog module + ADS1115 ADC — ~700 | RS-485 Modbus online transmitter — ~4,000–7,000 | EMI-immune near a 3-phase pump, auto temp-comp |
| pH | Analog board + glass probe — ~1,500 | RS-485/4-20mA industrial transmitter — ~6,000–12,000 | Far longer calibration interval, less drift |
| Flow ×2 (in/out) | Hall-effect paddlewheel — ~400 each | Industrial RS-485/4-20mA paddlewheel — ~3,500–8,000 each | Add a 3rd on waste line for true recovery % |
| Pressure ×2 (membrane ΔP) | 0–16 bar 4-20mA transducer — ~1,500 each | RS-485 variant — ~3,000 each | Same wiring bus as TDS/pH |
| Antiscalant level | Ultrasonic JSN-SR04T — ~350 | 4-20mA ultrasonic transmitter — ~3,500 | Panel-mount, longer service life |
| Feed-tank level | Float switch — ~250 | Ultrasonic (shared spec as above) — ~3,500 | — |
| Pump run feedback | Aux contact + opto-isolator — ~150 | + CT clamp (dry-run/overload data) — ~900 | Real current sensing, not just "we sent a command" |
| Relay outputs | 4-ch opto relay module — ~300 | DIN-rail interposing relays — ~200/ch | Panel-standard, easier field service |
| Solenoid valves ×3 (backwash) | 12/24V DC generic — ~800 each | Branded, food-grade — ~2,000 each | Duty-cycle life, warranty story |
| Contactor + overload + phase-failure relay | ~2,000 (per pump HP) | Branded (Siemens/Schneider/L&T) — ~4,500 | Recognisable brand on the BOM sheet you show customers |
| Control SMPS 24V/5V | ~700 | Branded DIN-rail — ~2,000 | MTBF, panel-inspector friendly |
| Enclosure, DIN rail, glands, wiring | ~2,000 | ~4,000 | Finish quality matches your "unibody" positioning |
Rough incremental electronics BOM: Essential ≈ ₹20,000–24,000 per unit · Pro ≈ ₹58,000–78,000 per unit, before your usual margin — heavily dependent on pump HP (drives contactor size) and whether you pick the all-in-one industrial touch panel.
One kiosk app, full-screen, no OS chrome exposed. Suggested screens:
Don't cost-cut the two parameters a customer reads with their own eyes — TDS and pH. Putting both on real RS-485 transmitters instead of hobby analog boards is a small BOM delta (a few thousand rupees) against a control system that already runs into tens of thousands; it's the cheapest credibility you'll buy. Flow and level, by contrast, are where the Essential tier is genuinely fine — the customer sees a number on screen either way and won't know or care which sensor produced it.
The bigger lever isn't the BOM at all — it's reuse. Build one ESP32 firmware image and one Pi HMI app, and ship it across the whole 1000/2000/3000/4000+ LPH range with only calibration constants (flow K-factor, pressure range, pump HP) changing per model. That's one engineering effort amortised over your entire product line, which is what actually moves margin at scale — not which brand of pressure transducer you pick.
And the electronics you're building here is also a second revenue line on its own: remote monitoring / AMC-as-a-subscription, sold against the same Wi-Fi/4G hook already sitting on the Pi. That's recurring revenue on top of the one-time unit sale, and it's a natural extension of "Automatic Fault Diagnostics" and "Nationwide Service Support," which are already on your site.
The process/piping layout of the SM-379 itself, separate from the electronics diagram above: what's physically on the skid, how it's plumbed, and where each of the seven monitored points sits.
I pulled your site again and tried fetching the actual product photos (the SM-379 hero shot and the tall vertical unit shot) directly — my fetch tool can retrieve the page text but can't process image files, so I couldn't visually trace your real housing count or panel layout from it. What's below is built from what the page states outright (vertical membrane, unibody, compact, stable foundation, single raw-water inlet) plus standard practice for a packaged vertical-membrane RO skid at 1000 LPH. If you drop the actual photo or GA drawing into the chat as a file, I can re-align the housing count, spacing and panel position to match it exactly.
Instrument tags follow the same names used in §03's sensor map (FI = flow, PT = pressure, LS = level) so the two diagrams read as one system: this one shows where each device physically sits on the skid, §02 shows how it's wired.