Electrical Engineering › Section O · Pulses, nonsinusoidal signals, and system analysis › Topic O.2

R-C response to square waves

Feed a square wave into a resistor and capacitor and what comes out depends on one comparison: the half-period against the time constant. The same idea explains rounded clock edges, spikes, triangle waves, sagging pulses and the adjustment screw on an oscilloscope probe.

A square wave is a string of steps

A square wave that switches between 0 and E is just a step up followed by a step down, again and again. Each step starts a new transient of the kind met in Charging and discharging transients, beginning wherever the previous one left off. The circuit used throughout is a series loop: the square-wave source from node a to ground (node 0), R from a to b, and C from b to ground. The capacitor voltage \(v_C\) is measured from b to 0, and the resistor voltage \(v_R\) from a to b, so that \(v_R + v_C\) always equals the source voltage.

The transient equation, restated

Whenever the source steps to a new constant value, the capacitor voltage moves exponentially from its starting value \(V_i\) towards a final value \(V_f\):

v_C(t) = V_f + (V_i - V_f)\,e^{-t/\tau}, \quad \tau = RC

Here t is measured from the moment of the step. After one time constant the capacitor has covered 63.2% of the gap, and after \(5\tau\) it has covered 99.3%, which is treated as complete. The resistor voltage is whatever the capacitor leaves over: \(v_R = v_{\text{source}} - v_C\). The key question for a square wave is how the half-period \(T/2\), the time between steps, compares with \(5\tau\).

Long half-periods: full charge each time

When \(T/2\) is at least \(5\tau\), the capacitor finishes each transient before the next step arrives. During each high half it charges from 0 to E, and during each low half it discharges back to 0. So \(v_C\) looks like the square wave with rounded leading and trailing edges. The resistor voltage is very different: it jumps to +E at each rising step, decays to zero, jumps to −E at each falling step and decays again, a train of alternating spikes. The longer \(T/2\) is compared with \(\tau\), the squarer \(v_C\) and the narrower the spikes. Taken across R, the output acts as a simple differentiator, turning edges into trigger pulses.

Worked example: a slow square wave

A 5 V, 2 kHz square wave (0 to 5 V) drives R = 2.2 kΩ in series with C = 10 nF. Describe \(v_C\) and \(v_R\). 1. Time constant: \(\tau = (2200)(10 \times 10^{-9}) = 22\,\mu\text{s}\). 2. Half-period: \(T/2 = \frac{1}{2(2000)} = 250\,\mu\text{s}\), which is \(11.4\tau\), more than \(5\tau\), so the capacitor charges fully each half. 3. After each rising step, \(v_C\) reaches \(5(1 - e^{-1}) = 3.16\,\text{V}\) at 22 µs and 4.97 V at 110 µs. 4. Its 10%-to-90% rise time is \(\tau\ln 9 = 2.2\tau = 48.3\,\mu\text{s}\), using the definition from the previous topic. 5. \(v_R\) spikes to +5 V at each rising step and −5 V at each falling step, decaying to near zero within 110 µs. Check: \(v_R + v_C = 5\,\text{V}\) just after a rising step.

Half-periods comparable with τ

If \(T/2\) is shorter than \(5\tau\), the capacitor never quite finishes charging or discharging. Starting from an uncharged capacitor, the first few cycles creep upwards, and after several cycles \(v_C\) settles into a steady pattern centred on the square wave's average, \(E/2\). In that steady state it rises from a minimum \(V_{\min}\) to a maximum \(V_{\max}\) and back. With \(x = e^{-(T/2)/\tau}\), symmetry about \(E/2\) gives

V_{\max} = \frac{E}{1 + x}, \quad V_{\min} = \frac{E\,x}{1 + x}

Check the limit: for a long half-period, x is nearly 0, so \(V_{\max} \to E\) and \(V_{\min} \to 0\), the full-charge case of the previous card.

Worked example: raising the frequency

Use the same 0 to 5 V source, R = 2.2 kΩ and C = 10 nF (\(\tau = 22\,\mu\text{s}\)), now at 20 kHz and then 200 kHz. Find the steady-state limits of \(v_C\). 1. At 20 kHz, \(T/2 = 25\,\mu\text{s} = 1.14\tau\), so \(x = e^{-1.14} = 0.321\). 2. Then \(V_{\max} = \frac{5}{1.321} = 3.79\,\text{V}\) and \(V_{\min} = 5 - 3.79 = 1.21\,\text{V}\), a swing of 2.57 V. 3. At 200 kHz, \(T/2 = 2.5\,\mu\text{s} = 0.114\tau\), so \(x = 0.893\). 4. Then \(V_{\max} = 2.64\,\text{V}\) and \(V_{\min} = 2.36\,\text{V}\), a swing of only 0.28 V. 5. Check: both patterns are centred on 2.5 V, the input's average.

Short half-periods: integrating and coupling

When \(T/2\) is much less than \(\tau\), each exponential uses only its nearly straight first part, so \(v_C\) becomes a small triangle wave riding on the input's average. Its peak-to-peak swing is close to \(\frac{E}{2}\cdot\frac{T/2}{\tau}\), which gives 0.284 V for the 200 kHz case, matching the exact 0.284 V. The output across C then acts as an integrator. Meanwhile \(v_R\) is almost the square wave itself with its average removed, swinging about ±E/2 with a slight slope on each flat part. That slope is the tilt of the previous topic: with \(x\) as before, \(\%\,\text{tilt} = \frac{2(1 - x)}{1 + x} \times 100\%\), about 11% at 200 kHz; for small tilt this is close to \(\frac{T/2}{\tau} \times 100\%\). This is why a coupling capacitor that is too small makes pulses sag.

The compensated oscilloscope probe

A ×10 probe contains a 9 MΩ resistor \(R_p\) in the tip; with the scope's 1 MΩ input \(R_s\) it forms a 10:1 divider. But the scope input and cable add a capacitance \(C_s\) across \(R_s\), which alone would round every fast edge. So the probe adds an adjustable capacitor \(C_p\) across \(R_p\). When

R_p C_p = R_s C_s

the two R-C sections have equal time constants and the divider ratio is 1/10 at every frequency: the probe is compensated. If \(C_p\) is too small, a square wave shows rounded leading edges (undercompensated); if too large, it shows overshoot spikes (overcompensated). Users adjust \(C_p\) on the scope's built-in square-wave calibration signal.

Worked example: compensating a ×10 probe

A scope has \(R_s\) = 1 MΩ, and its input plus cable capacitance totals \(C_s\) = 90 pF. The probe has \(R_p\) = 9 MΩ. Find \(C_p\) for compensation and the capacitance the circuit under test then sees. 1. Compensation: \(C_p = \frac{R_s C_s}{R_p} = \frac{(10^6)(90\,\text{pF})}{9 \times 10^6} = 10\,\text{pF}\). 2. Seen from the tip, \(C_p\) and \(C_s\) are in series: \(\frac{(10)(90)}{10 + 90} = 9\,\text{pF}\), in parallel with \(R_p + R_s\) = 10 MΩ. 3. Compare: at 1 MHz, 9 pF has a reactance of 17.7 kΩ, while 90 pF connected directly would load the circuit with only 1.77 kΩ. 4. Check: 10 pF to 90 pF is 1:9, the inverse of 9 MΩ to 1 MΩ, so both sections divide by 10.

Common mistakes to avoid

First, comparing the full period T with \(5\tau\): the capacitor has only half a period between steps. Second, assuming the steady state appears at once: when \(T/2 < 5\tau\), several cycles pass before \(v_C\) settles around \(E/2\). Third, forgetting that \(v_R\) can be negative: it swings to −E at each falling step in the full-charge case. Fourth, putting \(\tau\) and \(T/2\) in different units. Fifth, adjusting a probe until the trace looks bright and sharp rather than until the corners are square without overshoot.

Key takeaways

Each step of a square wave starts a new transient, v_C = V_f + (V_i − V_f)e^(−t/τ) with τ = RC. Compare T/2 with 5τ. If T/2 ≥ 5τ, v_C charges fully and looks like a rounded square wave, while v_R is a train of ±E spikes (a differentiator). If T/2 < 5τ, v_C settles around E/2 between V_max = E/(1 + x) and V_min = Ex/(1 + x), where x = e^(−(T/2)/τ). If T/2 ≪ τ, v_C is a small triangle (an integrator) and v_R is the square wave with its average removed, showing tilt. A ×10 probe is compensated when R_pC_p = R_sC_s.

Flashcards

Flashcard

v_C = V_f + (V_i − V_f)e^(−t/τ)

Capacitor voltage after a step, with τ = RC

Each square-wave edge restarts it.

Test your understanding

Question 1 of 5

A 0 to 10 V square wave drives R = 1 kΩ in series with C = 0.1 µF. Up to what frequency does the capacitor still charge fully (T/2 ≥ 5τ) in each half-period?

Question 2 of 5

In the full-charge case (T/2 much longer than 5τ), what does the voltage across the resistor look like?

Question 3 of 5

A 0 to 5 V square wave has T/2 equal to τ. With x = e^(−1) = 0.368, what is the steady-state maximum of v_C?

Question 4 of 5

A ×10 probe has R_p = 9 MΩ and the scope has R_s = 1 MΩ with C_s = 117 pF. What value of C_p compensates the probe?

Question 5 of 5

An amplifier's coupling capacitor makes square-wave pulses sag noticeably across each flat top. What change reduces the tilt?

← Previous topicNext topic →