This example will demonstrate using two different transistors to switch on and off several LED's from one I/O pin. This example is sinking around 200mA of current for the eight LED's connected to each transistor. The setup used in this demo draws under 6mA of current from the microcontroller pin when using a PN2222A transistor and basically 0mA using a IRLU024NPBF. I purchased the transistors from Tayda Electronics, making the IRLU024NPBF sixty-five cents and the PN2222A five cents each.
1 PIC32MX250F128B microcontroller board
9 White LED's with 220ohm resistors
2 830 point Breadboards
2 470 OHM resistor (one for each transistor)
1 PN2222A transistor
1 IRLU024NPBF transistor
Some black 22AWG solid wire
Some red 22AWG solid wire
A few jumper wires
PN2222A pinout photo can be found here:
IRLU024NPBF pinout photo can be found here:
See the video below for a demo of it being controlled by a PIC32 microcontroller and a simplified version of the circuit schematic connections to each of the different transistors used.
Direct video link: https://youtu.be/6XEnEG-1PdQ