Author Topic: Switching on a Mosfet  (Read 3028 times)

0 Members and 1 Guest are viewing this topic.

Offline MuffinsTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: gb
Switching on a Mosfet
« on: January 30, 2018, 10:26:29 am »
Hi guys I'm stuck with a simple mosfet circuit here.

I'm trying to turn this mosfet, http://www.alldatasheet.com/datasheet-pdf/pdf/201581/STMICROELECTRONICS/STP65NF06.html

With an Arduino Pro Mini running at 3,3v.

The supplied voltage to the circuit is around 4v from a protected lithium ion cell. I have a 1k ohm resistor and an LED on the positive side of the mosfet and the negative side is connected to ground. There is a 1k ohm resistor between the Arduino and mosfet gate pin.

The arduino is just set to turn the switch on and off with a sketch similar to the Blink sketch.


Now, what I was expecting was that I would see a voltage drop over the resistor and led close the the supply voltage but this is not what I am measuring. My measurements are from a pc oscilloscope grounded to the negative rail.

I've attached an image of my breadboard, with screenshots of the oscilloscope when the mosfet is apparently turned on and off.

Why is my result not the same as my expectation? I feel like I am going insane!
« Last Edit: January 30, 2018, 10:28:18 am by Muffins »
 

Offline McBryce

  • Super Contributor
  • ***
  • Posts: 2712
  • Country: de
Re: Switching on a Mosfet
« Reply #1 on: January 30, 2018, 10:44:33 am »
I don't see any positive supply to that LED, is it out of the picture?

McBryce.
30 Years making cars more difficult to repair.
 

Offline MuffinsTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: gb
Re: Switching on a Mosfet
« Reply #2 on: January 30, 2018, 10:50:55 am »
Yes, it is connected to the positive rail which is supplied by an 18650 cell.
 

Offline frozenfrogz

  • Frequent Contributor
  • **
  • Posts: 936
  • Country: de
  • Having fun with Arduino and Raspberry Pi
Re: Switching on a Mosfet
« Reply #3 on: January 30, 2018, 10:52:42 am »
Can you draw a schematic of what you put on the breadboard?
Looks like you are are routing power from source to drain, where it should be from drain to source but that is just a wild guess.

Edit: After looking at the picture on a different monitor it seems like I did not look carefully enough. If pin3 is connected to ground that should be correct.
« Last Edit: January 30, 2018, 10:59:47 am by frozenfrogz »
He’s like a trained ape. Without the training.
 

Offline MuffinsTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: gb
Re: Switching on a Mosfet
« Reply #4 on: January 30, 2018, 11:05:43 am »
Sorry, here's a schematic.

I notice in the datasheet when trying to determine what the pins are, that the drain pin is labeled as ,"tab" instead of (2). I've attached an image of this, what do they mean by ,"tab"?
 

Offline jm_araujo

  • Regular Contributor
  • *
  • Posts: 76
  • Country: pt
Re: Switching on a Mosfet
« Reply #5 on: January 30, 2018, 11:13:46 am »
First rule of troubleshooting: "Thou shall check voltages"

Check if all the expected voltages are there. Breadboards are sometimes problematic. Check that there are no bad contacts, and that yours isn't one with the power bus split in the center (been bit  more than once by those).

Also the \$ V_{GS(th)} \$ for that mosfet is specced between 2V and 4V, so it may not be the best choice to use a 3.3V logic signal to control the gate.
« Last Edit: January 30, 2018, 11:16:56 am by jm_araujo »
 

Offline McBryce

  • Super Contributor
  • ***
  • Posts: 2712
  • Country: de
Re: Switching on a Mosfet
« Reply #6 on: January 30, 2018, 11:15:07 am »
Tab is the metal heatsink on the back of the MOSFET.

McBryce.
30 Years making cars more difficult to repair.
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Switching on a Mosfet
« Reply #7 on: January 30, 2018, 11:18:08 am »
That MOSFET has a worst case turn on Vgs of 4 V, so you can't
guarantee it will turn on with a 3.3V UP.

There are MOSFETs, logic level, that can turn on at low Vgs.


https://www.raspberrypi.org/forums/viewtopic.php?t=101391


Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Offline frozenfrogz

  • Frequent Contributor
  • **
  • Posts: 936
  • Country: de
  • Having fun with Arduino and Raspberry Pi
Re: Switching on a Mosfet
« Reply #8 on: January 30, 2018, 11:52:51 am »
Besides: For low current switching applications such as LEDs you might want to simply use a BJT instead of the MOSFET.
He’s like a trained ape. Without the training.
 

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2417
  • Country: us
Re: Switching on a Mosfet
« Reply #9 on: January 30, 2018, 12:21:39 pm »
Tab is the metal heatsink on the back of the MOSFET.

McBryce.


To be clear, on 3 pin packages with a metal heatsink tab, the tab and pin 2 are electrically connected as a rule.

I'd suggest you experiment a bit without the arduino in the equation. See how the circuit behaves connecting your gate resistor to the center pin of a potentiometer between + and - to serve as a voltage divider.

 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Offline MuffinsTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: gb
Re: Switching on a Mosfet
« Reply #11 on: January 31, 2018, 11:33:00 am »
Thanks for the help guys.

I started down the path of understanding how mosfets work, yesterday I was reading up on what VGS(th) meant.

I see that for my N-channel mosfets the gate voltage needs to be more positive than the source voltage to work and that the 3,3v arduino does not provide a high enough voltage for my first mosfets to switch fully on.

So, I used a smaller mosfet with a lower value for VGS(th), to switch the supplied voltage to the gate of the larger mosfets. I had these on hand: http://pdf1.alldatasheet.com/datasheet-pdf/view/50804/FAIRCHILD/BS170.html

I had originally set out to build an H-bridge from the larger mosfets. Once I got the small mosfets to switch on the larger ones I ran into another problem, the VGS(th) was not sufficient on the mosfets at the top of the H-bridge. I resolved this by using a boost converter to create a voltage higher voltage to apply to them.


My latest problem is that the array of small mosfets are essentially pulling up the voltage for the H-bridge mosfets when the arduino provides a low logic signal to them and when the arduino starts up all of its pins drop to low, switching on all the H-bridge mosfets. To stop the H-bridge from shorting I put a mosfet in series with it but I have the same problem as I have no NPN or P-channel transistors on hand to disable the H-bridge on logic low. So for now I only apply power to the H-bridge manually after the arduino has started. It seems to work.

I've attached an image of my current build. I'm supplying around 6v from the power supply, dropped down to 3,3v with an LM317 for the Arduino. Stepper up with a boost converter to around 11v to switch the top H-bridge mosfets.

Thanks again :)
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Switching on a Mosfet
« Reply #12 on: January 31, 2018, 12:06:19 pm »
Normally an H Bridge is driven by a PWM with dead band capability
so MOSFET path from supply to ground never occurs.

See attached, where ph1 and ph2 do not overlap each other, overlap
controlled by user supplied setting.


Regards, Dana.

Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4247
  • Country: gb
Re: Switching on a Mosfet
« Reply #13 on: February 01, 2018, 02:37:00 pm »
Jullian Illett on You Tube demonstrates how to achieve a non-overlapping pair of PWM signals with an Arduino.  He was using it to drive a charge pump.

Check his Arduino PWM controller videos if you need to work out how to do this.  It's quite innovative.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Switching on a Mosfet
« Reply #14 on: February 01, 2018, 04:42:21 pm »
Vth is the gate-source voltage that a Mosfet begins conducting a tiny current, or when it is almost turned off. The maximum Vth is usually 4V. Instead you need the gate-source minimum voltage that completely turns it on, usually 10V.
A logic-level Mosfet turns on pretty well with a gate-source voltage of 4.5V or more.
 

Offline NEYi

  • Contributor
  • Posts: 21
  • Country: ua
Re: Switching on a Mosfet
« Reply #15 on: February 01, 2018, 06:01:52 pm »
What you're using is a standard MOSFET, most of which require at least 12V gate voltage to open up.

Try logic-level MOSFETs, like IRFZ44N, they can be opened with only 5V on the gate.
https://www.infineon.com/dgdl/irfz44n.pdf?fileId=5546d462533600a40153563b3575220b
« Last Edit: February 01, 2018, 06:03:31 pm by NEYi »
In science we trust.
 

Offline MuffinsTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: gb
Re: Switching on a Mosfet
« Reply #16 on: February 07, 2018, 09:26:25 am »
Hey guys,

I've build an H-Bridge with P and N Channel Mosfets. The videos made by Jullian Illett are pretty good, certainly helped me put this stuff together. I'm looking into charge pumps now, I was previously unaware of them.

I'll read up on deadband capability too.

Thank you all for your input.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf