Lesson 2

The Simplest Switching Circuit: Square Wave Output

With switch + PWM control, the load sees a square wave. Average value Vout = D × VIN.

Now we replace the divider resistor with a switch. A DC source, a PWM-controlled switch, connected directly to a resistive load.

When the switch is ON, the load gets VIN (12V); when OFF, load voltage is 0. The output is a square wave toggling between 0 and VIN.

The average of this square wave is Vout_avg = D × VIN, where D is the duty cycle (fraction of period the switch is ON). With D=50%, the average output is 6V.

What about efficiency? An ideal switch has Ron≈0 when on (no voltage drop, no loss); when off, no current flows (no loss). So the switch itself wastes almost no energy!

But the problem: we need a steady DC 6V, not a 0-12V square wave. How do we 'shape' this square wave into smooth DC?

Switch + Resistive Load: Square Wave

VIN=12V, PWM 10kHz, D=50%. Output is a 0-12V square wave, average 6V.

After reading this section, run the simulation and observe the waveforms. To explore further, open the example in a standalone page.

Key Takeaways

  • Switch + PWM produces a square wave with adjustable average
  • Vout_avg = D × VIN (D is duty cycle)
  • The switch itself dissipates almost no power — key to efficiency
  • But a square wave is not the DC output we need — filtering required

Watch Items

  • Output waveform is a clear square wave: high≈12V, low≈0V
  • Try changing the PWM width parameter to vary duty cycle and observe the average change