2-pin Buzzer in Revolution
« on: February 02, 2022, 02:01:54 am »
Can I install a 2-pin buzzer in the  Revolution board? I am following the instruction in https://librepilot.atlassian.net/wiki/spaces/LPDOC/pages/6324237/Add+a+buzzer+to+Multirotor+frame, I have set a channel 6 in the radio, configured it as PPM in RCInput, assigned it to accesory 0 and  configured Outputs. Now my doubt is where I have to connect the buzzer red and black wires to the output channel 6 of the board? GND, VCC, Signal?

Re: 2-pin Buzzer in Revolution
« Reply #1 on: February 04, 2022, 08:38:16 pm »
I am guessing that the buzzer buzzes when it has simple 5v power connected.  That it does not need fluctuating power like an audio speaker does.

The wiki instructions are how to set up a 3 wire buzzer where you have strong power plus a PWM signal (buzzer on above 1500us and off below 1500us) (and ground).  There are instructions to connect an arming LED, and they show using a transistor to boost the weak FC signal so that it can power the LED.  You will probably have to do something similar.

First of all, all the FC outputs are 3.3V.  Does it buzz with only 3.3V?  Secondly, how much current does it draw and is that more than can be supplied by the FC output signal (not power, since you want to "switch" the buzzer power on and off)?  Does FC output supply more power as source or as sink?

I haven't done this, but output settings (System -> Settings -> Actuator Settings -> Channel Type) include "PWM Alarm Buzzer" (this would probably be a 3 wire buzzer) etc.  I would try these, with Output -> Channel Min, Neutral, Max set to 0, 1, 2 on a separate bank where the bank update frequency is set to 2.  I don't know why "PWM Alarm Buzzer" is even needed.  How is it different than PWM?

The first 6 outputs are the servo/ESC pins, so if you have a spare there, just use that.  Else you will need to configure FlexiIO (PWM Inputs) to be used as outputs and use one of those.

If you are lucky (buzzer will work at 3.3V, FC output can produce enough power to run buzzer, setup works), this will have it off, or beeping twice a second.  My guess is that the FC output is not strong enough to power the buzzer directly like this.

I would do all my initial work using a voltmeter instead of the buzzer.  Voltmeter uses almost zero power from FC output line.  When you get that running correctly, you can try the buzzer, and measure the voltage across it to see if the FC can supply enough.  I think it cannot.  In that case you will need to make a transistor circuit as described in "Arming LED" link below.  It is just a whole lot easier to buy a 3 wire buzzer so the FC output signal does not have to supply a large amount of power to actually run the buzzer.  Just enough to run the buzzer signal.

Futher reading that may help:
https://librepilot.atlassian.net/wiki/spaces/LPDOC/pages/76939283/External+arming+led+for+CC3D
https://librepilot.atlassian.net/wiki/spaces/LPDOC/pages/26968084/OpenPilot+Revolution
« Last Edit: February 04, 2022, 08:51:57 pm by TheOtherCliff »

Re: 2-pin Buzzer in Revolution
« Reply #2 on: February 07, 2022, 11:02:25 am »
Thank you. I'll get a 3-wire buzzer instead.