0
\$\begingroup\$

How to calculate PWM duty cycle to compensate for different piezo sounder response at different frequencies?

I have a piezo sounder, and the datasheet informs me that I will get the following response:

Frequency Response 200Hz 74dB 1000Hz 81dB

If I set my PWM duty cycle to 100% at 200Hz to get 74dB, how do I calculate the PWM duty cycle required to give the same response of 74dB at 1000Hz?

Thanks kindly for any help.

\$\endgroup\$
7
  • 1
    \$\begingroup\$ Uh. If you set your PWM to either 0% or 100% at 200 Hz you get 0 Hz. Have you used PWM before? Do you understand what a piezo does and how it works? (allaboutcircuits.com/technical-articles/… ) Do you know what a natural resonance frequency (or frequencies) is or what it might mean to operate something away from that frequency? You have some reading to do. \$\endgroup\$
    – jonk
    Commented Jul 26, 2017 at 23:52
  • \$\begingroup\$ It's an inverting output. So 100% duty cycle is not DC. \$\endgroup\$
    – Tantalum
    Commented Jul 27, 2017 at 0:08
  • \$\begingroup\$ Yes, I've used PWM before. It works fine on my current project. Just looking to add a few refinements. \$\endgroup\$
    – Tantalum
    Commented Jul 27, 2017 at 0:10
  • 2
    \$\begingroup\$ Measure it with a SPL meter, and adjust accordingly. Seriously, there are going to be a ton of variables which influence a calculated answer. \$\endgroup\$
    – rdtsc
    Commented Jul 27, 2017 at 1:19
  • 1
    \$\begingroup\$ @Tantalum: Jonk is correct. 0% PWM will result in 0 V continuous. 100% PWM will result in continuous V+ with no 0 V pulses. That is DC. If it is inverting then 100% will give you 0 V. That can be considered DC with a value of 0 A. \$\endgroup\$
    – Transistor
    Commented Apr 29, 2018 at 16:59

2 Answers 2

1
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

This is a variable clock or an Astable Multivibrator or a Relaxation Oscillator. Choose any buffer to suit the voltage or power level required. CMOS has an impedance of ~300 Ohms for 74HC and ~50 Ohms for 74ALCxx ~5V

\$\endgroup\$
0
\$\begingroup\$

A piezo sounder has a horrible frequency response. With a complicated linear EQ circuit I doubt you can make good sound, then it can feed a class-D (PWM) amplifier that powers the sounder. You did not post the part number or frequency response graph of your sounder, here is mine: piezo

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.