how to enlarge this speaker's volume?

Ya’akov

Joined Jan 27, 2019
10,262
Thanks.
do you have a products recommended?
There are an enormous number of options for passive piezo buzzers. They are generally cheap as dirt.

This random example is about 48 cents a piece, including shipping, for 5 pieces. It runs on 2-5V and resonates at 2700Hz.

IMG_1589.jpeg

This article describes how to drive one, the signal source can be a GPIO pin from your ESP32. You could drive it right from the pin but this is not recommended as you might find your pin suddenly not working any more. The simple transistor scheme in the article is probably enough. If you use a 2700Hz tone, very little power will be needed to make a very loud sound.
 

KeithWalker

Joined Jul 10, 2017
3,608
No one has really answered your original question! The problem is that DIO pins on an ESP32 can only sink and source a small amount of current and are not suitable for driving a low resistance device. You need to add a transistor to drive the speaker with more current to get a louder tone:
SpkrAmp.jpg
 
Top