mosfet board issue

Hi guys
I am trying to wire a mosfet breakout board

https://www.google.com/search?q=arduino+mosfet+board&client=firefox-b-m&biw=360&bih=560&tbm=isch&oq=arduino+mosfet+board&gs_l=mobile-heirloom-serp.3..0i19.3584.6554.0.6709.8.4.2.2.4.0.201.564.2j1j1.4.0....0...1c.1.34.mobile-heirloom-serp..2.6.227.Lj4wU7mJJTk#mhpiv=4&spf=1562780573458

I am doing the following

Arduino nano via us to PC for power
Signal via button to have high or low value to mosfet
12v in from external source (car) and negative to ground

Output I need the 12v controlled by mosfet and kill those 12v via button, I only need the positive side as the negative side is pwm x4 and 12v is constant , instead for 1 mosfet for each way I have done a bridge on the 12v (injectors) so all of them are fed by one single 12v line

Problem
I do get 12v and car runs no problem
At the moment I give signal high/low to cut the voltage to 0 it still feeds 12v and having the vcc disconnected so it should give 0v
Have common ground to car and Arduino

I can't kill the power
How do I need to wire this?
Thanks for helping

Do You have any wires? Do You have any code? If so, please attach the wiring diagram and the code.

Hi yes
The code is basically if button is high
Put the mosfet low.
On vcc nothing
Gnd ground to Arduino and car
Sig to signal
Vc+ in the 12v from the car
In- nothing (have tried with gnd to car and Arduino no results)
Out+ 12v back to car
Out- nothing (have also tried with lead back to gnd to battery and no luck)

Drawing and sketch please, not words.

If you seriously want help, do as asked in #1.
We need a proper schematic image of your setup, and to see your actual code (posted between code tags). Without that, not possible to offer any suggestions towards solving your problem.

hi again this is the code to do the testing

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode (Q, OUTPUT);
  pinMode (button, INPUT_PULLUP);

}

void loop() {
  // put your main code here, to run repeatedly:
  int ButtonState = digitalRead(3);
  Serial.println(ButtonState);
//had before "else"
if 
(ButtonState == LOW)
digitalWrite (Q,LOW);
if
(ButtonState == HIGH)
digitalWrite (Q,HIGH);
}

on the drawing it shows that sig is with gnd to car its wrong, its the gnd to car and nano

A Nano will eventually disappear in a puff of magic smoke when powered from 12volt (in a car).

The IRF520 is not a logic level fet, so it shouldn't be used with an Arduino.
There are exceptions, where the fet is driven by an opto coupler from the 12volt source.
Post a link to the fet module you're using (not a Google page).

Everything is grounded in a car to the chassis, so loads must be switched high-side (in the + line).
An N-channel fet can't do that without added circuitry.
Normally a P-channel fet is used for that, with a small-signal NPN level converter.

Your code is incomplete.
Why use "digitalRead(3)" when you have (partially) declared a variable "button" (with internal pull up).
Now pin3 does not have pull up.
Leo..

Hi,
OPs circuit;

What is the value of Q in your code?
What pin are you outputting the signal to the MOSFET ?

Can I suggest you hand draw your diagram and label pin numbers please?

Tom.... :slight_smile:

Hi guys
Thanks for reply
The pins are 2 for the button and 3 to the signal.
Q is the button to be readed ( 0 or 1)
I have used this modules successful before with 12v battery and injectors
But here not, as I only need to control the 12+ I can't use it on the coils - as they are pwm controlled ( each of.them) that's why I am going to the - of the battery
This is the module