Hi all,
i built an doorbell with ESP32 CAM and got an issue with this buzzer;
YL44 Buzzer
As I cant use "tone" on ESP32 this is the (simplified) code that generates the tone:
// BUZZER CONFIG
int pin_buzzer = 1;
const int channel = 15;
const int frequency = 2000;
const int resolutionBits = 12;
void setup() {
pinMode(pin_buzzer, OUTPUT);
ledcSetup(channel, frequency, resolutionBits); // BUZZER
ledcAttachPin(pin_buzzer, channel); // BUZZER
}
void toneSIMPLE() {
ledcWriteTone(channel, 783);
delay(500);
ledcWriteTone(channel, 0);
delay(20);
ledcWriteTone(channel, 659);
delay(500);
ledcWriteTone(channel, 0);
}
.. in loop function toneSimple is called when ring button is pressed.
My issue is, that the buzzer is getting very hot when its idle. A simple thermometer shows about 55°C on the surface constantly.
This was my first project with a PCB, here is the layout:
Any thought on this?
What am I doing wrong?
Any help is much appreciated