class: center, middle, inverse, title-slide .title[ # Capacitors & RC Timing ] .subtitle[ ## Programmable Electronics — Unit 1 ] .date[ ### Class 8 ] --- # Learning Targets .lt-box[ - Explain qualitatively how a capacitor charges and discharges through a resistor (RC timing). - Predict how resistor and capacitor size affect charge/discharge speed. - Build an RC circuit and measure its charge and discharge curve. ] .eu-label[Essential Understanding:] A capacitor resists sudden changes in voltage. Paired with a resistor, that gradual charging becomes a predictable delay — the basic building block behind timing circuits. --- # Agenda .agenda-box[ 1. Review: sensors turn a physical quantity into resistance (Class 6) 2. The capacitor 3. An RC circuit 4. Quick exercise 5. **Build 1 (25 min):** measure an RC charge and discharge curve 6. **Build 2 (10 min):** see the charge and discharge current with two LEDs 7. Homework ] --- # Review: resistance that changes, on purpose Last class, the potentiometer and the photoresistor each gave you a resistance you could change — one by hand, one by light — and dropping either into a voltage divider turned that changing resistance into a changing voltage. Today's component doesn't sense anything. Instead, it changes its own behavior **over time** — which turns out to be just as useful. --- # The capacitor .pull-left.w40[ <svg viewBox="0 0 100 100" width="100%" style="max-height:180px;"> <line x1="5" y1="50" x2="42" y2="50" stroke="#333" stroke-width="3"/> <line x1="42" y1="25" x2="42" y2="75" stroke="#333" stroke-width="4"/> <line x1="58" y1="25" x2="58" y2="75" stroke="#333" stroke-width="4"/> <line x1="58" y1="50" x2="95" y2="50" stroke="#333" stroke-width="3"/> </svg> ] .pull-right.w55[ - Two conductive plates, very close but not touching. It stores charge on those plates when voltage is applied. - It resists *sudden* changes in voltage — charging up gradually, not instantly, when connected to a source. - Paired with a resistor, that gradual charging becomes something useful: a predictable delay. ] --- # An RC circuit .pull-left.w45[ <svg viewBox="0 0 300 140" width="100%" style="max-height:220px;"> <line x1="40" y1="20" x2="40" y2="53" stroke="#333" stroke-width="3"/> <line x1="40" y1="77" x2="40" y2="110" stroke="#333" stroke-width="3"/> <line x1="25" y1="53" x2="55" y2="53" stroke="#333" stroke-width="3"/> <line x1="32" y1="66" x2="48" y2="66" stroke="#333" stroke-width="6"/> <line x1="40" y1="110" x2="260" y2="110" stroke="#333" stroke-width="3"/> <line x1="260" y1="20" x2="260" y2="110" stroke="#333" stroke-width="3"/> <line x1="40" y1="20" x2="128" y2="20" stroke="#333" stroke-width="3"/> <polyline points="128,20 134,8 142,32 150,8 158,32 166,8 172,20" fill="none" stroke="#333" stroke-width="3"/> <line x1="172" y1="20" x2="210" y2="20" stroke="#333" stroke-width="3"/> <line x1="210" y1="5" x2="210" y2="35" stroke="#333" stroke-width="4"/> <line x1="226" y1="5" x2="226" y2="35" stroke="#333" stroke-width="4"/> <line x1="226" y1="20" x2="260" y2="20" stroke="#333" stroke-width="3"/> <text x="145" y="12" font-size="11" text-anchor="middle" fill="#333">R</text> <text x="218" y="52" font-size="11" text-anchor="middle" fill="#333">C</text> </svg> ] .pull-right.w50[ <svg viewBox="0 0 260 160" width="100%" style="max-height:220px;"> <line x1="30" y1="130" x2="240" y2="130" stroke="#333" stroke-width="2"/> <line x1="30" y1="130" x2="30" y2="15" stroke="#333" stroke-width="2"/> <text x="215" y="145" font-size="11" fill="#333">time</text> <text x="8" y="20" font-size="11" fill="#333">V</text> <path d="M30,130 C60,40 90,20 230,18" fill="none" stroke="#364F6B" stroke-width="3"/> <line x1="30" y1="18" x2="230" y2="18" stroke="#999" stroke-width="1" stroke-dasharray="3,3"/> <text x="234" y="22" font-size="10" fill="#999">Vin</text> </svg> Voltage across the capacitor climbs quickly at first, then levels off as it approaches the supply voltage. ] --- # Quick exercise Without doing any calculus — just reasoning from the picture on the last slide: 1. If you use a **bigger** resistor, does the capacitor charge faster or slower? 2. If you use a **bigger** capacitor, does it charge faster or slower? 3. What do you think happens to that curve if you disconnect the supply and let the capacitor drain back through the resistor instead? --- class: center, middle # Build 1 (25 min): measure an RC charge and discharge curve <img src="assets/schematics/rc-circuit.svg" alt="Resistor and capacitor in series across a 6 V supply, voltage measured across the capacitor" style="max-height:300px;margin-top:0.5em;"/> --- # Build 1 instructions With your partner, using your breadboard, 6 V battery pack, a 100 kΩ and a 220 kΩ resistor, a 220 µF electrolytic capacitor, and multimeter: 1. Build a simple RC series circuit: the 100 kΩ resistor and the 220 µF capacitor in series across the 6 V supply. The capacitor is polarised — its striped/short leg is **−** and goes toward ground. 2. With the multimeter across the capacitor, connect the supply and take a voltage reading every 5 seconds until it stops changing. Record every reading in your notebook. 3. Disconnect the supply, leaving the resistor bridging the capacitor so it can discharge through it, and repeat — record how the voltage decays over time. 4. Swap the 100 kΩ resistor for the 220 kΩ and repeat steps 2–3. Did charging take longer or shorter, as you predicted? 5. Plot your charge and discharge readings next to the idealized curve from the slides. How closely does your real data match the shape? --- class: center, middle # Build 2 (10 min): see the charge and discharge current A multimeter shows you the capacitor *voltage*. These two LEDs show you the *current* — and current only flows while that voltage is still changing. --- class: small-font # Build 2 instructions .pull-left.w52[ **Two LEDs face to face** (anti-parallel — each passes current one way only), one resistor, and a big capacitor so the fade is slow enough to watch. Breadboard, 6 V pack, 2.2 kΩ resistor, two LEDs, 1000 µF cap *(220 µF works too — quicker flash)*: 1. Build the circuit shown: a switch (or a jumper you move — or two pushbuttons, see Build 2b) feeding **R → the two anti-parallel LEDs → C → ground**. The one 2.2 kΩ resistor limits both LEDs. 2. Switch to **+6 V** — the "charging" LED lights bright, then fades over a few seconds as the capacitor fills. 3. Switch to **ground** — now the *other* LED lights and fades, as the capacitor drains back out the same path (current the other way). 4. Notebook: why does each LED *fade* rather than stay lit? Why is neither LED lit once the capacitor is full (or empty) and you leave the switch alone? 5. Retry with the 220 µF cap — what changes? ] .pull-right.w44[ <img src="assets/schematics/rc-led-current.svg" alt="SPDT switch selecting +6 V or ground, feeding a 2.2 kohm resistor into two anti-parallel LEDs and a 1000 uF capacitor to ground" style="max-height:370px;display:block;margin:0 auto;"/> ] --- class: small-font # Build 2b: two pushbuttons instead of the switch .pull-left.w52[ The same circuit as Build 2 — anti-parallel LEDs, one 2.2 kΩ resistor, big capacitor. The only change: the kit's **two tactile pushbuttons** stand in for the SPDT switch (or the jumper you move). One button ties the top of the network to **+6 V**, the other ties it to **ground**. 1. Wire it as shown: the **charge** button from +6 V to the node, the **discharge** button from ground to the same node, then **R → the two anti-parallel LEDs → C → ground**. 2. Press and hold **charge** — the charging LED lights, then fades as the capacitor fills. Let go: nothing lights (the node is floating, the capacitor just holds its charge). 3. Press and hold **discharge** — now the other LED lights and fades as the capacitor drains back out the same path. 4. **Never press both at once** — that connects +6 V straight to ground. 5. Same notebook question as Build 2: why does each LED *fade* rather than stay lit? Why is neither LED lit when you are pressing nothing? ] .pull-right.w44[ <img src="assets/schematics/rc-led-current-buttons.svg" alt="Two pushbuttons, one from +6 V and one from ground, meeting at a node that feeds a 2.2 kohm resistor into two anti-parallel LEDs and a 1000 uF capacitor to ground" style="max-height:370px;display:block;margin:0 auto;"/> ] --- class: center, middle # Homework .hw-box[ - In your notebook, sketch how you think an RC circuit's delay could be useful in a real project — something that should happen a little *after* a switch is flipped, not instantly. - From Build 2: in one or two sentences, explain what the fading LED is telling you about the current as the capacitor charges. - Record your charge/discharge measurements if you didn't finish plotting them in class. ]