Arduino mosfet module help

so the +vin and + vout are optional for operation right?

If you have a separate load and power source, they just make the connections more convenient but for your application you don't need them.

1 Like

@chris_sta
Have a nice day!

thank you so much for you time everybody.

well after testing it it doesnt actually handle 12v 0.5...2 amps ( in my application).When the current flowed through it the led indicator was flashing on and off and the signal was on and off but with a different frequency and the connection was just ON so the current was closed until i disconnected the load and then the led was flashing according to my signal and when tested with a multimeter to test the continuity it was working fine with no load. What shall i do?

Show us your code a a diagram of how you have things connected. A hand drawn schematic will be fine.
When you post your code use Copy for Forum under the EDIT Menu and paste the code here

const int buttonPin = 3;   // the pin that the pushbutton is attached to
const int ledPin = 2;      // the pin that the LED is attached to

void setup() {
  pinMode(buttonPin, INPUT_PULLUP); // initialize the pushbutton pin as an input
  pinMode(ledPin, OUTPUT);          // initialize the LED pin as an output
}

void loop() {
  int buttonState = digitalRead(buttonPin); // read the state of the button

  if (buttonState == LOW) {
    // Button is pressed, flash the LED
    digitalWrite(ledPin, HIGH);
    delay(200);
    digitalWrite(ledPin, LOW);
    delay(200);
  } else {
    // Button is not pressed, set the LED pin high
    digitalWrite(ledPin, HIGH);
  }
}

Is it connected like this?
Is the button connected between Pin 3 and GND?
The code is OK

yes the button is connected on another pin and arduino ground ofcourse.

You said you wanted to open the circuit of a ground wire.
So you cut the wire and connected the end that was connected to ground to the MOSFET source
and the other end to the MOSFET drain. Is that correct so far?

One mistake in the code.
In the else statement, the ledPin should be set to LOW not HIGH

yes

but i want the mos to close circuit when i let go of the button

Sorry I misunderstood, then it is correct.
So what is the problem?

to my understanding the problem is the mosfet module, it seems that apparently it cannot handle "safe" loads according to its datasheet maximum ratings.

It should easily handle 15Amps at 36VDC and probably as high as 20A.
Is the signal through your "ground" wire DC and is the voltage less than 36V?

definetely less than 36v

Then I don't understand what you mean by:

it seems that apparently it cannot handle "safe" loads

Is it not connecting the wire to ground?
If you connect a voltmeter between drain and source, what is the voltage when it is on?

wait if i connect the meter there it should display 0 ?

Very close to zero, it might be a few millivolts.