# Increase volume of Piezo Buzzer

I recently bought a 3-24V Piezo Electronic Tone Buzzer Alarm. I would however like to increase the volume. Bare in mind that my electronic knowledge is (unfortunately) at the very basic level of; find a tutorial/blog, follow instructions to plug in the gpio cables, make celebratory sound because it works!

From what I could gather, the 5V pin on the Raspberry gave less volume than if I just connected the buzzer directly to a 9V battery. So more volts equals more volume? I then figured that I would probably need to set up a circuit in which I connect the onboard 5V to a transistor, to jump up the voltage to 24V, to get maximum volume. I thought something like this might help (https://www.pishop.co.za/store/dc-dc-adjustable-step-up-power-module), but it seems more expensive than needs to be? Something like this might be cool if I needed to keep changing the voltage, but I know at which voltage I want to end up.

Could someone please assist with a very basic circuit from the Raspberry Pi GPIO to the buzzer, allowing me to get maximum volume (24V) from the buzzer, with the names of all the transistors, resistors, etc that I would need.

• Wouldn't simply using a 5V piezo buzzer be simpler, louder and more cost-effective? Do you specifically need to use that 3-24V piezo for some reason? Sep 6, 2017 at 14:13
• Yes, essentially volts = volume with a piezo since you cannot decrease their resistance (so more formally, I = volume, and I = V/R, but you can only control V, or increase R). Sep 6, 2017 at 14:31
• @bobstro, a 5V piezo wont be louder than a piezo running more volts. I am buzy building a automated dairy milking system, and our vacume pumps are quite loud inside the dairy, so the sound from my 5V piezo is very faint, almost negligible. Thats why I need to upgrade to try and get more volume.
– ljc
Sep 6, 2017 at 16:04
• Thanks @goldilocks, that explanation makes sense. So how do I go about increasing the voltage directly from the raspberry pi?
– ljc
Sep 6, 2017 at 16:07
• @ljc - Would a 5V Piezo at 5V be louder than a 24V Piezo at 5V was my suggestion. For an indoor setting, it might be loud enough, but with the additional detail you've provided regarding the dairy, I can see why you might want the big unit! In some of the loud industrial settings I've worked in, they add a stack light for a visual indicator for these sorts of things rather than trying to overwhelm the already-loud sounds and get through the mandatory hearing protection everybody's wearing. Sep 6, 2017 at 18:08

A common solution is to power the high voltage device from a dedicated power source, but control the current flow via a logic-level MOSFET or transistor from a 3.3V or 5V microcontroller. Adafruit has a good tutorial on powering 12V LEDs and controlling them from a microcontroller using MOSFETs that might be useful -- it's more info with images than I can summarize here. You could, of course, simply control power to the buzzer using a relay, but this will be a more bulky and possibly expensive approach.

The Pi isn't going to give you more than 5 V natively. To go beyond that, you either need to use an external power supply, which you can switch on and off with a transistor, or you need something like a "boost converter" to up the voltage on one of the GPIO pins. If you do the latter, you need to take care to ensure that you don't accidentally pull more current than the Pi can safely provide.

Emphasizing in light of the comments: The first of the two options is potentially risky to your Pi if you cannot properly compute, measure, and control the current pulled. For that reason, it's not ideal for most beginners.

If you want the simplest answer, try the first option with external power supply. It adds the complication of a transistor, but you should be able to find a lot of information about how to create a simple circuit of this type. Your GPIO pin will connect to the gate on the transistor (through a resistor) and the other pins will go in series with the buzzer and external power supply.

• I would not use a boost converter on a GPIO pin! Using a power pin should be okay (if that is confusing, the 5 and 3.3 V power pins are not general purpose input/output pins, so the breakout is not all GPIOs; some of them are power and ground). However, I'm a little leary of what boosting 5V to 24V will mean in terms of current. You should investigate that before you go that far (possibly with an ammeter). Sep 6, 2017 at 16:40
• I agree with @goldilocks that the power converter on the GPIO pin is generally risky. For this specific application, it's probably ok though since the buzzer should not pull so much current. Definitely for beginners, don't start there unless you can compute or otherwise measure the current that will be drawn. Sep 6, 2017 at 16:42
• @Brick, so would the step up power module that I suggested in the link above not be a solution? Would it not take care of the current regulation and protect my pi?
– ljc
Sep 7, 2017 at 3:22
• What you linked looks - at first glance - like it's got more than you need but it might work in terms of boosting. It will not necessarily protect your Pi. I don't immediately see anything there that will limit the current to the Pi's GPIO bounds. That doesn't necessarily mean that to much will be drawn because that ultimately depends on your load, but I don't see an explicit protection. ["Short circuit protection: (limit current 14A)." probably won't cut it because 14 A is way over the GPIO's ability.] Sep 8, 2017 at 2:59