Open Source Hardware · wash.rizeva.my.id

Software-Defined Washing Machine Controller

Convert factory top-load Polytron washing machines into intelligent, software-defined appliances. Powered by an ESP32 microcontroller, 4-channel AC relays, and a 100% native Android mobile companion app communicating over direct Bluetooth LE.

QuickJS + SurfaceView Native Android UI
BLE GATT Offline No Wi-Fi Needed
200ms Dead-Time Hardware Interlock
OTA Hot-Reload Live Updates
Polytron Wash Native Android Companion App

Hardware Architecture & Communication Diagram

How software control flows from the mobile phone through the ESP32 microcontroller to 220V AC physical actuators.

📱 Android Phone Native Companion App QuickJS JNI Bridge Zero WebView / 60 FPS Android BluetoothGatt MTU 517 + Reassembly OTA Hot Reload wash.rizeva.my.id ✓ 100% Offline Pure Cycles run without WiFi BLE GATT @ 1 Hz Push ⚡ ESP32 Controller WEMOS D1 R32 / ESPHome Cycle Sequencer Cuci · Bilas · Buang · Peras Hardware Interlocks 200ms CW/CCW Dead-Time ADC1 Water Sensor GPIO 39 Analog Pressure Web & HA API Port 80 HTTP / 6053 Native GPIOs Active-Low 4-CH Relays Optoisolated 250V/10A Relay 1 · IN2 GPIO 19 (Motor A) Relay 2 · IN3 GPIO 21 (Motor B) Relay 3 · IN4 GPIO 23 (Drain) Relay 4 · IN1 GPIO 18 (Inlet) 220V AC Polytron Drum Mains Actuators Motor CW Wash agitation Motor CCW Reverse wash Drain Solenoid Clutch lock + drain Inlet Valve Water supply

Engineered for Wet Hands & Real Laundry

Inspect how the native app interface handles real wash cycles, telemetry stream parsing, and hardware control.

Beranda Screen

6-Action Grid with Persistent Safety STOP

No scrolling or paging required to reach emergency controls. Every core wash action is available in a 3×2 high-contrast grid with bold custom icons designed to match the physical touch pod.

  • ✓ Single-tap triggers: CUCI (Wash), PERAS (Spin), BUANG (Drain), ISI (Fill), BILAS (Rinse), and BILAS ND.
  • ✓ Immediate Emergency STOP: Purges all pending queues and prioritizes shut-off before any motor reversal.
  • ✓ HA-Style Orbiting Spinner: 8-dot animated telemetry ring indicates live cycle progression in real time.
  • ✓ Stale Data Protection: If telemetry pauses >15s, transitions to an amber "DATA BEKU" warning and gates new starts.
Polytron Wash App Home Tab
Home Tab · 6-Function Action Grid FUNGSI MESIN
Polytron Wash Controls Tab
Controls Tab · Live Relay State Mirror RELAI — INDIKATOR
Kontrol Screen

Real-Time Relay Indicators & Tub Pressure

The Controls screen acts as a transparent window into the physical hardware. Relays are presented strictly as live state indicators—preventing accidental actuation of conflicting coils while observing motor agitation.

  • ✓ Relay Mirroring: Live feedback for Motor A (CW), Motor B (CCW), Drain Solenoid, and Water Inlet.
  • ✓ Water Sensor ADC Diagnostics: Read analog tub water percentage with raw median-filtered calibration readings.
  • ✓ Firmware & Heap Telemetry: Probe controller memory and runtime health with one tap.
  • ✓ Cycle Navigation: Tap the active status bar anytime to jump back to Home and monitor remaining time.
Multi-Interface Architecture

Home Assistant & Local Web Coexistence

Adding direct Bluetooth Low Energy did not compromise existing smart-home integrations. The ESPHome firmware concurrently maintains its native API port 6053 for Home Assistant, HTTP port 80 for the browser dashboard, and BLE GATT for the companion app.

  • ✓ Home Assistant Integration: Full entity streaming, history graphs, and automated voice routines.
  • ✓ Standalone Web UI: Lightweight embedded dashboard served directly from flash for browser control.
  • ✓ No Cloud Lock-in: Control the machine entirely over local Bluetooth without active internet or router connection.
Polytron Wash Home Assistant and Web Dashboard
ESPHome Web Dashboard & Home Assistant PORT 80 & 6053

Circuit & Pinout Connections

Wiring configuration between the ESP32 controller and the 4-channel active-low relay module.

Relay Channel ESP32 GPIO Actuator / Load Electrical Function Safety Interlock Rule
IN2 (Relay 1) GPIO 19 Motor A (CW) Main agitator clockwise wash cycle rotation 200ms Dead-Time Interlock
IN3 (Relay 2) GPIO 21 Motor B (CCW) Main agitator counter-clockwise wash cycle rotation 200ms Dead-Time Interlock
IN4 (Relay 3) GPIO 23 Drain Solenoid & Clutch Opens gravity drain valve and locks drum clutch for spin 10s Drain Coast Pre-Spin
IN1 (Relay 4) GPIO 18 Water Inlet Valve Electromagnetic 220V AC solenoid valve for filling tub Max 60m Emergency Cap
Analog Sensor GPIO 39 Water Pressure Sensor Analog ADC1 channel reading water tub pressure (0–3.3V) 3.3V Max (Divider Required)

BLE GATT Line Protocol Reference

Service UUID 9f6d1c30-5f2e-4d8a-b7c3-00a1b2c3e001 operating with 1 Hz telemetry pushes and MTU reassembly.

gatt-protocol-session.log 115200 baud / BLE
// 1. Inbound Command Characteristic (...e002 write):
> WASH 600                  // Start wash agitation mode for 600 seconds
> SPIN 300                  // Engage drain & drum clutch, then spin 300s
> PROG 0                    // Execute saved sequence in Slot 0 (Cepat)
> SET WASHMIN 12            // Optimistically update parameter and persist to NVS
> STOP                      // Emergency halt — immediately de-energize all coils

// 2. Outbound Telemetry Characteristic (...e003 read / notify @ 1 Hz):
< ST:WASH|WASH 20min|1/1|120|1080|1000|142|W65
//   Format: ST:<MODE>|<PROG_NAME>|<STEP>/<STEPS>|<ELAPSED_S>|<REMAIN_S>|<ABDI>|<HEAP_KB>|W<WATER%>
//   MODE:      WASH (Agitation active)
//   PROG_NAME: WASH 20min
//   STEP:      1 of 1
//   ELAPSED:   120 seconds elapsed
//   REMAIN:    1080 seconds remaining
//   ABDI:      1000 (Relay A=ON, Relay B=OFF, Drain=OFF, Inlet=OFF)
//   HEAP:      142 KB free
//   WATER:     65% tub level

Ready to Deploy or Build Your Own?

Download the native Android APK package or browse the full hardware schematics, firmware code, and test suite on GitHub.

Download Android APK (v0.1.6) View on GitHub