AC vs DC

AC (alternating current) and DC (direct current) describe how electric current flows through a circuit. Most electronics runs on DC internally, but the power coming out of the wall is AC. Understanding the difference explains why power supplies exist, why transformers work, and why some components behave differently depending on which one they see.

DC — Direct Current

DC flows in one direction at a constant voltage. A battery is DC. The regulated output of a power supply is DC. Microcontrollers, logic gates, most sensors — they all run on DC. What you measure is what you get: a 9V battery delivers 9V.

AC — Alternating Current

AC reverses direction periodically, following a sinusoidal waveform. Mains power in North America is 120V at 60Hz — the voltage swings from positive peak to negative peak 60 times per second. Europe and most other countries use 230V at 50Hz.

The 120V you measure at the wall is the RMS (root mean square) value — the equivalent DC voltage that delivers the same power. The actual peak voltage is higher:

V_peak = V_RMS × √2 = 120V × 1.414 ≈ 170V

This matters when choosing component voltage ratings — your capacitors need to handle the peak, not just the RMS.

Why AC for Mains Power?

Transformers only work with AC. A transformer can step voltage up or down with very high efficiency using nothing but wire and iron — no active components needed. Transmit power at high voltage (say, 500kV) and the current in the wires is low, so resistive losses are small. Step it back down at the destination for household use. DC can't be transformed this way, which is why AC won the "war of currents" in the 1890s. Modern high-voltage DC (HVDC) transmission is now practical and used in some applications, but the grid infrastructure is AC.

How Electronics Gets DC from AC

AC → Transformer → Rectifier → Filter cap → Regulator → DC
     (step down)   (AC to DC)  (smoothing)   (stabilize)

Linear supplies use a transformer to step down, then a bridge rectifier and filter cap to get rough DC, then a linear regulator to stabilize it. Switching supplies skip the heavy transformer — they rectify the AC directly to high-voltage DC, then chop it at high frequency and use a small transformer to step down efficiently. Switching supplies are lighter and more efficient; linear supplies have lower noise.

Component Behaviour in AC vs DC

  • Resistors — identical behaviour in AC and DC. Ohm's Law applies directly.
  • Capacitors — block DC, pass AC. Reactance decreases with frequency: X_C = 1/(2πfC). At high frequency a capacitor looks like a short.
  • Inductors — pass DC, block AC. Reactance increases with frequency: X_L = 2πfL. At high frequency an inductor looks like an open circuit.
  • Transformers — only work with AC. The changing magnetic field is what induces voltage in the secondary winding.
  • Diodes — work in both, but the rectification application only makes sense with AC input.

RMS and Power Calculations

For a sine wave:
V_RMS = V_peak × 0.707
I_RMS = I_peak × 0.707

Power: P = V_RMS × I_RMS (for purely resistive loads)

For capacitive or inductive loads, current and voltage are out of phase and you need to account for the power factor. But for resistors and heaters, RMS values give you real power directly.