Skip to content

Increase frequency of beeps to improve loudness #12

@kevinjwalters

Description

@kevinjwalters

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.

def __init__(self, image, enabled=True, interval=10.0, beep_frequency=440):

And

self.pwm = GPIO.PWM(gpio_pin, 440)

def beep(self, frequency=440, timeout=0.1, blocking=True, force=False):

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions