Skip to content

thepacketgeek/esp32-dryer-buzzer

Repository files navigation

ESP32 Dryer Buzzer

This project uses an esp32c3 MCU to detect voltage sent to my dryer's buzzer when the drying cycle is complete. I've seen similar projects use vibration sensors mounted to the dryer or even temperature/humidity sensors in the vent but deciding when to buzz seems like guesswork and there are a couple things I appreciate about the buzzer voltage detection:

  • The dryer buzzer seems to signal when the heat stops but the drum is still rolling, meaning I still have a minute or two to grab my clothes while they're not wrinkly
  • Even though there were a lack of other people using the voltage detection method, it seemed like a more straightforward approach

Designing the Circuit

Using my multi-meter I detected that my dryer would send the built-in buzzer a short 120V signal, which is definitely outside the native 3.3V or 5V range of most MCUs. In my early research I tumbled (lol) across some discussion mentioning an optocoupler to detect voltages that are greater than what the MCU could support directly and I happened to find some that fit the task (up to 220V!) on amazon.

I setup a test circuit with the high-voltage size of the optocoupler connected to a switched 120V circuit and then tried to find some datasheets on how to use the 3 pins:

  • VCC - Voltage Common Collector: can be connected to the MCU 3.3V or 5V, whichever voltage you want to read from an input pin (I chose 3.3V for my esp32c3 MCU)

  • OUT: This pin goes low when voltage is detected on the high-voltage side, I connected this to a digital GPIO pin on the MCU

  • GND - Ground: Voltage sink when voltage is detected and OUT becomes low

Schematic

This is a simple circuit and essentially looks like this:

circuit diagram

Where the box to the very left are the two leads that were originally connected to the dryer's 120V buzzer.

Coding things up

I first created a prototype just using the esp-hal crate and interrupt handlers but didn't like how it ended up since I needed debounce logic for the voltage detection (dryer can send short bits of voltage when the timer knob goes past the buzzer detents) and it got messy quickly with global statics.

After more research I came across the embassy project and saw that it had async support which made the dryer buzzer trigger logic w/ debounce trivial. I was sold!

Connecting things up and shipping the project

With a few more materials like wires, blade connectors, and an enclosure box I was able to put everything together and connect the device to my dryer in a non-destructive way.

Circuit in an enclosure with holes for usb-c and buzzer connections:

enclosure

And the circuit all connected up to the dryer buzzer wires (not in the photo, a usb-c cable going to an wall charger for power):

dryer

Actioning the buzzer

If you look at the code you'll see that when the esp32 detects voltage from the buzzer it will send an HTTP request. That request is going to my homebridge server, with the homebridge-webhooks plugin where I have a dryer "doorbell" configured. This results in my home doorbell chime going off and getting a phone notification when my dryer is done.

Running the project

Until I can figure out how to add bluetooth or wifi configuration support, running this program requires a Wifi SSID+password at build/flash time:

SSID="MyNetwork" PASSWORD="hunter2" cargo run

About

Dumb Dryer buzzer automation via esp32 MCU

Topics

Resources

Stars

Watchers

Forks

Languages