Buzzer RAK18001 weak audio output

Several months ago we bought 30 of the RAK18001 buzzers to add to our customised sensor product (RAK19007/RAK4631), to alert the user of power on, gateway joining, charging and such like. I’d actually bought 2 previously to test, then later the 30. The the first 2 buzzers seemed rather quiet, though just about satisfactory. But many of the subsequent 30 are so quiet, you can barely hear them inside the B2 case, unless you put the case up to your ear. Is this normal?

I based my code on the example here: https://github.com/RAKWireless/WisBlock/blob/master/examples/RAK4630/sensors/RAK18001_Buzzer/RAK18001_Buzzer.ino
The only thing that I really changed (except that tune) was that after each use of the buzzer I set the IO pin LOW, because it seems that otherwise the pin can be left in a non-zero condition and power leaks through the buzzer, consuming a lot of battery.

The buzzers are installed in Slot C of the RAK19007. This is the section of code I’m using to produce a rinsing tone at bootup:

// BOOTING RISING TONE ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
pinMode(WB_IO3, OUTPUT);
digitalWrite(WB_IO3, LOW);
int pitch = 300; // frequency of start of rising tone
while(pitch < 1500) // frequency of end of rising tone
{
tone(WB_IO3,pitch);
delay(30);
pitch = (int)(pitch * 1.02); // increase pitch frequency by 2% each time
}
noTone(WB_IO3);
digitalWrite(WB_IO3, LOW); // turn off the GPIO so current can’t leak through

Is there anything I can do to make the buzzers louder?

I am afraid there is nothing you can do. The buzzer is directly driven by 3.3V supply and there is no current limiter or similar. (Unless I missed something)

image

I wrote a short post about this and posted it on the forum now. In order for the sound quality to be good and the module not to overload the system, you should use libraries to work with the PWM of your microcontroller. Don’t use Arduino’s tone(). This function causes the buzzer to heat up and is able to overload the microcontroller by current (this was written on the forum earlier).
Among other things, the buzzer has a “resonance” (that is, the frequency at which the buzzer works loudly). This can be read in the datasheet of the buzzer.
In order for the sound to be loud, the resonance of the buzzer must obviously be taken into account.
Hope my tips are helpful! Good luck!