MOSFET LR7843 didnt switch off

Hi, I bought HERE MOSFET LR7843 for my project with 12v electromagnet. I have this code:

void setup() {
  pinMode(8, OUTPUT); //mosfet
  Serial.begin(9600);
}

void   loop() {
  digitalWrite(8,   HIGH);
  Serial.println("on");
  delay(5000);
  digitalWrite(8, LOW);
  Serial.println("off");
  delay(5000);
}

Here is how i connected it:

Problem is: The mosfet is always switched on (electromagnet works) also if arduino dont send 5v into it. (sorry for my english lol) I also tried some other ways how to connect it what i found on this forum but nothing works. I think it can be broken but I am not sure. Thanks for all useful answers! :blush:

Please post a schematic of the whole circuit, including power supplies.

Maybe the MOSFET module is damaged or faulty. Did you connect a flyback diode to the electromagnet?

This pin of the MOSFET looks like it could be damaged, it is not as clean and shiny as the other pin below it in the photo.
Screenshot_20240930-194809-018

is just looks like rosin but i dont connect flyback diode so i think u are right it is damaged. Here is my schema i dont know if i did it right i am sorry


i just added motor bcs i didnt found how to add electromagnet schema in that program

If you want to scratch your head, keep on wiring like this..
image
But what's the point, you have a screw connector there.

I know, but it falls off the screw connector because the cable is too thin

MOST driver boards have a flyback diode, and a pull-down resistor on the MOSFET gate so it doesn't turn on with nothing connected.

Please post some photos of the entire circuit as built.

Not right. You are using a MOSFET module, not an individual MOSFET component, so just draw it as a rectangle and label it and label it's pins in your schematic.

There is a diode on the module, but I'm pretty sure it's not a flyback diode, so an external flyback diode still required to prevent damage when the load is an electromagnet/relay coil/solenoid/motor/fan/pump etc.

I was skeptical of what you said here, but Google around turns up this schematic: https://protosupplies.com/wp-content/uploads/2020/06/LR7843-MOSFET-Control-Module-Schematic.jpg
Looks like you're right. The diode looks to be there to protect the gate from a negative voltage. It's not a flyback diode; this should be added separately.
Although its absence doesn't quite explain why the MOSFEt doesn't turn off.

Without a flyback diode connected across the electromagnet, you probably burned out the MOSFET.
Next time put a diode across the electromagnet.

Hi,

For all to see.


NOTE: FLYBACK DIODE.
What if you just connect DC supply to the output terminal strip without the load, does the LED on the PCB come ON?

Tom.. :smiley: :+1: :coffee: :australia:

1 Like

And to be sure: this is not fitted on the board.

yes it comes on

I think so.

I think so.

So do you understand about the flyback diode?

I ordered 1000v/10a but I am not sure how to connect it. Can you please explain how it works? :smile:

1 Like

thank you so much :heart_hands:

You are welcome