How to Build a Smart Washing Machine Alert Using ESP32 and a Vibration Sensor

In a guide published on xda-developers.com, a tech builder explains how a discarded ESP32-S3 microcontroller and a $0.40 vibration sensor can notify a smartphone when a washing machine finishes its cycle.

The author noted that the washing machine lacked smart features, Wi-Fi, a companion app, and even a helpful beep, leaving wet laundry forgotten inside until an alternative was devised.

iotmentor.dev reported that building a washing-machine alert without opening the machine or touching mains power keeps the project at safe USB voltage levels.

Mains voltage can kill, and combining electricity with water demands caution. A washing machine adds water and high power to mains voltage, meaning everything in the build stays on the outside at USB voltage. The project requires one evening for a first build, with an estimated cost between $8 and $15 depending on components.

The build relies on a normally open vibration sensor utilizing an SW-18015P spring switch and an LM393 comparator module. The author bought the vibration sensor for about $0.40 since an unused ESP32-S3 and DuPont jumper wires were already available in a drawer, though a plain ESP32 board works too and an S3 costs about $10 depending on the seller.

A normally open type was chosen because its switch only closes when the washer is shaking, meaning a quiet washer simply reads as ideal.

Wiring requires three simple DuPont jumper connections: VCC connects to 3.3V, GND to GND, and DO links to GPIO5 on the microcontroller board.

ESPHome keeps the automation logic directly on the device rather than relying on heavy external scripts. Because the output idles high and drops low on vibration, adding inverted: true makes ESPHome report on while the washer shakes, while opening ESPHome logs during a wash cycle allows the pin state flicker to be watched in real time.

Shorter delays failed because washers naturally pause during soaks and water fills.

Initial testing at the top yielded inconsistent results because it picked up slightly more rattle than drum vibration, and the spring switch needs real shaking to close.

Washing machine done alert
Photo: iotmentor.dev

Home Assistant discovers the ESP32 board automatically over the local home network via the ESPHome integration.

An automation triggers a smartphone push notification through the Home Assistant Companion app whenever the sensor entity shifts from on to off.

I upgraded my OLD washing Machine Using ESP32
Photo of author

Sophie Lin - Technology Editor

Sophie is a tech innovator and acclaimed tech writer recognized by the Online News Association. She translates the fast-paced world of technology, AI, and digital trends into compelling stories for readers of all backgrounds.

Liam Patterson-White Earns Maiden England Test Call-Up for South Africa Tour

Paul McCartney on Nyt Miljardööri Ja Maailman Kolmanneksi Rikkain Muusikko