Share eletromechanical buzzer between 2 mcu’s

drivermicrocontrollermosfetpiezo-buzzer

I'm trying to 'share' a buzzer between 2 separate mcu's, one is on a multirotor flight controller (STM32 or Atmega328), the other is a module I'm adding that needs to use the same buzzer.

diagram: left side is flight controller (cannot change), right side is my module simplified.

The issue I'm having is that the buzzer driver circuit varies on flight controllers, some use a low-side switch (see diagram), but some use a high-side switch. I'm trying to come up with a solution that will work in both situations, which I think means I need to supply my own v+ and gnd to the buzzer.

Can anyone refine my circuit (I'm not sure it would work), or offer something better?

thanks!

enter image description here

Best Answer

Does the high side-driven version of the buzzer still use a PNP transistor? If so, the MCUs could use open-drain outputs in a wired-OR configuration. Otherwise, you might need some glue logic. Just switching VCC and/or ground won't do it; that'll just disable the buzzer.

Your circuit on the right won't work. You can't drive the NMOS and PMOS gates with the same signal since one of them will turn off. (Also, the source of your PMOS should be on the 3V side.) But you shouldn't need to switch both power and ground. A low-side NMOS to switch the ground would do what you want, but again, I don't think that'll let you control the buzzer.