Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By AdeLast
#86339 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
You do not have the required permissions to view the files attached to this post.
User avatar
By eriksl
#86477 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.