grow-python
grow-python copied to clipboard
Increase frequency of beeps to improve loudness
There's an observation in Pimoroni Forums: Grow kit feedback
The piezo alarm is, in my opinion, very quiet. I will definitely not notice it chirping about dry soil from the other side of our busy kitchen.
I don't have an unboxed grow board to test this with but I suspect you are using a small piezo buzzer which performs at higher frequencyes (2-3 kHz) in terms of loudness but the code currently shows a liberal sprinkling of 440Hz. That's a useful referernce (A4) but may not be a good choice for producing a beep that's audible at a distance even with its square wave harmonics.
https://github.com/pimoroni/grow-python/blob/bc5fec56c69fdef26f9f47660df3d892a377a04c/examples/monitor.py#L786
And
https://github.com/pimoroni/grow-python/blob/bc5fec56c69fdef26f9f47660df3d892a377a04c/library/grow/init.py#L14
https://github.com/pimoroni/grow-python/blob/bc5fec56c69fdef26f9f47660df3d892a377a04c/library/grow/init.py#L45
Those two could also be a single variable rather than two independent values.
I don't know if there's already use of different perodic beeping to indicate different emergency conditions but frequency could also be a part of this using the frequency to effectively increase volume, i.e. as it gets drier beep at 550, 1100, 2200Hz.
For what it's worth, I tried changing the frequencies a LOT, but it didn't make much difference. I too thought it would just be a matter of finding the right frequency for the particular sounder.
Saying that, my 9yo kid could hear the (default) beeping from across the room.
My recollection is you can barely here C3 (263.74) on a transistor amped 5mm speaker but C6 and C7 are strangely loud at least in a relative sense. The Adafruit CLUE has this setup on the reverse-side of the board.
- Adafruit CLUE metal detector - venturing outside (YouTube) - higher frequencies on the CLUE audible at a range of around 2m outside
- Adafruit Forums: Speaker issues on CLUE - discussion on frequency range of CLUE speaker vs louder Adafruit Circuit Playground Express (CPX)
- Adafruit Forum: What is the speaker on the Circuit Playground Express? - discussion about the larger (amplifier-driven) 7.5mm speaker on CPX including data sheet frequency response of a similar speaker
The CUI CMT-0503-75-SMT-TR might be comparable, the frequency response from datasheet is shown below:
These devices often have a resonant frequency where it gets very loud. I'm not sure if it's healthy for the device to deliberately use that.