I have a 6-28VDC piezo buzzer I'm using at 24VDC. The line has 3-4 VDC when the output is off, which has a soft but annoying buzzer constantly. What the the easiest way to filter that out so I only get buzzing when the output is activated? I tried using resisters which works, but then decreases the overall sound level (of course)
Not every buzzer is a piezo buzzer and not every buzzer does the buzzing by itself. Some buzzers have only a piezo disc and for those a tone signal is needed to make it beep. Other buzzers only need a DC voltage and they start buzzing at a fixed frequency. The actual sound can be generated with a piezo or a electro-magnetic element (like a mini speaker).
I'm not sure which buzzer you have. I think it will not draw a lot of current, therefor a zener diode of 5.6V should work.