It’s 2:15 AM. You’re testing a MOSFET gate driver on a bench power supply. You set the duty cycle to 40%, hit ENTER, and suddenly your lab sounds like a robotic mosquito trapped inside a stainless steel teapot.

Why? Pulse Width Modulation (PWM).


📦 The Physics of the Mosquito Whine

When you feed a DC motor a PWM signal, you aren’t actually giving it 6 Volts. You’re giving it 12 Volts, 0 Volts, 12 Volts, 0 Volts, twenty thousand times a second.

The motor coils don’t see average voltage — they see a violent square wave of magnetic flux. Every time the magnetic field snaps ON and OFF, the copper windings literally expand and contract due to magnetostriction and Lorentz forces ().

Your motor isn’t just turning a shaft. It’s acting as an accidental speaker.

[MOSFET Gate]  ─── (Square Wave @ 16 kHz) ───>  [Motor Windings]
                                                        │
                                          (Lorentz Force Vibrations)
                                                        │
                                                        ▼
                                       [Your Eardrum @ 2 AM: 🔊 🦟]

👂 Your Ear is just a Biological Fourier Transform

Here’s the wild part: your cochlea (the spiral thing inside your inner ear) is physically shaped like a logarithmic frequency analyzer.

High-frequency sounds (like a 16 kHz PWM switching spike) vibrate the stiff hair cells near the base, while low frequencies vibrate the apex.

When you switch a motor at 16 kHz:

  • To your MCU: “I am efficiently controlling power with zero heat loss.”
  • To your inner ear: “A tiny physical hammer is hitting hair cell #14,200 sixteen thousand times per second.”

💡 The Solution (Or: Why 25 kHz is the Magic Frequency)

Why do commercial motor drivers use 20 kHz+?

Not because the motors care. Motors don’t give a damn if you switch at 1 kHz or 100 kHz (as long as time constants are satisfied).

We switch above 20 kHz purely because human biology gets old and stops hearing it.

If you’re over 20, your upper hearing limit drops to ~16–17 kHz. If you up your RP2350 PIO PWM clock from 16 kHz to 24 kHz, the physical sound wave is still hitting the air molecules… you just become biologically deaf to it.

Engineering solution: If the physics hurts your ears, push the physics out of biological frequency range. 🧠