class: center, middle, inverse, title-slide .title[ # Ohm’s Law & the LED Driver Circuit ] .subtitle[ ## Programmable Electronics — Unit 1 ] .date[ ### Class 2 ] --- # Learning Targets .lt-box[ - Develop the intuition behind how electricity works. - Apply Ohm's law (`\(V = IR\)`) to calculate the resistor value needed to safely light an LED. - Read a resistor's value directly off its color bands. - Build a working LED driver circuit on a breadboard from a schematic. ] .eu-label[Essential Understanding:] What electricity is. What current, voltage, and resistance are. How to use Ohm's law in a basic LED driver circuit. --- # Agenda .agenda-box[ 1. What is electricity? Electrons and current 2. How electrons flow: conductors and the water-tank analogy 3. What an LED needs, and why it needs a resistor 4. Ohm's law: deriving the resistor value 5. Reading resistor color bands 6. Build: LED driver circuit on the breadboard 7. Measure & verify 8. Homework ] --- class: center, middle # What is electricity? # What makes electrons move? Talk it over with your partner for one minute before we define anything. --- # Electrons and current - Matter is made of atoms: a nucleus of protons (+) and neutrons, surrounded by electrons (–). - Normally, an atom's protons and electrons balance out — but electrons in the outermost shell can be knocked loose and made to move. - **Current** (`\(I\)`) is a *rate*: how many electrons flow past a point every second, measured in amps (A). - One amp means about `\(6.242 \times 10^{18}\)` electrons pass that point every second — roughly 6.24 quintillion. --- .pull-left.w55[ - A circuit only works if it's a closed loop: source → path → load → back to source. - Break the loop anywhere — open the switch — and current stops everywhere at once, not just past the break. ] .pull-right.w40[ <img src="assets/circuit-battery-switch.gif" alt="A battery, lightbulb, and switch; closing the switch completes the circuit and current flows." width="100%"/> .footnote[Image: SparkFun Electronics, CC BY-SA 4.0] ] --- # How electrons flow .pull-left.w50[ - In a **conductor** (copper, silver, most metals), the outermost electrons are loosely held and free to drift from atom to atom. - In an **insulator** (rubber, plastic, glass), electrons are held tightly — nothing moves. - Apply voltage across a conductor, and free electrons drift steadily in one direction: that drift *is* the current. ] .pull-right.w45[ <img src="assets/electron-flow.gif" alt="A simplified model of electrons drifting through atoms to create current." width="100%"/> .footnote[Image: SparkFun Electronics, CC BY-SA 4.0] ] --- # Voltage: the water-tank analogy .pull-left.w45[ <img src="assets/water-tank-voltage.png" alt="Voltage is like the pressure created by the water." width="100%"/> .footnote[Image: SparkFun Electronics, CC BY-SA 4.0] ] .pull-right.w50[ - Picture a water tank raised above the ground, with a hose at the bottom. - The **water** in the tank represents the electrons available to flow. - The **pressure** at the end of the hose is like voltage (`\(V\)`) — it's what pushes those electrons through a circuit. - Drain the tank and the pressure drops — just like a battery's voltage sags as it runs down. ] --- # Current and resistance: same analogy .pull-left.w45[ <img src="assets/water-tank-two-pressures.png" alt="Two tanks at the same pressure, but one has a narrower hose than the other." width="100%"/> .footnote[Image: SparkFun Electronics, CC BY-SA 4.0] ] .pull-right.w50[ - Two tanks, same pressure (voltage), but one hose is narrower. - **Flow rate** through the hose is like current (`\(I\)`). - The narrow hose "resists" the flow more than the wide one — that's **resistance** (`\(R\)`), measured in ohms (`\(\Omega\)`). - Same voltage, more resistance → less current. This is the relationship Ohm's law makes exact. ] --- class: medium-font # Putting the analogy together .center[ <img src="assets/water-tank-equivalents.png" alt="Two tanks at the same 1-volt pressure: a 1-ohm hose passes 1 amp, a 2-ohm hose passes only 0.5 amp." style="max-height: 340px;"/> ] Same pressure (voltage) in both tanks. Double the resistance, and the flow (current) is cut in half — that's Ohm's law, before we've written a single equation. Next, we make it exact. .footnote[Image: SparkFun Electronics, CC BY-SA 4.0] --- class: center, middle # LED Driver circuit Putting voltage, current, and resistance to work in a very simple circuit. --- # What is an LED, really? .pull-left.w60[ - LED = Light-Emitting Diode. A diode only lets current flow **one direction**. - An LED has a **forward voltage** (`\(V_f\)`) — roughly fixed, depends on color: - Red ≈ 2.0 V, Green ≈ 2.1 V, Blue/White ≈ 3.0–3.2 V - Below `\(V_f\)`: effectively no current flows, no light. - Above `\(V_f\)`: current rises **very fast** for a tiny increase in voltage. If you connect an LED straight to a supply above roughly 3 V with nothing else in the circuit, current keeps rising until the LED burns out. ] .pull-right.w30[ <img src="assets/led-fvoltage.png" alt="." height="500"/> ] --- # The fix: a current-limiting resistor .pull-left.w30[ - Put a resistor in series with the LED. - The resistor "absorbs" the extra voltage the LED doesn't use, and limits the current to a safe value. - This is the **LED driver circuit** — the simplest one you'll build all semester, and the one every other circuit today builds on. ] .pull-right.w60[ <img src="assets/LED-driver.png" alt="A working LED circuit with a current-limiting resistor in series." width="100%"/> Supply → Resistor → LED → Ground ] --- # Ohm's Law `$$V = IR$$` Where: - `\(V\)` = voltage, in volts - `\(I\)` = current, in amps - `\(R\)` = resistance, in ohms (`\(\Omega\)`) Solved for resistance, since we're picking `\(R\)`: `$$R = \frac{V}{I}$$` --- # Exercises 1. Calculate the **nominal** current that is being applied to your LED, considering: - Source Voltage of `\(6V\)` (`\(4 \times 1.5 V\)`) - Resistance of `\(220 Ω\)` 2. Calculate the **real** current that is being applied to the LED, considering - Your *real* source voltage (use multimeter). - The *real* resistance value of the resistor (use the multimeter) Write your answers in your notebook. --- # Exercises (solution) 1. Calculate the **nominal** current that is being applied to your LED, considering: - Source Voltage of `\(6V\)` (`\(4 \times 1.5 V\)`) - Resistance of `\(220 Ω\)` Using Ohm's Law... `$$I = \frac{V}{R}$$` `$$I = \frac{6V}{220 Ω} = 0.0272 A = 27.27 mA$$` 2. Calculate the **real** current that is being applied to the LED, considering - Source Voltage (what values did you get?) - Resistance --- class: center, middle ### How to know the value of the resistor we need to light the LED safely? What would we need to know? ### How many electrons pass through the LED in one second? How can we figure this out? Talk it over with your partner for one minute.