I was working adding a buzzer support to BBBMini and I this is how you can add too. This is a two parts Hardware and Software.

HARDWARE

First, to avoid problems with current, you will need a little circuit with:

- 1K resistor

- 1NPN transsistor(in my case BC 548)

- 1 5V buzzer - I'm using this one: http://www.banggood.com/5V-Active-Buzzer-Alarm-Beeper-With-Cable-for-FPV-Racer-Quadcopter-Drone-DIY-p-1032123.html

The circuit:

3691296082?profile=original

In my case instead to use a PCB I create this circuit using a servo cable as follow:

3691296022?profile=originaland 2 pins on the end

3691296099?profile=originalOn BBB Board, I cut the last pin header(PWM output 12) and solder a cable from pin P8_32 to PWM output 12 - with that, the servo cable fit perfectly.

SOFTWARE 

Part 1 - Linux

First of all, we need a DTB file to enable pin8_32 as output( file attached BBBMINI-BUZZER.dts )

and them compile dtc -O dtb -o /lib/firmware/BBBMINI-BUZZER-00A0.dtbo -b 0 -@ BBBMINI-BUZZER.dts

To enable, you must load the dtbs with echo BBBMINI-BUZZER > /sys/devices/platform/bone_capemgr/slots

In my case I put this on /etc/rc.d/rc.local file

Part 2 - Arducopter


I submit my code to ardupilot master branch, so I will update when wil be avalable.

for tests, I'm attaching the 3 files (Buzzer.cpp, Buzzer.h and AP_Notify,cpp)

This is a video demonstrating

https://www.youtube.com/watch?v=vv_NJRjgKLw

Some considerations:

1) The servo cable is a workaround, a PCB is better but I think the servo cable structure can be improved.

2) The buzzer is a 5 volts

AP_Notify.h

Buzzer.cpp

Buzzer.h

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Developer

    Good stuff! I thought about adding a buzzer in the past, great you did it and thanks for sharing!

    Cheers

    Linus

This reply was deleted.