Author Topic: LTSpice vs. reality - why NMOS works and BJT doesn't?  (Read 885 times)

0 Members and 1 Guest are viewing this topic.

Offline dvhTopic starter

  • Contributor
  • Posts: 20
  • Country: hu
LTSpice vs. reality - why NMOS works and BJT doesn't?
« on: October 26, 2024, 04:27:44 pm »
Once again, I had a bit of time on my hand and started looking into boost converter circuits. As always, had to realize that there is something I don't get. :) Stuff of my electronics journey seems like.

I built a breadboard version of this circuit, where VSig is provided by a 555 timer.

2414827-0

Of course it didn't work! I replaced the 2N2222 BJT with a BS170 NMOS with appropriate voltage divider and resistor to ground to see if things change. And indeed they did, the circuit worked on the breadboard.

Now comes the fun part: both of the circuits work in LTSpiece.

The question: why didn't the BJT approach work if the NMOS did? What am I missing?

Thanks!
 

Offline jwet

  • Super Contributor
  • ***
  • Posts: 1064
  • Country: us
Re: LTSpice vs. reality - why NMOS works and BJT doesn't?
« Reply #1 on: October 26, 2024, 05:02:27 pm »
The BJT didn't work because it takes a lot more current that .4 mA to full switch on ("saturate") the BJT.  You can watch the difference in spice between that right side of the inductor (collector or drain).  You will see that the BJT, doesn't conduct enough current to full charge the inductor.  Quick fix, make the base resistor 470 ohms or so. 
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22020
  • Country: gb
  • 0999
Re: LTSpice vs. reality - why NMOS works and BJT doesn't?
« Reply #2 on: October 26, 2024, 07:23:05 pm »
Models are often based on typical device characteristics, not worst case. It's likely the transistor you used hat a lower hFE then the model.

Why do you have a potential divider before the MOSFET's gate?

 

Offline dvhTopic starter

  • Contributor
  • Posts: 20
  • Country: hu
Re: LTSpice vs. reality - why NMOS works and BJT doesn't?
« Reply #3 on: October 27, 2024, 03:54:00 pm »
The potential divider is there to limit IDS. At least that was my theory - is it silly?

Models are often based on typical device characteristics, not worst case. It's likely the transistor you used hat a lower hFE then the model.

The min. hFE is 35 according to the datasheet. Is 17.5mA Ic enough to charge the inductor?

The BJT didn't work because it takes a lot more current that .4 mA to full switch on ("saturate") the BJT.  You can watch the difference in spice between that right side of the inductor (collector or drain).  You will see that the BJT, doesn't conduct enough current to full charge the inductor.  Quick fix, make the base resistor 470 ohms or so. 

In LTSpice I measure around 26mA for Q1 and around 21mA for M1. Where did the 0.4mA came from?
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 6407
  • Country: sm
Re: LTSpice vs. reality - why NMOS works and BJT doesn't?
« Reply #4 on: October 27, 2024, 04:31:04 pm »
Mind there are two variants of 2N2222 with different pin assignments. Like PN2222 in TO92 or something like that.
Try with different npn transistor as well.
Also with npn as well as with mosfet you may need a resistor from base to ground in order to speed the transitions up.
Also 1 picosecond edges with you signal is something I would not use in simulation as that is pretty unrealistic assumption.. :)

PS: your npn version does not work in LTspice properly, btw.
The duty cycle and period of your driving signal has to fit somehow your inductance and load.
You have to see the collector current to ramp up to certain level, which converts to higher voltage then.
Also you need some base current.
You have to play with the duty and period and base current and inductance and load, or do the math :)
« Last Edit: October 27, 2024, 04:55:41 pm by iMo »
Readers discretion is advised..
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf