A cheap enclosure holds all the electronics, left to right: the H-bridge DC motor driver, ESP8266 board, STM32F103 bluepill board, and LM358 amplifier with microphone.
During the last minute I resoldered the microphone so it aligns perfectly with the whole on the enclosure so I would not have to raise the gain. It is quite sensitive but the software waits for 3 beeps spaced 6 seconds apart. It seems quite reliable.
So far I have only tested by generating the tones with Audacity. Here is a short video of the detector reacting to the dishwasher beeps (not the end of cycle long beeps, but it's the same frequency.)
A cheap microphone capsule salvaged from the junk bin, together the old and ugly LM358 as preamp, feed the audio signal to the STM32F103 (bluepill, bottom dev kit). For this MCU, at 72 MHz, with a DMA capable 12-bit ADC, sampling the audio is a walk in the park. I plan to use the ESP (top) to do the IoT / wifi part of this project.
Ideally you'd use just one MCU, but the ESP has a very slow ADC that is not intended for audio, and though I have a couple SPI codecs (the unconnected Microchip part on the upper breadboard), it was much simpler to do the heavy ADC+processing job on the ARM Cortex chip.
Parts wise... the bluepill is even cheaper than the SPI ADC part!
After a quick recording with my phone, the Audacity frequency plot reveals that my dishwasher end-of-cycle tones are at 3.969 kHz.
At first I thought that it was probably 4 kHz and my measurement had some error, but no, it's exactly 3.969 kHz. Probably, the MCU inside the dishwasher is using an imprecise RC clock generator, or perhaps this tone was easier to obtain by dividing the MCU clock. In any case, it's different enough from 4 kHz to take it into account when detecting the tones. Nobody wants the dishwasher opening when the microwave beeps!
I designed two clamps and a "finger" (that hopefully won't snap!) It's just 3mm thick. If it breaks I will have to redo the end with something stronger
Most of the mechanic part of this hack will be built around a suitable actuator than can push my dishwasher door open. I ordered one of these, with a 200mm travel and rated at 700N it should be more than capable of opening the door. Speed is not really important.