Author Topic: MOSFET Datasheet vs. measurements - where am I slipping up?  (Read 708 times)

0 Members and 1 Guest are viewing this topic.

Offline dvhTopic starter

  • Contributor
  • Posts: 18
  • Country: hu
MOSFET Datasheet vs. measurements - where am I slipping up?
« on: March 09, 2024, 06:20:06 pm »
Hello folks!

I'm testing my understanding of MOSFETS. I picked one that I had, BS170 enhancement type MOSFET.

I designed an experiment where I'm trying to determine what VGS I need to ID=150mA @ 5V. I hooked up a pot to an arduino, where based on the voltage @ the pot, I change the duty cycle of an analog pin. That pin is hooked up to the gate of the MOSFET via a 5K resistor. (Please see the simulation).

2060690-0

On the simluation, I can read that I need about 3.7V on the gate to get 150mA current to flow on the drain. On the datasheet, I read something similar.

2060648-1

In measurement, I saw something completely different. I only took 4 measurements but it should give you an idea why I'm confused. (I measured the current with a multimeter and VGS with an OScope - VGS is the mean of multiple PWM cycles where PP is 0-VCC)
2060654-2

My first surprise is that the MOSFET starts conducting way below 2V, which I saw in the datasheet. Why could that be?
« Last Edit: March 09, 2024, 06:22:05 pm by dvh »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19531
  • Country: gb
  • 0999
Re: MOSFET Datasheet vs. measurements - where am I slipping up?
« Reply #1 on: March 09, 2024, 06:41:48 pm »
That doesn't look right. The minimum threshold is 0.8V with a drain current of 1mA. There must me an error in your measurement or the device is bad or fake.

Have you checked the drain and source connections aren't reversed?

Does the drain current drop to near zero, when the gate is shorted to the source?
 
The following users thanked this post: dvh

Offline wraper

  • Supporter
  • ****
  • Posts: 16867
  • Country: lv
Re: MOSFET Datasheet vs. measurements - where am I slipping up?
« Reply #2 on: March 09, 2024, 06:47:32 pm »
I change the duty cycle of an analog pin. That pin is hooked up to the gate of the MOSFET via a 5K resistor.
Then it's literally not analog and you are just switching the mosfet on/off and VGS is either 0V or 5V. Thus threshold voltage spec and transfer characteristics become irrelevant to your measurements.
« Last Edit: March 09, 2024, 06:51:40 pm by wraper »
 
The following users thanked this post: dvh

Offline dvhTopic starter

  • Contributor
  • Posts: 18
  • Country: hu
Re: MOSFET Datasheet vs. measurements - where am I slipping up?
« Reply #3 on: March 09, 2024, 06:57:25 pm »
I change the duty cycle of an analog pin. That pin is hooked up to the gate of the MOSFET via a 5K resistor.
Then it's literally not analog and you are just switching the mosfet on/off and VGS is either 0V or 5V. Thus threshold voltage spec and transfer characteristics become irrelevant to your measurements.

Exactly what happened! Ran another simulation with a square wave to see if that changes anything. Please see this screenshot of measurements and simulation values.

2060804-0

Basically, with the PWM, I jump between 0 and 5V. @5V, naturally, the MOSFET conducts but only for the +duty. If I smooth out the PWM signal I might see what I want - the FET starts conducting around 2V.
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8179
  • Country: fi
Re: MOSFET Datasheet vs. measurements - where am I slipping up?
« Reply #4 on: March 09, 2024, 07:03:39 pm »
Yes, you can turn the PWM output into a pretty nice low-cost DAC by adding an RC filter. C needs to be large because of the crappy 1st order characteristic to get rid of the PWM carrier frequency (you'd also want to use the highest possible PWM frequency setting which still delivers just enough resolution), but when speed does not matter (i.e. settling time in seconds range is acceptable) it's a simple circuit.
 
The following users thanked this post: dvh

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19531
  • Country: gb
  • 0999
Re: MOSFET Datasheet vs. measurements - where am I slipping up?
« Reply #5 on: March 09, 2024, 07:11:47 pm »
I'm confused. Are you purely talking about simulation or real life? A SPICE simulator will just use the model given to it. If it's bad, then it'll produce incorrect results.

Going from the plot, it looks like you have a depletion mode MOSFET. I do remember seeing some devices designed both for enhancement as well as depletion mode. They have a gate threshold of somewhere around 0V. Unfortunately I can't remember the part numbers and have no idea if they're still made.

Check the part number.  Failing that, it's possible you have a fake, recycled part  i.e. a depletion mode MOSFET, with the part number changed to BS170. It would be weird since small depletion mode MOSFETs tend to be more expensive and tricky to get hold of nowadays, but someone stripping parts off old boards, to resell as new will just want to make a profit and will use part numbers they know will sell.
« Last Edit: March 11, 2024, 02:12:06 pm by Zero999 »
 
The following users thanked this post: dvh

Offline MarkT

  • Frequent Contributor
  • **
  • Posts: 367
  • Country: gb
Re: MOSFET Datasheet vs. measurements - where am I slipping up?
« Reply #6 on: March 11, 2024, 08:21:38 am »
Also note real MOSFETs have considerable variation in threshold voltage due to trapped charge/ions in the gate oxide - this can vary over time due to applied field too, so don't expect threshold voltage to be particularly well defined or constant over time.  Older devices were worse, but its still an issue.  For power MOSFETs you typically see a +/-1V specification for Vthr for instance.
 
The following users thanked this post: dvh

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3180
  • Country: au
Re: MOSFET Datasheet vs. measurements - where am I slipping up?
« Reply #7 on: March 11, 2024, 09:49:21 am »
I hooked up a pot to an arduino, where based on the voltage @ the pot, I change the duty cycle of an analog pin. That pin is hooked up to the gate of the MOSFET via a 5K resistor.
Why not just connect the pot to the mosfet gate directly via the 5K resistor??? No Arduino needed.
 
The following users thanked this post: wraper, newbrain

Offline dvhTopic starter

  • Contributor
  • Posts: 18
  • Country: hu
Re: MOSFET Datasheet vs. measurements - where am I slipping up?
« Reply #8 on: March 12, 2024, 09:44:37 pm »
Yup! What I did. 10uF was enough to get things rolling. There is tiny variation in output voltage around 50% duty cycle but that is more than tolerable. I could do a capacitor multiplier circuit to get rid of that ripple but meh... Good enough! I ended up using prescaler 8 on an ATMega328p to achieve 25KHz to go above audible range. Hundreds of KHz would be quite possible but this seem to work out just fine.

Going from the plot, it looks like you have a depletion mode MOSFET. I do remember seeing some devices designed both for enhancement as well as depletion mode. They have a gate threshold of somewhere around 0V. Unfortunately I can't remember the part numbers and have no idea if they're still made.

Thankfully it is a BS170, everything worked as I saw in the datasheet once the input PWM signal at the gate was smoothed.

Why not just connect the pot to the mosfet gate directly via the 5K resistor??? No Arduino needed.

I want to control a tiny DC motor with it. That means I have to deal with inrush current. It was easier for me to design a circuit around a microcontroller which gradually applies increases duty cycle than solve it with discrete components. Not even sure how I'd go about it.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19531
  • Country: gb
  • 0999
Re: MOSFET Datasheet vs. measurements - where am I slipping up?
« Reply #9 on: March 12, 2024, 10:52:34 pm »
Yup! What I did. 10uF was enough to get things rolling. There is tiny variation in output voltage around 50% duty cycle but that is more than tolerable. I could do a capacitor multiplier circuit to get rid of that ripple but meh... Good enough! I ended up using prescaler 8 on an ATMega328p to achieve 25KHz to go above audible range. Hundreds of KHz would be quite possible but this seem to work out just fine.

Going from the plot, it looks like you have a depletion mode MOSFET. I do remember seeing some devices designed both for enhancement as well as depletion mode. They have a gate threshold of somewhere around 0V. Unfortunately I can't remember the part numbers and have no idea if they're still made.

Thankfully it is a BS170, everything worked as I saw in the datasheet once the input PWM signal at the gate was smoothed.

Why not just connect the pot to the mosfet gate directly via the 5K resistor??? No Arduino needed.

I want to control a tiny DC motor with it. That means I have to deal with inrush current. It was easier for me to design a circuit around a microcontroller which gradually applies increases duty cycle than solve it with discrete components. Not even sure how I'd go about it.
No capacitor is required. In fact it's counterproductive, as it will result in slow switching and the MOSFET neither fully on nor off.

The whole point of PWM is the MOSFET is either on or off. The gate voltage needs to be high enough to ensure it turns on with a low on resistance and negligible voltage drop.
 
The following users thanked this post: wraper

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8179
  • Country: fi
Re: MOSFET Datasheet vs. measurements - where am I slipping up?
« Reply #10 on: March 13, 2024, 02:38:52 pm »
Very small DC motors (tens of W, inefficient) --> PWM into generously dimensioned MOSFET.
Larger motors --> add fast current sense (e.g. low-side sense resistor + amplifier) and pulse-by-pulse current limiting (PWM cycle termination)

In either case, freewheeling diode (schottky), tight layout and DC link capacitance are important.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 3712
  • Country: nl
Re: MOSFET Datasheet vs. measurements - where am I slipping up?
« Reply #11 on: March 13, 2024, 03:19:04 pm »
Or just use a dedicated motor driver IC. They are not very expensive, can have build in current limiting, makes it easy to reverse the motor if needed, deals with the back EMF, etc.

These for example can deal with a lot of current and also limits it with pulse width modulation of its own. Very good when starting up a motor that draws a lot of current initially.

But there are many motor drivers to be found also in combination with Arduino's, like the MX1508 modules.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf