Hardware help for esphome buzzer

I would like to make a esphome buzzer and would appreciate some help finding the right hardware. I want the buzzer to make notification beeps. Different tones would be nice, but it’s not a requirement. I want to hear the buzzer through a inner wall (similar to a washing machine).

I want to have notifications for:

  1. Opening a exterior door in the house
  2. Opening a door in the garage
  3. Washer/dryer finished etc.

I do have some unused Wemos D1 mini from Banggood on the shelf. It would be nice to use one of those, but I can use something else as well.

Find the biggest leaded piezoelectric element you can.

216xKR%20t0DL
You can also get them housed in plastic cases.

AT-12

Just be careful to get the “transducer” version, not the “buzzer” version. The buzzer version will have integrated drive electronics and only output one tone.

Gluing it to something that will resonate, like a thin sheet metal project enclosure, will enhance the volume.

Using your D1 mini you can generate many different pitch and length beeps using software PWM:

This example shows how to change the pitch:

on_...:
  - output.esp8266_pwm.set_frequency:
      id: pwm_output
      frequency: 1000Hz

This sort of transducer will usually have a resonant frequency around 6kHz (loudest) but should be usable from 1kHz to 10kHz at least.

You may also have to drive it with a transistor and higher voltage, rather than the direct 3.3v output of the D1 mini to get more volume. But try direct drive first and see.

Annotation%202019-08-10%20123101

The (considerably more expensive) option is to use a chromecast audio and some cheap USB speakers with an input jack.

This allows you to play any audio beep file (e.g. wav or mp3) you want using the HA media player integration, but you can also use text to speech for voice announcements.

I found these on farnell.com:

Is it better for me to choose one with a lower resonant frequency (ABT-438-RC), or should I go for one with lower rated voltage (ABT-431-RC)?

The resistor in your circuit diagram, is it on 100 ohms or 100k ohms?

I love your idea of using a chromcast audio, but for now I only want a beeper.

They’re buzzers. Note the “tone: continuous” in the data sheet.

Bummer!

I ended up buying a piezo with contiuous tone. I guess I have to satisfy with one tone only. However, the one I bought do have a supply voltage from 3V to 7V DC that I intend to supply with Wemos 5V pin. My USB charger will power the piezo as well.

Connection diagram:

Resistor R1 and R2 is to limit the maximum current. R3 according to the piezo manual.

I can’t wait to get the devices! Do you think it will work???

I see no reason why it would not work. If it is a buzzer with integrated drive electronics you can use a switch rather than pwm to control it.