When driving an NPN transistor using the GPIO output on a raspberry pi I assume no protection is needed on the GPIO side of the circuit?
So nothing would really be needed beyond this to drive the LED as seen below?
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
It would be best if you provided current limiting for the GPIO port. It depends on the current gain of the NPN transistor, but at minimum a 200Ω series resistor from the GPIO to the NPN needs to be used to limit the current to less than 16mA. (and also use less than a total limit of 50mA on all ports)