Control RGB LEDS (common cathode) with a Mosfet or a transistor

HI,

Assuming your LED power is +12V and your are powering it from a 3.3 or 5V arduino, you would need a driver like the attached.

The N-Mosfet must be a logic level MosFet chosen so the MosFET will be "on" when the gate is given 3.3V or 5V depending on your arduino. Actually the I/O voltage is slightly less than the supply for either.

The P-Mosfet will be selected based on the current you need to supply to your LED(s).

Clipboard01.jpg

Folks differ on whether the 1k in the N-Mosfet Gate is needed or not. It is not functionally required. I like to add it so if the MosFet is miswired you will likely not damage your arduino.

Clipboard01.jpg