3
\$\begingroup\$

I want to use a transistor as a switch for a 3 watt LED (5V, 700mA.) The transistor is triggered/switched via an ESP32.

I want to dim the LED using PWM offered by the ESP32.

I need the transistor because the ESP32 does not deliver enough current (~40mA vs 700mA) on its pins and therefore an external power source must be used.

Furthermore, I have read that MOSFETs are better for fast switching, I suppose PWM is such a use case.

I am pretty new to the microcontroller game and therefore still confused by the sheer amount of different MOSFETs and BJTs.

\$\endgroup\$
1
  • \$\begingroup\$ A very warm welcome to the site. I'm sure a form of this question has been asked and answered here many times before. Have you searched the existing questions and what did you find? \$\endgroup\$
    – TonyM
    Apr 24 at 10:21

1 Answer 1

5
\$\begingroup\$

All that you need to look for in a MOSFET in your case is the threshold voltage, which is the voltage at which the MOSFET starts turning on, and its RDS(on) resistance which should be low enough not to cause substantial voltage drop and heating of the MOSFET.

You can simply look for "Logic level MOSFETs" which are guaranteed to be fully on at less than 5V on their gate electrode. If your ESP32 output only goes up to 3.3V, just look for the threshold voltage of less than 3V (or less than 2.8V, to be on the safe side).

The RDS(on) for less than 1A of current can be as high as 100 mΩ without worrying about the MOSFET getting hot, and that's almost any MOSFET with a low enough threshold voltage - most of them will have less than 50 mΩ.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.