Wastewater controller: ESP32 firmware and a simulator that runs the same code

Sterling Civil, a civil engineering firm in the US, asked us to write the control software for an on-site sewage treatment system at an RV park. The controller doses, aerates and pumps based on tank levels, checks that pumps and blowers really started, rotates valve zones and latches alarms.

Relationship
Client project for Sterling Civil (US)
When
2026
Platforms
Firmware (ESP32), Web simulator
What we built
Control firmware, Simulator
System logic simulator showing tanks, pumps and controller status

The controller

The firmware is C++17 for an ESP32, built with PlatformIO. Its control loop runs every 100 milliseconds and is kept apart from the hardware, so the same logic can be tested away from the panel.

  • Starts in a safe hold and recovers from faults.
  • Float interlocks, proof checks on pumps and blowers, and alarms that stay latched until someone clears them.
  • Eighteen scenario tests that run on a laptop, not the board.

A simulator running the real code

We compiled the controller’s C++ core to WebAssembly so it runs in a browser. The client can fill and drain tanks, trip floats and fail a pump, then watch exactly what the firmware would do, before any panel is wired.

Where it’s up to

The control core and simulator were delivered in May 2026. Hardware drivers and remote monitoring are the next phases.

Built with

  • C++17
  • ESP32
  • PlatformIO
  • Unity tests
  • Emscripten
  • WebAssembly
  • React
  • Vite

Related services

Next case study

Grolia

Firmware, the touchscreen interface and the grolia.com.au platform for Flush, a benchtop cabinet that grows gourmet mushrooms.

Read the case study

Need something like Wastewater controller?

Tell us what you're working on. Steve reads every enquiry and replies by email.

Send an enquiry