5 ms·
I'm an electronics amateur, got a question here: I use a PN2222 [1] transistor to switch a 5V supply through an infrared LED from a microcontroller. It works,
by bschwindHN 10y ago
I'm an electronics amateur, got a question here:
I use a PN2222 [1] transistor to switch a 5V supply through an infrared LED from a microcontroller. It works, but should I be using something better/smaller/more cost effective/more appropriate for the circuit [2]?
[1] https://blog.bschwind.com/2016/05/29/sending-infrared-commands-from-a-raspberry-pi-without-lirc/images/transistorPackCloseup.jpg https://blog.bschwind.com/2016/05/29/sending-infrared-comman...
[2] https://blog.bschwind.com/2016/05/29/sending-infrared-commands-from-a-raspberry-pi-without-lirc/images/breadboardCircuit.jpg https://blog.bschwind.com/2016/05/29/sending-infrared-comman...
(the resistor in the photo is 680 ohms)
- Itsdijital 10y agoFor something like that? If it works, it's good. If you are trying to optimize for whatever parameters, then maybe there are better parts. But for something simple and basic like that, its fine.
- TD-Linux 10y agoNo, in fact in that circuit the PN2222 is the only thing limiting current to your LED. If you switch that to a MOSFET you'll blow up your LED unless you add a series resistor. (are you sure you aren't already giving too much current to your LED?)