Frequency in a waveform is the number of complete cycles that occur per second, measured in Hertz (Hz), dictating how fast a periodic signal repeats. When you are generating a waveform for power electronics, motor control, or signal processing, your default switching frequency should be 20 kHz to 50 kHz to avoid audible noise in magnetics, or 100 kHz to 500 kHz when you need to minimize the physical size of inductors and capacitors in DC-DC power supplies.

Before we look at the math, we need to clear up the most common confusion on the bench: frequency versus duty cycle. Frequency is how often the entire cycle repeats per second. Duty cycle is the percentage of that single cycle where the signal stays HIGH. Changing the frequency alters the timing of the whole cycle; changing the duty cycle alters the average output voltage without touching the cycle rate. You can have a 100 kHz waveform with a 10% duty cycle, or a 100 kHz waveform with a 90% duty cycle—the frequency remains identical, but the power delivered changes drastically.

What Frequency Actually Changes in Your Circuit

When you adjust the frequency in a switching waveform, you are fundamentally trading off physical component size against thermal losses and electromagnetic interference (EMI). Here is exactly what changes on your PCB when you turn the frequency dial up or down:

  • Magnetics and Capacitor Size: Higher frequencies allow you to use physically smaller, cheaper inductors and output capacitors. The energy transfer happens more often, so each individual cycle needs to store less energy.
  • MOSFET Switching Losses: Every time a MOSFET transitions from OFF to ON (and vice versa), it passes through a linear region where both voltage and current are high, generating heat. The formula for switching loss is P_sw = 0.5 × V_ds × I_d × (t_r + t_f) × f. Notice that f (frequency) is a direct multiplier. Double your frequency, and you double your switching heat. For a deep dive into calculating these thermal limits, refer to All About Circuits' guide on MOSFET switching losses.
  • Audible Noise: If your frequency drops below 20 kHz (the upper limit of human hearing), the physical vibration of inductor windings and ceramic capacitors will manifest as a high-pitched whine. This is notorious in poorly tuned variable frequency drives (VFDs) and cheap LED dimmers.
  • EMI and Radiation: Pushing frequency past 500 kHz creates sharper voltage edges (high dV/dt), which can radiate noise into nearby sensitive analog circuits or AM radio bands.

Worked Numeric Example: Sizing a Buck Converter Inductor

Let’s look at a real-world scenario to see how frequency dictates your bill of materials. Suppose you are designing a 12V-to-5V buck converter to power a microcontroller and a few sensors, drawing a steady 2A output. We will target a 30% inductor ripple current (ΔI_L = 0.6A).

The Inductor Formula:
L = (V_out × (V_in - V_out)) / (V_in × f × ΔI_L)

Scenario A: Low Frequency (50 kHz)
L = (5 × (12 - 5)) / (12 × 50,000 × 0.6)
L = 35 / 360,000 = 97.2 µH
The Result: You need a ~100 µH inductor rated for at least 3A saturation. This requires a large, heavy, through-hole or large-SMD drum-core inductor that takes up valuable PCB real estate and costs around $1.50 to $3.00 in low volumes.

Scenario B: High Frequency (500 kHz)
L = (5 × (12 - 5)) / (12 × 500,000 × 0.6)
L = 35 / 3,600,000 = 9.72 µH
The Result: You need a ~10 µH inductor. This easily fits into a tiny, shielded 0805 or 1210 SMD package, costs about $0.15, and allows you to shrink the output capacitors as well. The trade-off? Your switching MOSFET or internal IC will run noticeably hotter due to the 10x increase in switching transitions per second.

Where You Meet Frequency in Practice

Different applications demand entirely different frequency bands based on the physics of the load.

Motor Drives and VFDs (1 kHz to 16 kHz): When driving high-power AC motors or large DC brushed motors, the wiring acts as an antenna and the motor windings act as massive inductors. High frequencies here would cause massive EMI and destroy the IGBTs with switching losses. We accept the larger magnetics and keep the frequency low, usually between 4 kHz and 8 kHz, occasionally pushing to 16 kHz to push the whine out of the human hearing range.

Switch-Mode Power Supplies (100 kHz to 2 MHz): In modern DC-DC conversion, board space and weight are paramount. As detailed in Analog Devices' power supply design notes, modern controllers push frequencies up to 2 MHz to use microscopic chip-scale inductors. However, at these speeds, PCB layout becomes critical; a poorly routed ground trace will act as an inductor and destroy your voltage regulation.

Class-D Audio Amplifiers (300 kHz to 600 kHz): Class-D amps use PWM to drive speakers efficiently. The switching frequency must be placed well above the 20 kHz audio band so that a simple LC low-pass filter can easily strip the high-frequency carrier away, leaving only the clean audio waveform for the speaker cone.

Decision Tree: Picking Your Switching Frequency

Stop guessing and use this decision matrix to lock in your frequency and select the right component for the job.

Application Scenario Target Frequency Band Why This Band? Concrete Part / Pick
Hobby DC Motor Control (Arduino/ESP32 driving a robot chassis) 20 kHz Pushes just above human hearing to eliminate motor whine; slow enough that standard logic-level MOSFETs don't require complex gate drivers. IRFZ44N MOSFET with a 100Ω series gate resistor and 10kΩ pull-down.
Compact DC-DC Step-Down (12V to 5V for PCB logic) 500 kHz Optimal sweet spot for small SMD inductors without requiring extreme high-speed PCB layout techniques or suffering massive thermal losses. TPS54202DDCR (Texas Instruments 500 kHz integrated buck controller).
High-Power AC Motor VFD (3-phase industrial drive >5 HP) 4 kHz Minimizes IGBT switching heat and reduces dV/dt stress on motor winding insulation over long cable runs. Infineon IKW40N120H3 IGBT with a dedicated isolated gate driver.
LED Dimming (PWM) (High-power COB LED arrays) 1 kHz to 3 kHz Low enough to prevent EMI issues with nearby radios; high enough to prevent visible flicker on smartphone cameras (which typically sample at 30-60 fps). TLC5940 or standard 555 timer configured for 2 kHz.

FAQ: Waveform Frequency Edge Cases

Q: Why does my 12V DC-DC buck converter interfere with my AM radio and garage door opener?
A: Your converter is likely switching at a frequency whose harmonics align with the receiver's band. A 150 kHz switcher generates strong harmonics at 300 kHz, 450 kHz, 600 kHz, etc. If you are building a custom supply, shift your frequency to something like 350 kHz or 450 kHz to move the fundamental and its primary harmonics away from sensitive 433 MHz or AM broadcast bands, and ensure your inductor is physically shielded.

Q: Can I just set my ESP32 PWM to 1 MHz to make my motor run smoother?
A: No. While the ESP32's LEDC peripheral can technically generate a 1 MHz waveform, the GPIO pins cannot source enough current to charge the gate capacitance of a power MOSFET that fast at 1 MHz. The MOSFET will spend most of its time in the high-resistance linear region, overheat, and likely fail. For >100 kHz motor or power switching, you must use a dedicated gate driver IC (like the TC4420) between your microcontroller and the MOSFET.

Q: What is the default recommendation if I'm totally unsure?
A: If you are designing a general-purpose DC-DC power supply and lack the thermal simulation tools to optimize for extremes, lock your frequency at 500 kHz using a modern integrated controller like the TPS54202. It provides the best balance of small BOM size, manageable heat, and forgiving PCB layout requirements for 90% of maker and commercial prototyping applications.