3
\$\begingroup\$

I just assembled my PCB design that uses an ESP32-c3-mini-1 as the brain.

I'm testing all the peripherals and found an error when testing buzzer circuit.

I'm using a T2N7002BK N-channel LM MOSFET as a switch to control 5V connected to a buzzer:

enter image description here

I am using only one buzzer. The MOSFET is controlled with the ESP32 using a 50% PWM signal with a frequency of 1kHz. I don't get any sound out of the buzzer. I used LTspice to simulate this schematic. Based on the simulation results, it should work:

enter image description here

This is the result I want to achieve, 5V pulse signal. I tested my PCB with an oscilloscope, everything seems to be fine until the MOSFET part. The 3.3V pulse signal is present on resistor R23, but the MOSFET does not open at all. When I short buzzer (placing my finger on contacts) it makes a super silent sound and I can see around 1V peak then a fast decay of a signal on the buzzer+ node.

Any ideas why my MOSFET is not working? Is it a faulty component, soldering error or schematic flaw?

\$\endgroup\$
5
  • \$\begingroup\$ my bad :) I'm not native english speaker, sometimes silly mistakes pop up \$\endgroup\$
    – Dominykas
    Commented Apr 21, 2023 at 9:32
  • \$\begingroup\$ These parts are self-contained parts with built-in oscillators and they only need a voltage to make a beeping sound. You don't need to make the sound wave yourself with PWM \$\endgroup\$ Commented Apr 21, 2023 at 12:17
  • \$\begingroup\$ well I tried making just a steady voltage running through them, but they make just 1 click and then stay silent. \$\endgroup\$
    – Dominykas
    Commented Apr 24, 2023 at 5:56
  • \$\begingroup\$ Your first schematic shows an off-page symbol "Red_Led". Is this an LED in series with the gate? That would reduce the drive voltage by as much as 2 volts, which could explain the problem. \$\endgroup\$
    – PStechPaul
    Commented Apr 25, 2023 at 6:07
  • \$\begingroup\$ yes, this pin also controls anoother mosfet to drive 2 LEDs. \$\endgroup\$
    – Dominykas
    Commented Apr 25, 2023 at 13:46

2 Answers 2

1
\$\begingroup\$

There is quite a bit of confusion here from some of the other users. The two buzzers you have listed in your schematic are completely different. The CMI-1295IC-0585T has internal circuitry for oscillation and the PKM13EPYH4000-A0 does not and requires external drive. I linked to their Digikey pages which list under "Driver Circuitry" which type they are.

For the CUI one, you should short R24 and connect the buzzer normally. The polarity on this buzzer matters so make sure (+) goes to the +5V supply and (-) to the drain of the MOSFET (just like in your schematic). However, you need to drive the MOSFET gate with a static ON or OFF signal from your ESP32; i.e. no PWM or oscillation.

For the Murata one, you should take a look at the last page of the datasheet for examples of the recommended external drive circuitry. Notice the parallel 1kΩ resistor across the device in both examples. Going off of this, you should change R24 to 1kΩ, connect the buzzer across R24 (polarity doesn't matter with this buzzer), and short the Buzzer+ and Buzzer- nodes. In this configuration, your ESP32 should spit out the oscillating control signal as originally intended. The benefit of this buzzer is that you can adjust the frequency by changing your control signal, but note the plot in the datasheet which shows how the volume changes with frequency.

If you need your PCB to support both types of buzzers on the same footprint, then you'll have to come up with a way to accommodate both (e.g. using zero ohm jumpers).

\$\endgroup\$
1
  • \$\begingroup\$ I see, thank you very much for the answer. \$\endgroup\$
    – Dominykas
    Commented Apr 25, 2023 at 13:51
3
\$\begingroup\$

Your buzzer takes 30mA at 5V supply, according to its data sheet. The 220 ohm resistor would drop 6.6V at 30mA. Try without the resistor. Incidentally, 2N7002 is a N-channel device.

\$\endgroup\$
4
  • \$\begingroup\$ ahh yes, my mistake, its N-channel. And will try removing resistor. \$\endgroup\$
    – Dominykas
    Commented Apr 21, 2023 at 9:42
  • \$\begingroup\$ @Dominykas And don't use PWM, just a simple, steady 3.3V at the gate to make it buzz. \$\endgroup\$ Commented Apr 21, 2023 at 12:41
  • \$\begingroup\$ steady 3.3V doesn't do anything, just 1 click (btw now I'm using PKM13 buzzer). \$\endgroup\$
    – Dominykas
    Commented Apr 24, 2023 at 7:41
  • 1
    \$\begingroup\$ Update: I tried removing R24 resistor and shorting pads. No buzzing sound, but when I short buzzer ( I know that I am basically shorting 5V to ground this way) some audible sound comes out of buzzer. Osciloscope shows 5V to 4.5 V pulse signal on drain. Maybe someone can explain what is going on here? \$\endgroup\$
    – Dominykas
    Commented Apr 24, 2023 at 8:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.