Smart Soap Dispenser: Interactive ESP32 Wash Timer

Executive summary

An advanced, interactive soap dispenser built around an ESP32 microcontroller. It integrates a web interface, an LED matrix screen, audio guidance, and sensor monitoring. The device is designed to enhance hygiene routines with visual and audio feedback, remote configuration, and fun, gamified interactions—making handwashing engaging for all ages.

Business strategy & value proposition

The problem

  • Poor hygiene habits: People, especially children, often do not wash their hands for the recommended duration (e.g., 20 seconds).
  • Maintenance blindness: Facilities or households don't know exactly when soap levels are low until it runs out completely.

The solution

  • Gamified experience: Visual countdowns on an LED matrix and audio cues guide users to wash their hands for the correct amount of time.
  • Smart monitoring: Ultrasonic sensors keep track of soap levels, and real-time data is served to a web dashboard for easy maintenance monitoring.

Product features & UX

Interactive handwashing

  • Detail: Upon dispensing soap, an LED matrix displays a timer or animation, accompanied by audio playback.
  • Interaction: Users are visually and audibly guided to wash their hands until the sequence concludes, ensuring proper hygiene.

Remote configuration web UI

  • Detail: Hosts a local web server allowing users to customize the device.
  • Interaction: Users can adjust soap dosage, customize the countdown timer, and upload new audio files directly via Wi-Fi.

Technical architecture

High-level stack

Component Technology Role
Controller ESP32 Main logic, Wi-Fi web server, and peripheral orchestration.
Sensors Ultrasonic / IR Measures soap level and detects hands for dispensing.
Output LED Matrix & Audio Amp Displays countdowns/animations and plays audio mp3s/wavs.
Actuator 12V/5V DC Pump Controls precise soap dosage delivery.

Core systems logic

  1. Trigger: A sensor detects hands (or manual button is pressed).
  2. Dispense: The ESP32 triggers the designated pump dosage.
  3. Execution: Simultaneously, the LED matrix starts the visual countdown and the audio amplifier plays the selected track.
  4. Monitoring: Ultrasonic sensor reads current soap volume and updates the local Web UI state.

Handling edge cases

  • Water and steam exposure: Bathroom environments cause rapid corrosion and shorts.
    • Mitigation: Ensure electronics and enclosure are heavily sealed, potted, and waterproofed.
  • Audio quality: Sound can be muffled or distorted in tiled environments.
    • Mitigation: Use proper amplifiction and dedicated speaker chambers for clear sound.
  • Power management: High-drain components like LED matrices and pumps deplete batteries quickly.
    • Mitigation: Efficient power supply design, potentially battery-based with a specialized recharge circuit and sleep states.

Future roadmap

Phase 1 (MVP)

  • [ ] Set up ESP32 with LED matrix, audio amplifier, manual button, and pump control.
  • [ ] Prototype basic dispensing and visual countdown logic.
  • [ ] Implement robust ultrasonic soap level sensing.

Phase 2

  • [ ] Develop local Web UI for dosage regulation, countdown customization, and audio uploads.
  • [ ] Refine screen UI animations and time displays.
  • [ ] Design and print the steam/waterproof enclosure.

Phase 3

  • [ ] Test all components together in a real bathroom setting.
  • [ ] Add extended Wi-Fi antenna logic if network connection drops in the bathroom.
  • [ ] Refine battery management and recharge circuitry.