Using an SEEED Studio SAMD-21 microcontroller to control LED lights using Mosfets

Thread Starter

Mock10chicken

Joined Oct 20, 2025
16
Hello, I am trying to design a breadboard circuit that uses a SEEED Studio SAMD-21 microcontroller to turn an LED light on and off by sending a current through a Mosfet. My first question is what type of Mosfet should I use N channel or P channel? My second question is how do I connect all of these parts together so that the microcontroller turns the light on and off when the code says to. My third questions is im guessing I need to use resistors so what type should I use.
 

geekoftheweek

Joined Oct 6, 2013
1,429
Google "mosfet as switch" and "how to calculate resistors for LEDs" to start with. Also check out "how to blink led with microcontroller"

Draw a simple schematic and you'll start to get better help.
 

MrChips

Joined Oct 2, 2009
34,628
Your choice depends on "LOW SIDE" or "HIGH SIDE" switching.

1762823709867.png

In (a) the load is on the HIGH SIDE and the N-channel MOSFET switch is on the LOW SIDE. This is the usual configuration because getting the control signal to work properly is easier. Make sure you use an N-channel MOSFET that is designed to work with the MCU control voltage, for example, IRLZ44N, "logic level" MOSFET. Look up the VGS(th) threshold voltage in the device datasheet to be certain.

In (b) the load is on the LOW SIDE and the N-channel MOSFET switch is on the HIGH SIDE. You can also use a P-channel MOSFET in this position. In either case, getting the control signal right is more complicated.

Your load will be the LED in series with a resistor. The purpose of the resistor is to limit the LED current thus preventing it from burning out. You use Ohm's Law to calculate the value of the series resistor. You also need to calculate the power dissipated by the resistor.
 
Top