シナリオ
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.
この図に含まれるもの
図の背後にある意思決定を読み解く。
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.