Lo scenario
A Raspberry Pi GPIO pin cannot source enough current for a high-power LED, so an NPN transistor is used as a low-side switch with an external 5V supply.
Cosa contiene questo disegno
Leggi le decisioni che ne stanno alla base.
01
Use a 1k base resistor to limit GPIO current while saturating the transistor
02
Add a 10k pull-down resistor so the LED stays off when the GPIO is floating
03
Power the LED from an external 5V rail through a 330R current-limiting resistor, not from the GPIO pin
Use this pattern whenever a microcontroller I/O pin must control a load that draws more current than the pin can safely provide.