clearing a fault, using a schmitt trigger a mosfet and a mechanical switch

Ron H

Joined Apr 14, 2005
7,063
hi, i am confused because i expected the current at my load to increase when i close the switch however it drops.
This happens when i leave my 5Ω in series with the switch and the LED+resistor( not in series with the load but this time in parallel)
My current starts at a little over 90mA and drops to 75mA when i close my switch, that shouldn't happen it should increase.
Post the schematic of the circuit you are testing.

following the schematic you gave me on LT spice, seems i have to download the reset button library because i cant find it.
I just used a pulsed voltage source to simulate the reset switch. It was simpler than using a voltage-controlled switch.
Are you trying to simulate an actual, accidental fault, caused by a wiring short like i described, or is this a homework assignment, where you have been told where and how the fault occurs? I'm curious about how you came up with the 5Ω resistor.
 

Thread Starter

newbieateverything

Joined Feb 25, 2013
95
Post the schematic of the circuit you are testing.

I just used a pulsed voltage source to simulate the reset switch. It was simpler than using a voltage-controlled switch.
Are you trying to simulate an actual, accidental fault, caused by a wiring short like i described, or is this a homework assignment, where you have been told where and how the fault occurs? I'm curious about how you came up with the 5Ω resistor.
I wish i could say i came up with the 5Ω resistor however i did not. The 5Ω i believe is there to give the switch some resistance, so that when it closes the current should increase. The switch on pspice has an Ropen of 0.01, so if i dnt include any resistance there wont be much of a difference.

I wasn't actually told where or how the fault occurs, i decided the fault will happen when the current increases because the switch closes.

The fault being caused by the switch closing is something i determined. I am guessing my supervisor agreed with that because it sounds simple enough.


I left the resistor in series with the diode, because for the strangest reason it doesn't seem to make a difference.

if you measure the current at the load it decreases when the switch closes, then increases when i reset it.
Slight problem with my reset option, the voltage through the load ends up higher than it started.

If you have PSPICE just put a current arrow on the 200ohm resistor. You will see what i mean
 

Attachments

Ron H

Joined Apr 14, 2005
7,063
I wish i could say i came up with the 5Ω resistor however i did not. The 5Ω i believe is there to give the switch some resistance, so that when it closes the current should increase. The switch on pspice has an Ropen of 0.01, so if i dnt include any resistance there wont be much of a difference.

I wasn't actually told where or how the fault occurs, i decided the fault will happen when the current increases because the switch closes.

The fault being caused by the switch closing is something i determined. I am guessing my supervisor agreed with that because it sounds simple enough.


I left the resistor in series with the diode, because for the strangest reason it doesn't seem to make a difference.

if you measure the current at the load it decreases when the switch closes, then increases when i reset it.
Slight problem with my reset option, the voltage through the load ends up higher than it started.

If you have PSPICE just put a current arrow on the 200ohm resistor. You will see what i mean
Your p-channel MOSFET turns on when the gate is at -15V, and it turns off when the gate is at +15V, BUT the internal substrate diode conducts even when the channel is off, so it might as well be on, but with a forward voltage (drain to source) of about 0.6 to 0.7V (depending on the MOSFET you choose).
The current through the 200Ω decreases when you introduce the fault because the high current through the 5Ω resistor causes an additional 3V drop across the 0.9Ω sense resistor. This only leaves about 17V for the 200Ω resistor, so its current decreases. When you think you are clearing the fault, this causes the gate voltage on the MOSFET to go high, but the substrate diode is conducting, and the voltage across the resistor is now zero (you shorted it out with the "clear" switch), so the 200Ω now has a little more voltage across it, causing the current to increase slightly.
Remember that, you clear the fault, the current through the 5Ω resistor has to go to zero. Your circuit doesn't do that. Mine does.
 

Thread Starter

newbieateverything

Joined Feb 25, 2013
95
Your p-channel MOSFET turns on when the gate is at -15V, and it turns off when the gate is at +15V, BUT the internal substrate diode conducts even when the channel is off, so it might as well be on, but with a forward voltage (drain to source) of about 0.6 to 0.7V (depending on the MOSFET you choose).
The current through the 200Ω decreases when you introduce the fault because the high current through the 5Ω resistor causes an additional 3V drop across the 0.9Ω sense resistor. This only leaves about 17V for the 200Ω resistor, so its current decreases. When you think you are clearing the fault, this causes the gate voltage on the MOSFET to go high, but the substrate diode is conducting, and the voltage across the resistor is now zero (you shorted it out with the "clear" switch), so the 200Ω now has a little more voltage across it, causing the current to increase slightly.
Remember that, you clear the fault, the current through the 5Ω resistor has to go to zero. Your circuit doesn't do that. Mine does.
so in short i have been doing absolute nonsense :(
Ideally i wanted to use an N-channel mosfet however, using the N-channel wasn't giving me the desired output at my schmitt trigger.

Yes yours does put the current in the 5Ω to zero however, i didn't notice the current in the 200Ω increasing

in your schematic how is the fault caused?

do you have PSPICE??....trying to do what you did on pspice. (much faster to use)
 
Last edited:

Ron H

Joined Apr 14, 2005
7,063
so in short i have been doing absolute nonsense :(
Ideally i wanted to use an N-channel mosfet however, using the N-channel wasn't giving me the desired output at my schmitt trigger.

Yes yours does put the current in the 5Ω to zero however, it didn't notice the current in the 200Ω increasing

in your schematic how is the fault caused?

do you have PSPICE??....trying to do what you did on pspice. (much faster to use)
It appears that you want the fault to be inside the motor. So do it like this, sort of like you originally intended, but with my circuit breaker instead of yours.
(see attachments).
Instead of monitoring the 200Ω resistor current, monitor the current in the 20V supply. This will show you the motor current (plus the LED current). The motor current will still only go to 4A for about 4uS, and then the MOSFET will turn off and stay off until you press the reset button.
 

Attachments

Thread Starter

newbieateverything

Joined Feb 25, 2013
95
Based on the schematic you gave me this is what i understand happens. Please let me know if this is wrong

Sorry this is abit long

Before the fault occurs the Mosfet gate voltage will be high, which means the Mosfet starts normally on. The motor in the cooling unit is operating with its normal operating current of 100mA. When the voltage pulse is introduced the voltage controlled switch closes, the closed switch causes the current in the load to rapidly increase from 100mA to 4A. This increase in current in the load is sensed by the Resistor sensor at the source of the Mosfet. The voltage on R sense goes to high; this high voltage input is fed into the non-inverting amplifier. The high voltage input is compared with the reference voltage formed by the 47KΩ and 1KΩ resistor, because the input voltage is above the reference voltage the comparator outputs a high voltage.
Care must be taken when using negative feedback in designing the HCB because as input voltage increases, the output will increase accordingly with the differential gain. However as output increases, that same output is feedback to the inverting input, thereby acting to decrease the voltage differential between inputs, which acts to bring the output down. This means that the fault current condition will either oscillate, or settle at a current which makes the + and -inputs equal, neither of which is satisfactory.
The D type flip flop is included to ensure that the circuit will latch, and can't be reset until the flip-flop is reset by the switch on the clear input.
When the high output voltage from the non-inverting amplifier enters the clock input of the d type flip flop, the flip flop is triggered by the rising edge, i.e. increasing voltage. The flip flop stores and outputs the logic level, i.e. 1 applied to its data terminal as long as the clock input is high. The flip flop complementary output outputs a low based on the truth table below:
Clock Data Q Complimentary Q
1 1 1 0
0 1 1 0

The low output is feedback to the Mosfet gate, this low voltage is below the Mosfet threshold voltage which turns the Mosfet off. Turning off the Mosfet forces all the current to flow through the currently close voltage controlled switch, this causes a high voltage through the switch causing the switch to open.
When the switch opens the current across the 5Ω falls to zero because the open switch causes an open circuit. The current through the 200Ω falls accordingly because the only current through the load is the current coming from the supply. This effectively means that the fault current has been cleared.
The voltage input of the opamp is now below the reference voltage, therefore the opamp outputs a low. The clock input goes to Low, however the flip flop output will not change because the set and reset inputs are both held high, so it will not change state and store the low complimentary output before the clock transition occurred. This means the output is latched at either logic “0” where the fault has been cleared and the HCB is on stand-by or logic “1” when the fault has just occurred.
 
Last edited:

shortbus

Joined Sep 30, 2009
10,049
Dumb question Newbie, how does a motor fault clear itself? Or any fault clear itself for that matter? A circuit breaker is to shut off power until a person checks and clears the fault.
 

Ron H

Joined Apr 14, 2005
7,063
Turning off the Mosfet forces all the current to flow through the currently close voltage controlled switch, this causes a high voltage through the switch causing the switch to open.
When the switch opens the current across the 5Ω falls to zero because the open switch causes an open circuit. The current through the 200Ω falls accordingly because the only current through the load is the current coming from the supply. This effectively means that the fault current has been cleared.
As shortbus pointed out, this is wrong. The voltage controlled switch (SW) is NOT controlled by the voltage across the switch terminals. It is controlled by the difference between the input pins (on the side of the SW). Its properties are defined by the .model mysw statement. The LTspice Help file will explain this.
The SW is just a way to make a short occur in a simulation. In my sim, I set up when it closes and opens with the voltage source v2. In the results of my sim (my previous post), you can see on the bottom trace the following sequence:

1. The fault occurs at 1ms, causing the current to rise to 4A. This trips the Schmitt trigger, which clocks the FF, which turns the MOSFET off, interrupting the load current. All this happens in about 4us, so all you see is a spike of current. I'll attach a zoomed-in view of this.

2. At 10ms, I turn off mysw. This represents me, opening up the motor and repairing the short. As I'm sure you know, human intervention is required to reliably remove a short. The MOSFET is still off, so no current gets through it. Therefore the Schmitt inputs and output do not change.

3. At 15ms, I apply a reset pulse. You would do this with another switch. (I used a voltage source in the sim, because it was simpler for me.) This resets the FF, turning the MOSFET back on. Notice that the current goes up to 110mA, which is the normal load current plus the LED current.

4. At 21ms, I cause the fault to recur, and once again, the current is interrupted within ≈4uS. The fault, as before, is NOT cleared. You have to do that yourself.
 

Attachments

Thread Starter

newbieateverything

Joined Feb 25, 2013
95
As shortbus pointed out, this is wrong. The voltage controlled switch (SW) is NOT controlled by the voltage across the switch terminals. It is controlled by the difference between the input pins (on the side of the SW). Its properties are defined by the .model mysw statement. The LTspice Help file will explain this.
The SW is just a way to make a short occur in a simulation. In my sim, I set up when it closes and opens with the voltage source v2. In the results of my sim (my previous post), you can see on the bottom trace the following sequence:

1. The fault occurs at 1ms, causing the current to rise to 4A. This trips the Schmitt trigger, which clocks the FF, which turns the MOSFET off, interrupting the load current. All this happens in about 4us, so all you see is a spike of current. I'll attach a zoomed-in view of this.

2. At 10ms, I turn off mysw. This represents me, opening up the motor and repairing the short. As I'm sure you know, human intervention is required to reliably remove a short. The MOSFET is still off, so no current gets through it. Therefore the Schmitt inputs and output do not change.

3. At 15ms, I apply a reset pulse. You would do this with another switch. (I used a voltage source in the sim, because it was simpler for me.) This resets the FF, turning the MOSFET back on. Notice that the current goes up to 110mA, which is the normal load current plus the LED current.

4. At 21ms, I cause the fault to recur, and once again, the current is interrupted within ≈4uS. The fault, as before, is NOT cleared. You have to do that yourself.
Thanks.
I didn't get that from before.
Human intervention ok. *note to self*
 

Ron H

Joined Apr 14, 2005
7,063
Thanks.
I didn't get that from before.
Human intervention ok. *note to self*
Yeah, more than OK. Human intervention is required to fix a short. The circuit breaker does not fix the short. It only opens the circuit, protecting the power supply and/or preventing the motor from catching fire.
 

Thread Starter

newbieateverything

Joined Feb 25, 2013
95
seriously dont know how i missed that.
was about to complicate my life.

if my mosfet doesn't switch because the voltage pulse at the gate is too low what can i do to boost the voltage?
or is that a current issue. It was suggested that i use a BJT resistor connection as a pre-amplifier
would this work?

how about using a sparkfun level converter? to boost the voltage?
 
Last edited:

Ron H

Joined Apr 14, 2005
7,063
seriously dont know how i missed that.
was about to complicate my life.

if my mosfet doesn't switch because the voltage pulse at the gate is too low what can i do to boost the voltage?
or is that a current issue. It was suggested that i use a BJT resistor connection as a pre-amplifier
would this work?

how about using a sparkfun level converter? to boost the voltage?
If you are using the circuit I posted, the MOSFET will be off when Vgs=0V. It will be fully on when Vgs=+10V.
Are you planning on using a lower supply voltage than 10V?.
 

Ron H

Joined Apr 14, 2005
7,063

Thread Starter

newbieateverything

Joined Feb 25, 2013
95
If you are using the circuit I posted, the MOSFET will be off when Vgs=0V. It will be fully on when Vgs=+10V.
Are you planning on using a lower supply voltage than 10V?.
The signal generator i have can only supply ± 5V. i wanted to test the circuit while supplying a pulse to the mosfet to see if it switches properly before i include the flip flop

following your schematic do you think ill encounter any problems while building
maybe the 200Ω resistor representing the load is too small?? i am trying to make sure the current in my breadboard doesn't exceed 5A.

if i replace the 200 with a 2.2K and the 5 with a 47k
total resistance becomes 46.017
therefore current when switch is closed is 0.43..

would i have to change the resistors making up the potential divider if i change the 200 and the 5 ?
 
Last edited:

Thread Starter

newbieateverything

Joined Feb 25, 2013
95
Hi, so i have built the circuit
The problem i am now having is how to test it properly.
The push switch is set up to be normally off, using 3A.

How do i check if it works?
I think i should use an oscilloscope at the 2200 ohm resistor(replaced the initial 200ohm) to see if the current increases from the normal 0.01 to 0.4A. (the purple wire connects my circuit to the oscilloscope)

My LED didnt turn on or off. I expect my LED to start off on, the instant i push the switch it should turn off and stay off till i reset the circuit.

I have yet to include my reset button. what type of reset button should i use?

if anything is unclear and annotations are needed please let me know.
 

Attachments

Top