-->
Page 1 of 1

ESP01 + IRFZ44N switch + external led

PostPosted: Sat Apr 04, 2020 6:37 am
by AdeLast
Hello team, I need help with my configuration. I am trying to use one esp01 to turn on or off an external led using a mosfet IRFZ44N, however I am totally new to this world and I need assistance with that.

What is the exact scheme that I need to use? I don't have a pin board but I hame some female/male, male/male pin cables that I can use.

Can anyone please assist?

This is the code I am using:

Code: Select allvoid setup() {
  pinMode(2, OUTPUT);     // Initialize the LED_BUILTIN pin as an output
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(2, HIGH);   // Turn the LED on (Note that LOW is the voltage level
  // but actually the LED is on; this is because
  // it is active low on the ESP-01)
  delay(1000);                      // Wait for a second
  digitalWrite(2, LOW);  // Turn the LED off by making the voltage HIGH
  delay(1000);                      // Wait for two seconds (to demonstrate the active low LED)
}

Attached (sorry for the low quality and messy wiring) there's a picture of what I have tried

Re: ESP01 + IRFZ44N switch + external led

PostPosted: Sun Apr 05, 2020 11:36 am
by AdeLast
This can be closed as I solved the issue

Re: ESP01 + IRFZ44N switch + external led

PostPosted: Sun Apr 12, 2020 6:42 am
by eriksl
The IRFZ44N is not suitable to be driven by the 3.3V ESP8266 GPIO. Either use a logic level MOSFET or even better, use a MOSFET gate driver. In that case you use almost any MOSFET you like.