Classroom Public page

Week 5: Diodes and LEDs (Deep)

592 words

You have driven LEDs since week 1. This week you learn why the resistor in front of them is required, how to pick its value precisely, and what a diode's "forward voltage drop" means. By the end of the week you can size the right resistor for any LED in any circuit at any voltage.


Reading (~45 min)

  • The SparkFun "Diodes" tutorial (free; concise)
  • The kit's LED datasheet (or a generic 5mm LED datasheet from Adafruit if not included). Find the typical forward voltage (~1.8 V for red; ~2.2 V for yellow; ~3.0 V for white or blue) and the maximum current rating (~20 mA for standard 5mm LEDs)

Lecture (~1.5 hr)

  • What a diode does. Current flows one way (forward); barely any flows the other way (reverse). The asymmetry is the diode's defining property
  • Forward voltage drop. When current flows in the forward direction, the diode "drops" some voltage (typically 0.6-0.7 V for a silicon diode; higher for an LED, depending on color). The drop is approximately constant across operating currents
  • Why LEDs need a current limiter. Without one, you set a voltage and the diode tries to draw whatever current that voltage commands at the diode's forward-drop level. That current is usually too high. The LED briefly lights, then burns out
  • Sizing the resistor. Pick the LED's forward voltage (from the datasheet). Subtract from the supply voltage. Divide by the desired LED current (typically 10-15 mA for moderate brightness; 20 mA for max-rated brightness). The result is the resistor value. Round up to the nearest standard value
  • PWM dimming preview. To make an LED brighter or dimmer without changing the resistor, you switch the LED on and off rapidly. The fraction of time it is on controls the perceived brightness. This is pulse-width modulation; you will use it in week 10

Lab exercises (~2 hr)

Lab 5.1: LED Current Control. For each of the three LEDs in your kit (different colors), calculate the right resistor at 5 V and at 9 V. Build all six circuits. Measure the actual current; compare to your predicted current. ~90 minutes.

Independent practice (~3 hr)

  • Build a three-LED traffic light (red, yellow, green) all running off the 9 V battery. Pick resistors so each LED runs at ~15 mA
  • Try wiring an LED backward (anode and cathode swapped). Confirm it does not light. This is the diode's reverse direction
  • Read your kit's LED datasheet carefully. Note the typical forward voltage, the absolute maximum forward current, and the absolute maximum reverse voltage. Notice that the absolute maximums are much higher than the typical operating points; the "typical" values are the ones you design around

Reflection prompts

  1. The forward voltage drop is approximately constant across operating currents. What does "approximately" mean here, and when does the approximation break?
  2. You picked your resistor to give 15 mA. The LED brightness depends on current, not on voltage. Why is current the right variable, given everything else in the circuit is in terms of voltage?
  3. If a customer hands you a circuit with a too-small resistor in front of an LED, what is the first thing you would test, and why?

What's next

Week 6 introduces transistors. A transistor lets a small current control a larger current. This is how a microcontroller pin (which can source maybe 20 mA) drives a buzzer or small motor (which needs hundreds of mA). Without transistors, the Arduino weeks would be far more limited.