1

Buzzer Circuit

I am trying to establish if this buzzer circuit going to perform as expected

MPU: STM32 running at 3.3V, input will be coming from a GPIO pin that has a timer channel on it
Buzzer: A passive magnetic buzzer, 5V rated, similar to this
U4: An AO3400A MOSFET, datasheet
D2: SM4007PL diode

Can you see any issues that would cause MOSFET to not open, or impact operation negatively by any other means?

Charles
  • 137
  • 6

1 Answers1

3

Looks fine. It's a magnetic buzzer, not a piezo type.

I would use a switching diode such as LL4148 rather than a rectifier type, and I would increase the gate resistor greatly, maybe 1kΩ (and increase R6 to 100kΩ). There's no reason to have it switching that quickly for an audio signal.

Spehro Pefhany
  • 376,485
  • 21
  • 320
  • 842
  • Thank you. If I increase R4 to 1kΩ will it still provide enough Vgs to open the MOSFET? Is it the case that the current is negligibly low hence the voltage drop over R4 is too small? As for R6 do I get it correctly that this is a pull-down resistor for GPIO and higher value avoids wasting power? – Charles Jul 07 '23 at 13:47
  • 1
    There's little DC current -- 3.3V/(R4+R6) when high and about zero when low. The gate itself does not draw significant DC current, just pulses when the gate charge is changed (to turn it on and off). The switching speed is from the gate charge charging and discharging through R4. Increasing R4 slows the edges . However R4 and R6 form a voltage divider so R6 should be much higher than R4 to avoid reducing the gate drive voltage by much. – Spehro Pefhany Jul 07 '23 at 14:49
  • 1
    Slowing the switching is a two-edged (pun intended) sword - it increases switching losses because the MOSFET spends more time in between on and off, but it also reduces the peak current from the MCU and reduces EMI. 1kΩ is okay in this case, as would be a bit higher or lower. – Spehro Pefhany Jul 07 '23 at 14:51