My continuing Pico W project requires a buzzer to attract my attention. I have a Piicodev expansion board and a Piicodev buzzer module (piico.dev/p18) connected.
I have downloaded the examples from this link
I saved the files to the pico w no problem but when it runs it is really quiet. I found the volume settings (0,1,2) but it makes very little difference. I have to hold it up to my ear to really hear it but I need to be able to hear it across the room. If this is the maximum sound it can make then what else would people suggest to make a louder sound. I only need a few different sounds to indicate different things.
Interesting, usually I’ve found that comes from continuity issues on the board. Any way that you can post a close up photo so that we can take a look at the component seating on the board? Also, did you find the behaviour was the same from both JST-SH/PiicoDev connections to the board?
I have tried both connections on the little piico dev board and they are both the same. Perhaps I just have unrealistic expectations.
I’m not sure how best to describe the volume I’m getting.
I’d say about 10% the volume of one of those novelty gereeting cards.
The connections all seem good. Here are some photos.
That probably means Piico Buzzer Module is working correctly.
I went for a low tech workaround and ripped apart an old telephone hand piece and removed the speaker from the ear end.
I found an example micropython script to play a tone and fiddled with the numbers to make it as loud as it would go. Thankfully I didn’t fry anything. It’s now loud enough to hear across the room and above the TV.
FYI I’m working on a gate alarm so I know when someone opens the front gate which is 300m away.
To test I connected a switch to pins 16 and Ground plus pins 15 and Ground to the speaker wires.
I just had a guess at the polarity of the speaker either the polarity doesn’t matter or I got lucky.
This code now plays a tone when the button is pressed and stops when it’s released as it’s a momentary switch.
`from machine import Pin, PWM
from utime import sleep
# Set GPIO pin for audio output
buzzer = PWM(Pin(15))
buttonPin = 16
# The button pin uses a pull up resistor so that it's value is 1
# when it is not pressed and 0 when it is pressed
button = Pin(buttonPin, Pin.IN,Pin.PULL_UP)
# Set maximum volume
buzzer.duty_u16(40000) #40000 seems to be maximum volume
# Play tone
# Set minimum volume
# Invert the 1-0 so that 1=button pressed
return not button.value()
if get_button() == 1:
print(str(count) +" Button Pressed")
#print(str(count) +" Button Not Pressed")
Just looked up the specs for that buzzer.
65db @ 10cm, 3V, 4000Hz.
That is not terribly loud although you should be able to hear it.
There is a chart showing approximate levels expected from everyday items with the distances listed here.
which is interesting.
The other thing, This is being driven at 4kHz isn’t it ??? This would be the resonant frequency of the device and likely drops off fairly sharply either side of this.
I was considering looking this stuff up but db is always difficult to get in your head. Based on the distance from the source and the ever steeping scale. I was actually surprised at the db value it stops being sound and turns into a shock wave. Not much risk of that though.
Yes, dbs can get a bit confusing as it is all a square law scenario. That figure is quoted at 10cm which is pretty close. To give you some idea if you double the distance (20cm) the power is divided by 4 or the sound pressure is reduced by 6db or in this case to 59db. Doubling again to 40cm reduces the sound pressure by a further 6db to 53db and so on.
I say sound pressure as this is what it is all about. 0db (the reference point) is taken to be 20 micro Pascals which is apparently the arbitrary bottom level of human hearing. By the way the term “db” is a power ratio and should have a suffix added to indicate the particular reference (like dim for a 1 mW reference or dbV for 1V and so on) but in the case of sound power it is very rarely used. Sometimes you will see “A” or “SPL”.
If you just want an alert buzzer I suggest the ubiquitous piezo buzzer. They are cheap, will run off 3.3V so can be directly connected to the GPIO and make a very (annoying) loud noise at a fixed frequency.
I did think about purchasing one of those piezo speakers but didn’t want to wait for it to arrive. So I turned my stash upside down and came up with a telephone ear piece. It’s actually small enough and loud enough to do the job.
Hi everyone - we’re going to look into making the PiicoDev Buzzer louder. It may come at the cost of volume control, but as is already clear - volume control isn’t very useful when you can’t hear the thing in the first place!
Also worth pointing out we don’t perceive the same “loudness” of sound at the same sound pressure levels across different frequencies. So assuming the Piicodev is emitting at a constant dB SPL across its frequency range, different frequencies will sound louder and softer to each other.
For more information, Google “Fletcher-Munson curves.”
I’m really impressed you guys are going to investigate further.
I know it’s designed as learning tool and it’s also tiny so my expectations were reasonable. Perhaps the next version will exceed them.
And you can get our latest projects and tips straight away by following us on: