Embedded systems and IoT

Stage 2 · Lesson 2 of 7

LEDs and current-limiting resistors

Electronics you need

An LED (light-emitting diode) only conducts one way and, once it does, has almost no of its own. Without a resistor in series it draws as much current as the source allows and damages itself or the pin driving it. Choose the resistor with R = (supply voltage minus LED ) / current.

The forward voltage depends on the colour, about 2 V for red and around 3 V for blue or white, and the datasheet gives the exact value. A few milliamps is plenty for an indicator LED. pins have current limits per pin and for the whole chip, listed in the datasheet.

Common traprunning pins at their absolute maximum current, which the datasheet treats as a limit to avoid, not a target.

A question to check yourself, an AI practice session and 2 cheat sheet entries come with the full roadmap. Unlock

Resources for this stage

Start with

  • BookFree
    All About Circuits Textbook

    All About Circuits · Beginner

    Free: read the DC volume chapters on Ohm's law, series and parallel circuits and dividers

Practise

  • Wire LEDs, resistors and buttons in a simulator first, then build the same circuit for real

Keep handy

  • Getting started articles for Nucleo boards, alongside your chip's datasheet for FT pins and limits

Also worth your time

Mark this stage as not done?