Switching on a Mosfet - Page 1
Forum section: electronics / beginners

author: Muffins
author_rank: Regular Contributor
timestamp: January 30, 2018, 10:26:29 am
content: 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.htmlWith 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!

author: McBryce
author_rank: Super Contributor
timestamp: January 30, 2018, 10:44:33 am
content: I don't see any positive supply to that LED, is it out of the picture?McBryce.

author: Muffins
author_rank: Regular Contributor
timestamp: January 30, 2018, 10:50:55 am
content: Yes, it is connected to the positive rail which is supplied by an 18650 cell.

author: frozenfrogz
author_rank: Frequent Contributor
timestamp: January 30, 2018, 10:52:42 am
content: 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.

author: Muffins
author_rank: Regular Contributor
timestamp: January 30, 2018, 11:05:43 am
content: 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"?

author: jm_araujo
author_rank: Regular Contributor
timestamp: January 30, 2018, 11:13:46 am
content: 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.

author: McBryce
author_rank: Super Contributor
timestamp: January 30, 2018, 11:15:07 am
content: Tab is the metal heatsink on the back of the MOSFET.McBryce.

author: danadak
author_rank: Super Contributor
timestamp: January 30, 2018, 11:18:08 am
content: That MOSFET has a worst case turn on Vgs of 4 V, so you can'tguarantee 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=101391Regards, Dana.

author: frozenfrogz
author_rank: Frequent Contributor
timestamp: January 30, 2018, 11:52:51 am
content: Besides: For low current switching applications such as LEDs you might want to simply use a BJT instead of the MOSFET.

author: Nusa
author_rank: Super Contributor
timestamp: January 30, 2018, 12:21:39 pm
content: Quote from: McBryce on January 30, 2018, 11:15:07 amTo 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.

author: danadak
author_rank: Super Contributor
timestamp: January 30, 2018, 11:54:14 pm
content: These are cheap, small package -https://www.onsemi.com/pub/Collateral/2N7000-D.PDFhttps://www.ebay.com/itm/100Pcs-2N7000-MOSFET-N-CH-60V-200MA-TO-92-NEW-US-SHIPPING-M361/401461115498?hash=item5d78f27a6a:g:HpoAAOSwA3dYDwicRegards, Dana.

author: Muffins
author_rank: Regular Contributor
timestamp: January 31, 2018, 11:33:00 am
content: 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.htmlI 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

author: danadak
author_rank: Super Contributor
timestamp: January 31, 2018, 12:06:19 pm
content: Normally an H Bridge is driven by a PWM with dead band capabilityso MOSFET path from supply to ground never occurs.See attached, where ph1 and ph2 do not overlap each other, overlapcontrolled by user supplied setting.Regards, Dana.

author: paulca
author_rank: Super Contributor
timestamp: February 01, 2018, 02:37:00 pm
content: 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.

author: Audioguru
author_rank: Super Contributor
timestamp: February 01, 2018, 04:42:21 pm
content: 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.

author: NEYi
author_rank: Contributor
timestamp: February 01, 2018, 06:01:52 pm
content: 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

author: Muffins
author_rank: Regular Contributor
timestamp: February 07, 2018, 09:26:25 am
content: 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.