Mosfet sorta works

I have this project where using a ble connection to this onboard ble nano, i activate D5 pin to open the gate to IRLB4132 but here I am measuring the voltage across the load pins and sometimes i get 9.71V out of the 972 the battery has, sometimes i only get 6 or 5 and sometimes I get nothing.

What could be the problem? The nano is powered from a lipo and the onboard LED lights up everytime the command to set D5 HIGH is received, but you can see it doesnt work every time. Its hard to see because the power LED is also on from the beginning but I send the command at these time intervals (where you can notice the LED 13 next to it light up):

second 8 - voltage jumps to 5.05 and goes as high as 6.52 and i send LOW at second 19
second 32-voltage jumps to 1.01 and drops off and wiggles and i send LOW at second 42
second 50-voltage jumps to 0.80 and picks up to 5.92 and i send LOW around second 57
at this point the lipo turned off, so i turned it back on...the lipo doesnt not turn off at other times before this point. i actually unplug it and plug it back in.
second 1:32-voltage jumps to 4.30V and drops off so i send LOW at 1.45
second 1:54-nothing happens until second 2:00 where it jumps to 5-6.86V and I send LOW at 2:05

Full Video
Smaller Video

The sketch simply parses the ble serial and either activates or deactivates the pin The code works everytime because I get the led light up onboard. Its the voltage that is the problem:

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  pinMode(5,OUTPUT);
  pinMode(13,OUTPUT);
}

void loop() {
  if (Serial.available()>0)  {
    String input = Serial.readString();
    Serial.println("got something");
    Serial.println(input);
    
    if (input == "hi") {
      Serial.println("bye");
      //send mosfet high
      digitalWrite(5, HIGH);
      digitalWrite(13, HIGH);
    } else {
      //send mosfet low................WAITING FOR LIPOS TO CHARGE...
      digitalWrite(5, LOW);
      digitalWrite(13, LOW);
    }
  }

  delay(200);
}

Marciokoko:
but here I am measuring the voltage across the load pins...

Three things:

  • "Load pins"? There are more than one? What do you mean by "Load Pins"?
  • Schematic please -- otherwise, it's very hard to come up with any kind of diagnosis or offer suggestions -- and I watched your video and I can't tell what the connections are, from it -- sorry.
  • Your terminology "Open the Gate" seems odd to me. I don't know if this is a cultural thing, but I've never heard that terminology before. If anything, you're opening the channel -- but, a more correct way of saying it is turning the transistor on or turning the transistor on by applying a positive voltage to the gate -- at least I think that's what you mean

ok

  1. By load pins I mean the pins where the load is connected, in this case I have 2 female header pins.

  2. The schematic is now attached.

  3. Yes by open the gate I mean the channel.

Marciokoko:
2. The schematic is now attached.

Your "schematic" doesn't show where power is coming from. Or where the relay is connected. I suppose I'm nitpicking, but as it is, I'm forced to make assumptions. :wink:

Also, I noticed you changed the Gate resistor from 150Ω to 1K. If this is a slow turn on/turn off issue, raising this value will make it worse.

Hi,
Can you please post a copy of your COMPLETE circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Include ALL power supplies and this mysterious LiPo.

What are you trying to accomplish?

What is your load?
I’m not sure if that battery is good for what you are trying to use it for.

Use a 470R resistor between D5 and the MOSFET gate.
The gate to gnd resistor should be 10K.

Write some code JUST to control D5, forget about Bluetooth etc etc.

OPs layout;
sircuit8888.jpg

Tom… :slight_smile:

I think you've got no actual load attached, so your voltage readings are essentially meaningless.
Any semiconductor switch has small leakage current when off.

Try adding 1k resistor as a load and measuring again.

Can you include a clear picture of both the top and bottom of your circuitboard? Looking at the wires, it looks like the gate is wired to your battery.

I thought this circuitboard looked familiar. Did you change the backside of the board, or does it still look like this

Tinman: I cut the wire that ran underneath the resistor between GND & GATE. That is what made it work at least part of the time. The GATE is not wired to the battery. Here are the pics of the board:

MarkT: I only have the leads of the multimeter attached. Im trying to make sure the circuit opens the channel consistently, which is the issue Im having now.

TomGeorge: The resistor GATE to GND is 6.2k, i threw something together as quickly as I could in fritzing. The battery is a 9V for the mosfet and the power source of the arduino is a 5V/700mA battery pack from those phone charging accessories they sell everywhere.

Screen Shot 2018-05-06 at 11.40.27 AM.png

Screen Shot 2018-05-06 at 11.40.17 AM.png

Screen Shot 2018-05-06 at 11.40.27 AM.png

Screen Shot 2018-05-06 at 11.40.17 AM.png

Ok. It was an optical illusion on the wire.

The pic is a little blurry when enlarged. Is that a cold solder joint where the anode of the diode connects to the 2 pin hdr?

Hi,
I suggest you follow @MarkT post #5 and use a 1K resistor as the load so you have some load current flowing.

Just using the DMM, on its own in on the load terminals, will not draw the current needed for the MOSFET to work properly.

Tom... :slight_smile: