LTspice simulation unexpected results and unable to simulate pulling a pin low with MOSFET

Thread Starter

jim0000

Joined Oct 28, 2020
130
Hello

I am trying to show how I can pull a the EN/UVLO pin low using an NMOS. I did the voltage divider equation to find that Vgate will be about 12V when Vbattery is 13.5V. However as shown in the simulation that is not the case when I include the zener diode, I didnt think it would have much effect since the listed Rs of the diode is 0.5ohms. Why is my gate not reaching the desired gate votlage to turn this NMOS on?

Also, I would like to show that the EN/UVLO pin listed in the diagram can start at a higher voltage, and then be pulled low when the NMOS is turned on. However, using a voltage source just keeps it a constant 10V. Is there a better way to show how a pin can be pulled low to ground once the short is established by the NMOS turning on?
View attachment 282145

With zener diode in simulation:
View attachment 282146




Without zener diode in simulation:
View attachment 282147
 
Last edited:

Ian0

Joined Aug 7, 2020
9,668
Don't forget that a SPICE Voltage source has zero source impedance, so it would take an infinite amount of current to pull it to zero!
 

crutschow

Joined Mar 14, 2008
34,283
I did the voltage divider equation to find that Vgate will be about 12V when Vbattery is 13.5V. However as shown in the simulation that is not the case when I include the zener diode
How do you expect 12V when the Zener is removing 12V from the supply?
What is the supposed purpose of the Zener?

If you want the Zener to limit the MOSFET gate voltage, then put the Zener from the gate to ground.
 

Thread Starter

jim0000

Joined Oct 28, 2020
130
How do you expect 12V when the Zener is removing 12V from the supply?
What is the supposed purpose of the Zener?

If you want the Zener to limit the MOSFET gate voltage, then put the Zener from the gate to ground.
Maybe I am not sure about the functioning of the zener? I thought that it doesn't allow current flow until 12V is reached and once that was reached it would allow current through via the tunneling effect, and then it allows the full voltage through minus the typical diode voltage drop. Is that thinking wrong? I put the zener diode there because the NMOS can be partially on at 1V to 3V Vgs, and I didn't want the NMOS to affect the EN/UVLO pin at all until the battery is at 13.5V.
 

Thread Starter

jim0000

Joined Oct 28, 2020
130
Also, most MOSFETSs allow up to 20V on the gate.
Yeah I was hoping to use that effect by attempting to use the zener in such a way that as soon as the MOSFET gate begins to see voltage (after 12V is reached at the zener cathode) then the MOSFET would be immediately fully on (full inversion) instead of partially on at a lower gate voltage.
 

Ian0

Joined Aug 7, 2020
9,668
Maybe I am not sure about the functioning of the zener? I thought that it doesn't allow current flow until 12V is reached and once that was reached it would allow current through via the tunneling effect, and then it allows the full voltage through minus the typical diode voltage drop. Is that thinking wrong? I put the zener diode there because the NMOS can be partially on at 1V to 3V Vgs, and I didn't want the NMOS to affect the EN/UVLO pin at all until the battery is at 13.5V.
That's rather more like the operation of a diac.
The zener will have its rated voltage across it (Provided that there is sufficient current through it)
 

Thread Starter

jim0000

Joined Oct 28, 2020
130
That's rather more like the operation of a diac.
The zener will have its rated voltage across it (Provided that there is sufficient current through it)
Ahh I see, I didn't realize it would have that affect in reverse polarity. What is a diac?
 

Ian0

Joined Aug 7, 2020
9,668
What is a diac?
A breakover diode. It remains non-conducting until the voltage across it reaches the "breakover" voltage, then it switches on so that there is only a fraction of a volt across it, and remains in that state whilst there is any current flowing through it. When the current stops, it returns to the non-conducting state.
 

Papabravo

Joined Feb 24, 2006
21,159
The best way to simulate an I/O pin on a device that is active low is to model it as a high impedance input with a resistor to Vcc. Then use the MOSFET as an open drain-active low driver. If the pin you are concerned about does not have an internal pullup you can use an external one in parallel with whatever is inside the chip. Then just drive the gate of the MOSFET as you would any other capacitive load. You really don't need to mess around with extraneous parts.

Here are some other threads on the topic of GPIO simulation:
https://forum.allaboutcircuits.com/threads/6v-output-with-esp32.177245/#post-1606857
https://forum.allaboutcircuits.com/...sent-a-gpio-in-a-circuit.184805/#post-1706450
 
Last edited:

Thread Starter

jim0000

Joined Oct 28, 2020
130
Tour MOSFET will short the battery when on. What are you trying to accomplish with thIs circuit?
I was hoping that it would short the EN/UVLO pin from an IC not the battery, how would it short the battery if the battery is only connected to the gate here? I am attempting to sense battery voltage with a voltage divider, and use that to turn a transistor on and off depending on the battery voltage, which would then short the EN/UVLO pin to ground to turn an IC off.
 

BobTPH

Joined Jun 5, 2013
8,813
I am attempting to sense battery voltage with a voltage divider, and use that to turn a transistor on and off depending on the battery voltage, which would then short the EN/UVLO pin to ground to turn an IC off.
You need a comparator to do that effectively.
 

BobTPH

Joined Jun 5, 2013
8,813
You would compare the battery voltage to a known voltage reference. The comparator can be made to pull low when the battery voltage is less than the desired threshold.

The reference could be derived from the battery if no other reference is available. If not much precision is needed it can be a zener diode.

For example, use a 5V zener, anode to ground cathode to B+ through a 1K resistor. Then comoare that to a divided battery voltage that is 5V when the battery is at the minimum acceptable voltage.
 

Thread Starter

jim0000

Joined Oct 28, 2020
130
You would compare the battery voltage to a known voltage reference. The comparator can be made to pull low when the battery voltage is less than the desired threshold.

The reference could be derived from the battery if no other reference is available. If not much precision is needed it can be a zener diode.

For example, use a 5V zener, anode to ground cathode to B+ through a 1K resistor. Then comoare that to a divided battery voltage that is 5V when the battery is at the minimum acceptable voltage.
Would that be more accurate than just using a voltage divider? What would the output of the comparator be connected to, my transistor base?
 

MrChips

Joined Oct 2, 2009
30,711
V2 shown is an ideal voltage source. Ideal voltage sources have zero resistance.
When the transistor M1 turns on, you are drawing infinite amps from V2 through M1.
On a simulator, nothing disastrous happens. In real life the circuit blows up.
 
Top