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?