0
\$\begingroup\$

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

\$\endgroup\$
4
  • 2
    \$\begingroup\$ That sounds awful. Why not have one MCU tell the other to sound the buzzer? \$\endgroup\$ Commented Dec 21, 2014 at 16:44
  • \$\begingroup\$ yeah, its a weird situation. I cannot make changes to the existing flight controller on the left side, only to my circuit, although I will double check that. \$\endgroup\$
    – protoc0l
    Commented Dec 21, 2014 at 16:47
  • \$\begingroup\$ What voltage is Vcc? Do you want it to work with no wiring changes between types? \$\endgroup\$ Commented Dec 21, 2014 at 20:52
  • \$\begingroup\$ vcc is 5v (possibly 3v3) on the flight controller side, my module is 3v. Yes, no re-wiring of module (or, maybe one jumper) to accommodate both types of beep drivers found on flight controllers. \$\endgroup\$
    – protoc0l
    Commented Dec 21, 2014 at 22:37

2 Answers 2

1
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\begingroup\$ can't say for sure how the high-side flight controllers are wired, I don't have one on hand. I rushed my circuit diagram to add the the post, I'll fix the stuff you pointed out, thx! \$\endgroup\$
    – protoc0l
    Commented Dec 21, 2014 at 17:11
0
\$\begingroup\$

Maybe something like this

schematic

simulate this circuit – Schematic created using CircuitLab

This comprises current-limited high and low side drivers. The input must be inverted depending on whether the driver is high or low side type. Because the drivers are current-limited, even if it is configured incorrectly it will only put 25mA extra through the external switch so it's unlikely to cause damage (but check this for the available types). This could be two dual transistors and four resistors, not too bad.

Or forget about the configuration in firmware and simply drive the two switches on for whenever you want the buzzer on, and have two connections depending on the type (might be easier). Having the outputs current limited reduces the possibility of problems in either case.

\$\endgroup\$
1
  • \$\begingroup\$ thx for answering, I think I am warming up to the idea having separate pins, or an extra jumper. \$\endgroup\$
    – protoc0l
    Commented Dec 21, 2014 at 22:46

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.