class: center, middle, inverse, title-slide .title[ # The 555 — a Chip That Keeps Time ] .subtitle[ ## Programmable Electronics — Unit 2 ] .date[ ### Class 12 ] --- # Learning Targets .lt-box[ - Seat a DIP chip safely — find pin 1, fit a decoupling capacitor — and say why both matter. - Wire a 555 as an astable oscillator and predict its blink rate from `\(R_A\)`, `\(R_B\)`, and `\(C\)`. - Change the blink rate on purpose: by swapping the capacitor, by turning a knob, and by changing the light in the room. - Explain what you gain by using a part whose insides you can't see. ] .eu-label[Essential Understanding:] Last class you built logic out of transistors you could point at. Today you use a part where you can't point at anything — you pick three components, and a sealed black box does the rest. You give up seeing how it works. You get back something you can design with one formula in about four minutes. --- # Agenda .agenda-box[ 1. A change of plan — and one thing to hold onto from last class 2. Your first chip, and how not to destroy it 3. What the 555 does 4. Three parts set the speed 5. The formula, and one rule of thumb 6. **Build 1:** make it blink 7. **Build 2:** the speed dial 8. **Build 3:** the light-controlled blinker 9. Homework ] --- # A change of plan The 74HC logic chips we ordered haven't arrived yet. So we're reordering the unit — the chips come back in **Class 16**, and today we start a different chip that's been in your kit the whole time. .emphasis[ **Hold onto last class's homework measurement.** ] You measured your transistor gate's "HIGH" and found it *wasn't* a clean 6 V. That number is the setup for a genuinely satisfying moment in Class 16, when you measure the same thing on a real logic chip. **Keep the page.** Don't lose it in two weeks of notebook. Meanwhile: everything today is a build, and none of it needs anything we're waiting on. --- class: small-font # Your first chip, and how not to destroy it You've used transistors, resistors, capacitors — parts with two or three legs you can reason about. This has **eight**, and you can't see inside. Four rules, and they apply to every chip for the rest of the course: .pull-left.w48[ - **Find pin 1.** There's a **notch** at one end of the chip, or a **dot** next to one corner. Pin 1 is at that end, bottom-left. Numbering runs **counter-clockwise** from there. Get this wrong and *every* pin is wrong. - **Straddle the trench.** The gap down the middle of the breadboard is there so the chip's two rows of legs land in different columns. A chip pushed into one side shorts every pin to its neighbour. ] .pull-right.w48[ - **Press evenly, lever it out gently.** Pins bend if you push one end first, and they snap if you pull the chip out with your fingernails. - **Fit the decoupling capacitor.** A **0.1 µF ceramic** goes straight across the chip's power pins, *right at the chip* — not over by the battery. A chip switching thousands of times a second yanks current in sharp spikes; this cap is a tiny local reservoir that smooths them. Skip it and you get flicker, double-blinks, and an hour of confusing debugging. ] .center[ **Power off before you seat or move a chip. Every time.** ] --- # What the 555 does .pull-left.w42[ <img src="assets/schematics/timer-555-pinout.svg" alt="555 timer as an 8-pin DIP: pin 1 GND, 2 TRG, 3 OUT, 4 RST, 5 CTL, 6 THR, 7 DIS, 8 Vcc" style="width:100%;max-height:320px;"/> ] .pull-right.w54[ An 8-pin chip that has been in production since **1972**. It is one of the most-manufactured parts in history, and it costs about ten cents. **What it does:** you give it a supply and three timing components, and pin 3 (**OUT**) turns on and off, forever, at a rate you chose. That's it. That's the whole thing for today. Inside are a couple of comparators and a latch watching a capacitor charge and discharge — and you are going to ignore all of that. You will design with its **behaviour**, not its mechanism. *(If you want the insides, ask me — there's a deck.)* **Pins today:** Vcc, GND, DIS, THR, TRG, OUT, RST, CTL. ] --- class: small-font # Three parts set the speed .pull-left.w44[ <img src="assets/schematics/timer-555-astable.svg" alt="555 astable: R_A from +6 V to the discharge pin, R_B from the discharge pin to the joined trigger and threshold node, C from that node to ground, OUT through a resistor to an LED" style="width:100%;max-height:350px;"/> ] .pull-right.w52[ This arrangement is called **astable** — "never settles." It has no resting state; it flips back and forth on its own as long as it has power. - **R<sub>A</sub>, R<sub>B</sub>, and C** are the only parts that set the speed. Everything else on the schematic is plumbing. - **TRG and THR get tied together.** One wire, easy to forget, and the circuit will not oscillate without it. - **RST goes to +6 V.** Leave it floating and the chip behaves erratically. - **CTL gets a small capacitor to ground** — noise insurance. - **OUT drives the LED directly.** No transistor needed: the 555 can push far more current than the logic chips we'll meet in Class 16. ] --- # The formula, and one rule of thumb `$$f = \frac{1.44}{(R_A + 2R_B)\,C}$$` That's the blink rate, in blinks per second. You will use this today three times and not derive it once. **Worked example** — `\(R_A = 10\ \text{k}\Omega\)`, `\(R_B = 100\ \text{k}\Omega\)`, `\(C = 10\ \mu\text{F}\)`: `$$f = \frac{1.44}{(10\text{k} + 200\text{k})(10\,\mu\text{F})} = \frac{1.44}{2.1} \approx 0.7\ \text{blinks per second}$$` .emphasis-center[ **The rule of thumb: make any of the three bigger, and it gets slower.** ] .font-small[ Unit check, because this is where the mistakes are: `\(1\,\text{k}\Omega \times 1\,\mu\text{F} = 1\,\text{ms}\)`. So `\(100\,\text{k}\Omega \times 10\,\mu\text{F} = 1\,\text{second}\)`. Nearly every wrong answer today will be off by a factor of a thousand, not by a concept. ] --- class: center, middle # Build 1: make it blink Then two ways to change its mind. --- class: small-font # Build 1 (15 min): the blinker Partner up. Breadboard, 6 V pack, the **555**, multimeter, an LED, and: a **0.1 µF** and a **0.01 µF** ceramic, a **10 µF** and a **4.7 µF** electrolytic, resistors **10 kΩ, 100 kΩ, 470 Ω**. .pull-left.w42[ <img src="assets/schematics/timer-555-astable.svg" alt="555 astable: R_A from +6 V to the discharge pin, R_B from the discharge pin to the joined trigger and threshold node, C from that node to ground, OUT through 470 ohm to an LED" style="width:100%;max-height:330px;"/> ] .pull-right.w54[ 1. **Power off.** Straddle the 555 over the centre trench, **pin 1 at the notch**. Say a pin name out loud to your partner before wiring anything. 2. **0.1 µF ceramic across pins 8 and 1** (Vcc, GND), right at the chip. 3. **R<sub>A</sub> = 10 kΩ:** +6 V → DIS (7). **R<sub>B</sub> = 100 kΩ:** DIS (7) → THR (6). **C = 10 µF:** THR node → ground, **striped leg to ground.** 4. **Tie TRG (2) to THR (6).** **Tie RST (4) to +6 V.** **0.01 µF from CTL (5) to ground** — a spare 0.1 µF works if you can't find one. 5. **LED + 470 Ω** from OUT (3) to ground. Power up — a slow, countable blink. 6. **Check the formula.** Count blinks for 30 s, divide by 30. You predicted ~0.7/s. Within 15%? 7. **Predict, then swap** the 10 µF for the **4.7 µF**. New rate *first*, then count it. ] .font-small[ Not blinking? **Rung 1: measure the rail.** Then check TRG–THR are actually tied, then check the electrolytic isn't backwards. ] --- class: small-font # Build 2 (10 min): the speed dial .pull-left.w46[ <img src="assets/schematics/timer-555-pot-speed.svg" alt="555 astable with the 100 kilohm potentiometer in the R_B position, in series with a 1 kilohm resistor" style="width:100%;max-height:300px;"/> ] .pull-right.w50[ `\(R_B\)` is just a resistor. **So make it one you can change while it's running.** 1. Pull out the 100 kΩ resistor in the `\(R_B\)` position. 2. Put the **100 kΩ pot** there, wired as a **rheostat** — one outer leg and the **wiper**, like Class 6. 3. Put a **1 kΩ resistor in series** with it. *(Ask me why before you power up — there's a real reason.)* 4. Power up and **turn the knob.** You've built a blink-rate dial. 5. **Where are the ends?** Work out the fastest and slowest rates from the formula, then turn the pot all the way each way and check. ] .font-small[ **Why the 1 kΩ?** Turned all the way down, the pot is **0 Ω** — which puts an almost dead short across the 555's discharge pin, and the chip dumps its capacitor through nearly nothing. The 1 kΩ is a **floor**, so R<sub>B</sub> can never get smaller than that. Costs one resistor, saves the chip. ] --- class: small-font # Build 3 (10 min): the light-controlled blinker .pull-left.w46[ <img src="assets/schematics/timer-555-ldr-blink.svg" alt="555 astable with a photoresistor in the R_B position, in series with a 1 kilohm resistor" style="width:100%;max-height:300px;"/> ] .pull-right.w50[ Now swap the knob for something the **room** turns. 1. Replace the pot with a **photoresistor**, keeping the **1 kΩ** floor in series. 2. Power up. Cup your hand over the LDR — the blink should **slow down**. Shine a phone light on it — it should **speed up**. 3. **Explain the direction** to your partner before you look at the next line. Which way does the LDR's resistance go in the dark, and what does the rule of thumb then say about the rate? 4. **How fast can you make it?** At some point it stops looking like blinking and starts looking like a dim glow. Find that point and write down roughly where it is. ] .font-small[ You built a light sensor in Class 6 and a nightlight in Class 10. Same photoresistor, third job: it is now setting the **speed of time** for a chip. ] --- class: center, middle # Homework .hw-box[ - **Design one.** You want a blink rate of **about 2 per second**, and you have a 10 µF capacitor and R<sub>A</sub> = 10 kΩ. What should R<sub>B</sub> be? Show the arithmetic. - In Build 3, the photoresistor changed the blink rate. In one or two sentences: **what was the 555 actually measuring?** It has no idea what light is. - The 555 hides everything inside it. Name **one thing you gained** today by not having to know what was in there — be specific about a moment in the build. - **Find your Class 11 HIGH measurement** and write it at the top of a fresh notebook page. We need it in Class 16. ]