Author Topic: Voltage rise between diode and Nmosfet drain  (Read 4875 times)

0 Members and 1 Guest are viewing this topic.

Offline Hex173tTopic starter

  • Contributor
  • Posts: 25
  • Country: us
Voltage rise between diode and Nmosfet drain
« on: December 09, 2012, 08:54:13 pm »
I've been using LTSpice to simulate turning on and off a led using a mosfet. When trying the circuit with the LED and resistor between drain and batt +, there is a small rise in voltage at the led anode pin.  The higher the gate voltage relative to battery, the more the rise before the mosfet is turned on.

Why is this?  I'm new to reading data sheets, is there something in there that would describe this happening?

I've attached the view of the spice and the circuit.

Thanks



 

Offline Hex173tTopic starter

  • Contributor
  • Posts: 25
  • Country: us
Re: Voltage rise between diode and Nmosfet drain
« Reply #1 on: December 09, 2012, 09:27:06 pm »
I'd like to add that I know it has to do with the diode, it doesn't do that when a plain resistor is in there.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8334
Re: Voltage rise between diode and Nmosfet drain
« Reply #2 on: December 10, 2012, 09:14:01 am »
Diodes are non-ohmic and their forward voltage varies depending on the current.
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2031
  • Country: au
Re: Voltage rise between diode and Nmosfet drain
« Reply #3 on: December 10, 2012, 01:15:54 pm »
Hi
Your problem is at the cathode of the LED not the anode.

I can see that you have a problem, why is the cathode going above 13v?

This occasionally happens in Spice, the simulation is only as good as the models.

The cathode is effectively floating because the models don't have any leakage.

Try putting a 100Megohm resistor in parrallel with the diode.
Any weird stuff and check the models, try a similar model, or put in some sensible initial conditions to help it converge.

Hope this helps.

 

Offline AlfBaz

  • Super Contributor
  • ***
  • Posts: 2184
  • Country: au
Re: Voltage rise between diode and Nmosfet drain
« Reply #4 on: December 10, 2012, 02:39:54 pm »
The cathode is effectively floating because the models don't have any leakage.
Are you sure about that? Considering spice was originally devised to assist developing IC's if something as rudimentary as a PN junction can't be modelled correctly then I don't think spice would have made it as far as it has

Quote
Try putting a 100Megohm resistor in parallel with the diode.
I think the reason that works is because you are bleeding away the charge being developed due to the capacitive nature of the PN junction.

Its been a long, long time since I knew this stuff so I'm very likely to be talking out my arse here.

I think whats happening is that as the gate voltage rises we are getting charges (holes/electrons) moving to/from the drain and the cathode of the LED, probably further exacerbated spice's tendency to chuck hissy fits at points that dont have good DC paths to ground

It would be good to breadboard it and see what happens there
 

Offline Neilm

  • Super Contributor
  • ***
  • Posts: 1551
  • Country: gb
Re: Voltage rise between diode and Nmosfet drain
« Reply #5 on: December 10, 2012, 05:31:54 pm »

Are you sure about that? Considering spice was originally devised to assist developing IC's if something as rudimentary as a PN junction can't be modelled correctly then I don't think spice would have made it as far as it has

A simulation is only as good as the data it uses. If you put rubbish in, you will get rubbish out. Many simulation models omit a large amount of data to allow the simulation to run quicker.

Neil
Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe. - Albert Einstein
Tesla referral code https://ts.la/neil53539
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2031
  • Country: au
Re: Voltage rise between diode and Nmosfet drain
« Reply #6 on: December 10, 2012, 09:40:40 pm »
Quote
Quote from: HackedFridgeMagnet on Today at 01:15:54 PM

    The cathode is effectively floating because the models don't have any leakage.

Are you sure about that? Considering spice was originally devised to assist developing IC's if something as rudimentary as a PN junction can't be modelled correctly then I don't think spice would have made it as far as it has

Sorry what I meant was this particular model of the led didn't seem to have any leakage.
The only thing that could force the drain up above the 13v at that point in the waveform was if the node was floating.  Which obviously would never happen on a breadboard. That is why I suggested the 100Meg resistor.
I just looked up the leakage it is Is and should be .27nA. I don't know why this doesn't seem to work.

I must admit I have had troubles with spice models before, and never got to the bottom of why, so a work around seemed in order.

 

Offline Hex173tTopic starter

  • Contributor
  • Posts: 25
  • Country: us
Re: Voltage rise between diode and Nmosfet drain
« Reply #7 on: December 10, 2012, 10:23:23 pm »
Thanks to all for the replies.

I think I'll end up getting the parts and breadboarding it test. 

I may be thinking of this wrong, but I'm imagining a sort of convergence of voltages at the led cathode pin, where the V1 voltage starts dropped by.  If I have a rising voltage from 0 to 13v at the gate, with the transitor turning on around 6v, I don't understand how am I building up voltage over the V1 of 13, higher than any voltage source in the circuit.

Before I posted, I did 1 more thing, since the gate has some capacitance, I just replaced the mosfet with a 180pF capacitor and while goofing around with it I changed the dropper resistory to .1mohm. 
Green= V1, 6 volts across
Blue=Anode side of diode, near 6 volt across
Bluegreen= V2, starting at 0 and rising to 13 volts.
Red=Cathode side of diode, rising from 6 volts to near 15 volts.


I didn't anticipate that.  I'm worse off than I ever thought.  V=IR right?

 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8520
  • Country: us
    • SiliconValleyGarage
Re: Voltage rise between diode and Nmosfet drain
« Reply #8 on: December 10, 2012, 10:37:38 pm »
The cathode is effectively floating because the models don't have any leakage.
Are you sure about that? Considering spice was originally devised to assist developing IC's if something as rudimentary as a PN junction can't be modelled correctly then I don't think spice would have made it as far as it has

Hell yeah, we're sure about that. The standard models in run of the mill spice programs absolutely SUCK ! they are all 'ideal models' leading to a lot of problems getting the simulation to converge and give a correct result.

Yes spice was designed to model electronics systems mathematically and there is nothing wrong with the mathematics , the problem is the parameter set fed into the algorithm needs ot be accurate and complete. Generating an accurate spice model is very difficult. Datasets become gigantic very guickly and simulation times are long.
A good spice engine costs a lot of money. Good meaning as an engine that works efficient and fast. not all spice 'motors' are built the same. One of the benchmark 'spice' motors out there is Eldo.

you are feeding a spice netlist of an ideal mosfet and an ideal led. spice creates a calcualtion matrix and attempts to solve it. as the matrix is 'seeded' wrong you get very weird outcomes....  it would n;t be the first time that spice geves you a 5000 voltpp output amplitude for an opamp powered with 12 volts... simply because spice does was not told the actual opamp will clip at a certain voltage. the idealized models do not provided that information.

it's like driving a car. you move along the high way fine and all of a sudden the car stops... if nobody told you it needs gas ... spice is a dumb computer program. if you don't give it a restriction 'das tank hold 40 liters , we use 1 liter per 10 kilometer' it doesn;t take gas consumption into account. according to the simulation the car would drive forever ....
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2741
  • Country: ca
Re: Voltage rise between diode and Nmosfet drain
« Reply #9 on: December 10, 2012, 10:50:11 pm »
This reply is intended for the original poster.

The rising Drain voltage can be explained in the LTspice model by the following actions:

  • The MOSFET has parasitic capacitors between all the terminals
    When the pulse is applied between the Gate and Source, the positive going pulse will be coupled through the Gate-Drain capacitance to the Drain.
    The LED in the Drain circuit is reverse biased and there is no path for the current.
    When the voltage on the Gate reaches the Gate threshold voltage for the MOSFET the voltage Vds will collapse.

This is will be seen in the real circuit as well as the LTspice.

Jay_Diddy_B

 

Offline AlfBaz

  • Super Contributor
  • ***
  • Posts: 2184
  • Country: au
Re: Voltage rise between diode and Nmosfet drain
« Reply #10 on: December 11, 2012, 02:22:31 am »
...
you are feeding a spice netlist of an ideal mosfet and an ideal led. spice creates a calcualtion matrix and attempts to solve it. as the matrix is 'seeded' wrong you get very weird outcomes....  it would n;t be the first time that spice geves you a 5000 voltpp output amplitude for an opamp powered with 12 volts... simply because spice does was not told the actual opamp will clip at a certain voltage. the idealized models do not provided that information.

it's like driving a car. you move along the high way fine and all of a sudden the car stops... if nobody told you it needs gas ... spice is a dumb computer program. if you don't give it a restriction 'das tank hold 40 liters , we use 1 liter per 10 kilometer' it doesn;t take gas consumption into account. according to the simulation the car would drive forever ....
I don't mean to nit pick but surely you can concede there is ideal behaviour, spice behaviour and real behaviour and in that order of accuracy.

I'm not going to be the one to laud spice's virtues, but it just seems that whenever something goes wrong with a sim, rather than ascertaining where the inaccuracy lies nearly everyone starts with the standard "spice is shit" remarks. Its a rarity to have a discussion about spice that doesn't end in the gutter

Maybe I'm being a little sentimental but spice has served me well over the years, its just a matter of understainding its limitations                                                                                                                                                                                           
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf