# Strange behavior from n-channel MOSFET

I'm using BS170 N-channel enchantment enhancement mode MOSFET and have the following circuit:

The idea behind it is that the MOSFET should act as a simple switch and turn the LED on and off depending on the status of its gate.

Well, my problem is that the LED is always on, even when the gate is connected only to ground, or directly to ground with no resistor. I've tried this with several transistors. At one point, I've had the gate floating and (as expected), I'd get various levels of light from the LED when I touch the gate. Also some of them can be now turned OFF by connecting the gate to the positive side of the power supply and with some, the LED actually is brighter when I connect the gate to the ground than when the gate is floating. From what I've read, such behavior is expected from depletion mode MOSETs, right?

Could I have killed the transistor or did I get bad parts? How susceptible to static electricity are they?

• I actually got this by breaking down a bigger problem (the idea was to control a 7 segment display with the MOSFET), but the behavior is so strange that I decided to break the problem down into several smaller circuits and debug each independently. – AndrejaKo Feb 7 '12 at 23:16
• If you use Falstad's Circuit Simulator for images, I would recommend pausing it, and setting it to use a white background. – Brad Gilbert Feb 8 '12 at 1:23
• If it's an enchanted MOSFET there's no telling what it might do ;-) – Oli Glaser Feb 8 '12 at 4:31
• @Oli Glaser Ah, yes. That must explain everything. I'd better go and ask this one at the fantasy stackexchange. :) – AndrejaKo Feb 8 '12 at 9:21
• Whatever those yellow turds are don't belong on the schematic, at least not when you're asking others to look at it. If you don't care enough to present the problem properly, why should anyone else care about it? – Olin Lathrop Feb 8 '12 at 15:40

They are pretty susceptible to static, so I'd try a couple more.
Obviously make very sure you have it the right way round.
If they are cheap e.g. eBay parts (or from anywhere - we got sent the wrong part just last week from Farnell) then check they are not actually PNP parts (the fact that it turns off when you connect the gate to the positive supply sounds suspicious)
Also try and check that they are real parts - see if you can measure any conductance between drain and source or gate and source.

• Well, only one turns off when I connect it to Vcc, other don't. Some seem to conduct more when they're connected to Vcc or GND and less when the gate is floating. They seem to be Fairchild and the markings are F8816 and BS170 on the second line. So assembly plant code is 8 and date code is 816, according to manufacturer's website, but I'm not sure how to decode that. – AndrejaKo Feb 8 '12 at 9:30
• One of the problematic parts has S-G resistance of 175 $\Omega$ and a short between D-S and S-D. Other has out of range resistance between G-D and G-S but a short between D-S and S-D. – AndrejaKo Feb 8 '12 at 9:30
• They both sound to be dead then - you should be reading no continuity from gate to S or D, or from D to S (black lead on S). You should read low resistance (or a diode drop or less) from S to D (with red lead on S) as the body diode will conduct and also turn the MOSFET on (if gate is floating) If this type of thing happens regularly I would check all the parts you have (carefully - try not to handle leads) and consider possible static problems in your work area (what protection do you have in place?) – Oli Glaser Feb 8 '12 at 10:01

Assuming that the circuit is as shown and that you have the MOSFET pinout correct, then your MOSFET appears dead - and also acting unexpectedly.

3 V is not really enough to operate a BS170 - 5V is better. If changing to 5V (reccomended) re calculate LED resistor below.

The circuit is valid as shown BUT is rather more complex in functionality than you'd expect. I'd suggest putting the 220 ohm resistor in the Drain circuit in series with the LED for now.

Presumably LED is Red. If so Von ~~~= 2V so 1V left for 220 ohms so current ~~= 1/220 ~= 5 mA. So resistor could be as low as say 56 ohms for most LEDs. R _LED ~= (Vcc-VLED)/I_LED.
eg for 2V LED and 20 mA.
R = (3-2)/0.02 = 50 ohms. so 56 ohms std E12 value is fine for ~= 20 mA.

LED with higher Vf will be vv marginal here.
White LED will glimmer. 5V MUCH better.

Having a floating gate on a MOSFET is not a good idea.
Any MOSFET tends to be ESD sensitive - especially the gate. Touching the gate when it is open circuit and you are not grounded can ruin the MOSFET's day - and all days after that.

The circuit behaviour is extremely strange. It suggests that you have the FET pinout wrong. I'd suggest that you carefully check the pinout. It it's right repeat the check and keep repeating until you find it is wrong and then fix it :-) ie the behaviour is very very strange to the point of being almost inexplicable.

BS170 datasheet here

The graph below shoes that with Vgs = 3V (3V on gate) int will condi=uct / carry / swithc under 100 mA typically. How much under 100 mA is uncertain and varies by device but ~= 0 mA is possible.
4V is better and 5V is much better.

Be ABSOLUTELY CERTAIN that you have the pinout correct

• I'm 100 % sure I've got the pinout correct for the parts I have (the To-92 BS170) so my prime suspect is ESD right now (see my comments to Oli's post). Also why is it better to have the resistor in series with the LED? Is it to get lower D-S voltage so the voltage applied to the gate is more effective? Anyway, right now for my test purposes, current of 500 $\mu A$ is enough to trigger the LED. – AndrejaKo Feb 8 '12 at 9:40
• @AndrejaKo - With resistor in source, as R current rises the voltagerises so source roses above grounf=d and starts to cut off FET. As you have zero headroom already that is very bad. If you have more supply voltage this action limits the current and you have produced a rough constant current source. If you put the resistor in the drain lead the above effect does not occur as source is hard grounded and you just turn the FET hard on. THEN current is limited by having (Vsupply-VLED) dropped across R as in the formula that I stated. – Russell McMahon Feb 8 '12 at 11:04

Falstad's circuit simulator will simulator n and p channel mosfets, but not enhancement mode n and p channel mosfets. I made the same mistake, and hopefully no one else does either.

• While this may be true the question mentions trying different transistors, I assume it was a problem with an actual circuit and Falstad was only used to draw it. – PeterJ Apr 20 '14 at 4:28

Don't forget that your MOSFET has a body diode running from Source to Drain. So Drain is positive and Source is negative; otherwise the diode will always conduct and bypass the transistor (and gate control).