---
title: Problem set 5
heading: "Problem set 5: timers, stepping and protection"
eyebrow: C2 · Problem set 5
type: problems
---

::: hook
These problems use lessons 25 and 26, numerical transient solvers and designing with time constants, together with the circuits they're built on: RC timers, debouncers, coil protection and RLC responses.
:::

::: pool
pick: 12

::: check
kind: parts
given: Vs = 5 | 12; Vt = 2.5 | 3.3; t = 1 | 10; C = 0.1 | 1

## A timer charges {C} µF toward {Vs} V and must cross {Vt} V after {t} ms.

::: part
answer: t/1000/(C*1e-6*ln(Vs/(Vs - Vt)))/1000
unit: kΩ
tolerance: 0.5%

### What resistor does it need?

::: misses
- [any] $t = RC\ln\frac{V_s}{V_s - V_t}$.
:::
:::

::: part
answer: Vs/(t/1000/(C*1e-6*ln(Vs/(Vs - Vt))))*1000
unit: mA
tolerance: 0.5%

### What current does it draw at the start?

::: misses
- [any] $V_s/R$.
:::
:::
:::

::: check
kind: parts
given: R = 10 | 100; C = 0.1 | 1; Vs = 3.3 | 5; tb = 0.5 | 2

## A debounce RC of {R} kΩ and {C} µF is fed {Vs} V through a bouncing switch that chatters for {tb} ms, and the logic threshold is half of {Vs} V.

::: part
answer: R*C
unit: ms
tolerance: 0.5%

### What is the time constant?

::: misses
- [any] $RC$.
:::
:::

::: part
answer: R*C*ln(2)
unit: ms
tolerance: 0.5%

### After a clean press, how long until it crosses the threshold?

::: misses
- [any] Half-way takes $\tau\ln 2$.
:::
:::
:::

::: check
kind: parts
given: Vs = 12 | 24; I0 = 0.1 | 0.5; Rs = 20 | 100; Vmax = 60 | 100

## A coil carrying {I0} A from {Vs} V is switched off, with a flyback diode in series with a resistor $R_s$.

::: part
answer: Vs + 0.7 + I0*Rs
unit: V
tolerance: 0.5%

### With $R_s$ = {Rs} Ω, how high does the switch voltage spike?

::: misses
- [any] $V_s + 0.7 + I_0R_s$.
:::
:::

::: part
answer: (Vmax - Vs - 0.7)/I0
unit: Ω
tolerance: 0.5%

### What is the largest $R_s$ that keeps the spike under {Vmax} V?

::: misses
- [any] Solve for $R_s$.
:::
:::
:::

::: check
kind: parts
given: tau = 1 | 4; dt = 0.2 | 1; k = 3 | 8

## Forward and backward Euler step an RC charging toward 1 V, with τ = {tau} ms and Δt = {dt} ms.

::: part
answer: 1 - (1 - dt/tau)^k
tolerance: 0.5%

### What does forward Euler give after {k} steps?

::: misses
- [any] $1 - (1 - \Delta t/\tau)^k$.
:::
:::

::: part
answer: 1 - (1/(1 + dt/tau))^k
tolerance: 0.5%

### And backward Euler?

::: misses
- [any] $1 - (1 + \Delta t/\tau)^{-k}$.
:::
:::
:::

::: check
kind: parts
given: tau1 = 1 | 10; tau2 = 1000 | 10000

## A circuit has a fast time constant of {tau1} ns and a slow one of {tau2} µs.

::: part
answer: 2*tau1
unit: ns
tolerance: 0.5%

### What is the largest stable forward Euler step?

::: misses
- [any] $2\tau$ of the fastest part.
:::
:::

::: part
answer: 5*tau2*1000/(2*tau1)
tolerance: 0.5%

### How many such steps does it take to simulate five of the slow time constants?

::: misses
- [any] Total time over the step.
:::
:::
:::

::: check
kind: parts
given: L = 4.7 | 47; C = 22 | 220; z = 0.5 | 0.8

## A series RLC with L = {L} mH and C = {C} nF is to have ζ = {z}.

::: part
answer: 2*z*sqrt(L*1e-3/(C*1e-9))
unit: Ω
tolerance: 0.5%

### What resistance does that take?

::: misses
- [any] $2\zeta\sqrt{L/C}$.
:::
:::

::: part
answer: 100*exp(-z*pi/sqrt(1 - z^2))
tolerance: 0.5%

### What overshoot results?

::: misses
- [any] $e^{-\zeta\pi/\sqrt{1 - \zeta^2}}$.
:::
:::
:::

::: check
kind: parts
given: Vs = 5 | 9; R = 47 | 100; C = 10 | 47; T = 0.5 | 2

## A monostable timer: a {C} µF capacitor charges through {R} kΩ from {Vs} V, and a comparator fires at two thirds of {Vs} V.

::: part
answer: R*C*ln(3)
unit: ms
tolerance: 0.5%

### How long is the delay?

::: misses
- [any] $RC\ln\frac{1}{1 - 2/3} = RC\ln 3$.
:::
:::

::: part
answer: T/1000/(C*1e-6*ln(3))/1000
unit: kΩ
tolerance: 0.5%

### What R gives a {T} s delay with the same capacitor?

::: misses
- [any] $R = T/(C\ln 3)$.
:::
:::
:::

::: check
kind: parts
given: e1 = 0.5 | 3; r = 2 | 5

## A simulation's error is {e1} mV with some step size.

::: part
answer: e1/r
tolerance: 0.5%

### With steps {r} times smaller, what error would a first-order method give?

::: misses
- [any] Error ∝ Δt.
:::
:::

::: part
answer: e1/r^4
tolerance: 0.5%

### And RK4?

::: misses
- [any] Error ∝ $\Delta t^4$.
:::
:::
:::

::: check
kind: parts
given: Vs = 3.3 | 5; Vt = 1 | 2; R = 10 | 100; C = 1 | 10

## An RC from {Vs} V must hold a reset line low for a while at power-up; the chip leaves reset when the line passes {Vt} V. R = {R} kΩ and C = {C} µF.

::: part
answer: R*C*ln(Vs/(Vs - Vt))
unit: ms
tolerance: 0.5%

### How long is the reset held?

::: misses
- [any] $RC\ln\frac{V_s}{V_s - V_t}$.
:::
:::

::: part
answer: 0.5*C*Vs^2
unit: µJ
tolerance: 0.5%

### How much energy does the capacitor finally store?

::: misses
- [any] $\frac12CV^2$.
:::
:::
:::

::: check
kind: parts
given: dt = 0.1 | 0.5; tau = 1 | 3; V = 5 | 10

## Backward Euler steps an RC charging toward {V} V from 0, with τ = {tau} ms and Δt = {dt} ms.

::: part
answer: V*(dt/tau)/(1 + dt/tau)
unit: V
tolerance: 0.5%

### What is the first step's value?

::: misses
- [any] $\frac{0 + \Delta tV/\tau}{1 + \Delta t/\tau}$.
:::
:::

::: part
answer: V*(1 - exp(-dt/tau))
unit: V
tolerance: 0.5%

### What is the exact value at that time?

::: misses
- [any] $V(1 - e^{-\Delta t/\tau})$.
:::
:::
:::

::: check
kind: parts
given: v = 5 | 10; s = 1 | 3; t = 0.2 | 1

## A decay falls from {v} V to {s} V in {t} ms.

::: part
answer: t/ln(v/s)
unit: ms
tolerance: 0.5%

### What's τ?

::: misses
- [any] $\frac{t}{\ln(v_1/v_2)}$.
:::
:::

::: part
answer: t/ln(v/s)/10*1e3
unit: nF
tolerance: 0.5%

### If the resistor is 10 kΩ, what's the capacitance?

::: misses
- [any] $C = \frac{\tau}{R}$.
:::
:::
:::

::: check
kind: parts
given: C = 47 | 100; L = 0.5 | 2; R = 5 | 30

## A capacitor of {C} nF has {L} nH of ESL and {R} mΩ of ESR.

::: part
answer: 1/(2*pi*sqrt(L*1e-9*C*1e-9))/1e6
unit: MHz
tolerance: 0.5%

### What's its self-resonant frequency?

::: misses
- [any] $\frac{1}{2\pi\sqrt{LC}}$.
:::
:::

::: part
answer: R
unit: mΩ
tolerance: 0.5%

### What's its impedance there?

::: misses
- [any] Only the ESR remains.
:::
:::
:::

::: check
kind: parts
given: o = 1 | 4 | 15; L = 2 | 10; C = 47 | 220

## A series RLC with L = {L} mH and C = {C} nF should overshoot {o}%.

::: part
answer: 2*(-ln(o/100)/sqrt(pi^2 + ln(o/100)^2))*sqrt(L*1e-3/(C*1e-9))
unit: Ω
tolerance: 0.5%

### What series resistance does that need?

::: misses
- [any] $R = 2\zeta\sqrt{L/C}$.
:::
:::

::: part
answer: 2*sqrt(L*1e-3/(C*1e-9))
unit: Ω
tolerance: 0.5%

### What would critical damping need?

::: misses
- [any] $2\sqrt{L/C}$.
:::
:::
:::

::: check
kind: parts
given: V = 3.3 | 5; D = 0.3 | 0.6; t = 1 | 4

## A {V} V, {D}-duty PWM wave passes an RC with τ = {t} periods.

::: part
answer: V*(1 - exp(-D/t))*(1 - exp(-(1 - D)/t))/(1 - exp(-1/t))*1000
unit: mV
tolerance: 0.5%

### What's the exact peak-to-peak ripple?

::: misses
- [any] Track both exponentials over one period.
:::
:::

::: part
answer: V*D*(1 - D)/t*1000
unit: mV
tolerance: 0.5%

### What does the estimate $V\frac{D(1 - D)T}{\tau}$ give?

::: misses
- [any] $V\frac{D(1 - D)T}{\tau}$.
:::
:::
:::

::: check
kind: parts
given: a = 1 | 4.7; b = 4.7 | 10; V = 10 | 20

## A {a} µF capacitor at {V} V charges an empty {b} µF one through a resistor.

::: part
answer: a*b/(a + b)*V^2/2
unit: µJ
tolerance: 0.5%

### How much energy does the resistor dissipate?

::: misses
- [any] $\frac{C_1C_2V^2}{2(C_1 + C_2)}$.
:::
:::

::: part
answer: a*V^2/2
unit: µJ
tolerance: 0.5%

### How much did the first capacitor start with?

::: misses
- [any] $\frac12C_1V^2$.
:::
:::
:::
:::
