Add a buzzer (beeper) to the router

A buzzer or beeper is an audio signalling device tipically used for alarms or timers. They need an oscillating circuit to make them work. Fortunatelly there are in the market buzzers with the oscillating circuit already built in. These buzzers with the oscillating circuit included are usually called:

  • Active buzzers
  • Self-drive buzzers
  • DC buzzers

They are commonly made with a piezoelectric buzzer plus the oscillating circuit. They work with a DC power source and the typical current consumption is about 10 mA.

The drawback of these active buzzers is they make beeps with a fixed frequency, about 2.3 kHz.

We can connect the buzzer to a LED GPIO driven on the router. Depending on the type of LED, active low or high, we will use a PNP or NPN transistor to feed the active buzzer. Almost any transistor should work since a buzzer doesn't require much current to work.

Most routers use use active LOW leds connected to GPIOs. Check both pins of the led, if one is connected to Vcc then it's an active low LED, if connected to GND then it's active HIGH.

When the led is active LOW, we must use a PNP transistor:

And when the led is active HIGH, we must use a NPN transistor:

This is a board with active low LEDs

It could be also possible to connect directly the buzzer in parallel with the led. This can be possible if the buzzer doesn't need more than about 2mA to work.

Of course it could also be possible to attach the buzzer to a free GPIO. GPIOs usually can supply about 4mA safetly. An active high circuit should be used in this case:

It's also possible to atach the buzzer directly to the gpio, but the buzzer shouldn't draw more than 4 mA

If you draw more current from the GPIO beyond its capacity, you could damage the SoC.

Since the buzzer is connected to a configurable LED on the router, they will be controlled together. Just configure the LED where the buzzer is soldered via Luci web interface, or use the sys filesystem interface.

Examples:

echo timer > /sys/class/leds/MYLED/trigger
 
echo oneshot > /sys/class/leds/MYLED/trigger
echo 1 > /sys/class/leds/MYLED/shot
 
echo morse > /sys/class/leds/MYLED/trigger
echo "SOS" > /sys/class/leds/MYLED/message
 
echo 1 > /sys/class/leds/MYLED/brightness
echo 0 > /sys/class/leds/MYLED/brightness
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • Last modified: 2018/03/04 16:28
  • by bobafetthotmail