mosfet gets "stuck on" when using project volatage but not external voltage for dc-ac inverter

Thread Starter

.frank.

Joined Feb 21, 2016
46
I have attached a schematic picture to help understand this project. I simply do not understand what's going on and was hoping for people with bigger brains than myself to answer this.

Here is what this project does in short - it has a sound detector so when I knock on my desk, the 1st led lights for as long as the sound is detected, then it cycles to the next led, rinse and repeat infinitely. When it gets to RC5 of the chip, there is a 3v dc - ac power supply that puts out about 200vAC. I simply hooked a light to it - (very low amperage). Here is the problem:

If I hook an led up to this fet, it works fine
If I hook up the 3v dc - ac inverter on BATTERIES, it works fine (essentially I am switching the batteries on and off)
If I hook up the inverter as in the schematic (trying to not user batteries and use the main power instead) it gets stuck on.

*There is a resister not shown in the schematic to lower the voltage from 5v to 3v when trying to use the inline power

What do I mean by stuck on? It's almost like some kind of loop - the sound detector acts as if someone stuck a voltage across it somehow to cause it to trigger, thus the gate triggers.

For the LOVE OF GOD what am I doing wrong?
 

Attachments

Dodgydave

Joined Jun 22, 2012
11,284
Your mosfet is drawn wrong, you need to have the Source on the 0V, and switch the load with the Drain, and a 1k pull down resistor across the gate and source.
 

#12

Joined Nov 30, 2010
18,224
I see it now. The Dodger says to move the load to the drain side, or you could use a p-fet and reverse the logic. What you have now is like an emitter follower. As current is sent to the load, the voltage at the source rises and defeats the gate voltage.
 

Thread Starter

.frank.

Joined Feb 21, 2016
46
Your mosfet is drawn wrong, you need to have the Source on the 0V, and switch the load with the Drain, and a 1k pull down resistor across the gate and source.
I tried that as well and it didn't work. let me explain better. What I meant to say and this is totally my fault for not communicating correctly... Is that the circuit works fine until that inverter gets triggered. Once it gets triggered then it stays on.
I also already tried a pull-down resistor with no luck.
 

Thread Starter

.frank.

Joined Feb 21, 2016
46
I see it now. The Dodger says to move the load to the drain side, or you could use a p-fet and reverse the logic. What you have now is like an emitter follower. As current is sent to the load, the voltage at the source rises and defeats the gate voltage.
I already tried that as well. If I reverse the source and drain sides the device constantly stays on and does not trigger properly at all. I also swapped it for a p fet and switched it so that I'm triggering on the high side of the circuit. It also has the exact same effects it will trigger just fine and then get stuck in the on spot and if I reverse the source and drain it constantly stays on.
 

Dodgydave

Joined Jun 22, 2012
11,284
You need to post the circuit of the inverter, never known fets to latch on, unless the gate is picking up stray pulses.

Try this when the circuit latches on, short out the gate to source, what happens?
 

ScottWang

Joined Aug 23, 2012
7,397
I redraw the circuit, please recheck the dc-ac connection and the pins of mosfet.
If you have the O'scope then you should measure the signal of Vg when the mosfet is latch.

mosfet gets stuck on_frank-AAC.gif
 

Thread Starter

.frank.

Joined Feb 21, 2016
46
You need to post the circuit of the inverter, never known fets to latch on, unless the gate is picking up stray pulses.

Try this when the circuit latches on, short out the gate to source, what happens?

It seems to drop it likes its supposed too! what the?!

Also cant post the circuit on the inverter as I don't have it. It's some cheap-o thing I purchased. Looks like all it has on it is a place for 2 "aa" batteries, 1 little polarized cap, and 1 very small transformer.
 

Thread Starter

.frank.

Joined Feb 21, 2016
46
Does the PIC have adequate supply decoupling right at its Vdd and Vss pins?
Don't understand what this means? It's sitting on the same +5V and ground rails as everything else. Can you please explain to a novice such as myself what this means, better yet, I have a scope and dmm - can I use them to find the answer? If so...how?
 

Thread Starter

.frank.

Joined Feb 21, 2016
46
That shows that the mosfet isn't suffering from punch-through.
Go with Alec t in post #12 and try to protect the PIC from jolts in the power supply.
What does punch-through mean?

I posted to Alec the below:
Don't understand what this means? It's sitting on the same +5V and ground rails as everything else. Can you please explain to a novice such as myself what this means, better yet, I have a scope and dmm - can I use them to find the answer? If so...how?
 

#12

Joined Nov 30, 2010
18,224
Punch-through...a short from drain to source...sometimes temporary due to a reversal of Vcc.

Add a 10 uf aluminum electrolytic or tantalum capacitor and a ceramic capacitor of 100 nf directly to the power and ground traces right at the PIC to protect it from glitches on the power line or the ground line.
 

Dodgydave

Joined Jun 22, 2012
11,284
So if it de-latches when the gate/source is shorted out, the fet is being driven on by the pic.

How about a couple of flyback diodes 1N4001, one across the inverter drain to v+, and one across the fet D/S terminals, also i would drive the gate with a 10r to 1k resistor, and one across gate/source also.
 
Last edited:

shortbus

Joined Sep 30, 2009
10,045
also i would drive the gate with a 1 to 10k resistor, and one across gate/source also
I see more and more people saying to use a high value resistor like that on the gate drive. Won't that slow the turn on time of the gate? The G-S resistor can be that high since it's just a pull down. But most mosfet app notes say to use less than 100 ohms on the gate resistor, has this changed?
 

Dodgydave

Joined Jun 22, 2012
11,284
I still say its the pic that's causing it to latch on, he's proved it in post#10,


Just to prove a point, replace the transistor with a NPN and try that, or use a npn to put the fet on.
 

#12

Joined Nov 30, 2010
18,224
I see more and more people saying to use a high value resistor like that on the gate drive. Won't that slow the turn on time of the gate? The G-S resistor can be that high since it's just a pull down. But most mosfet app notes say to use less than 100 ohms on the gate resistor, has this changed?
You have to treat a mosfet gate like it's a capacitor. The time to charge and discharge are only a little different from the classic RC time constant circuit. Both turn-on and turn-off are using the same capacitor so, in theory, the gate drive current and the gate drain current should be designed as equal to each other. Now, about speed...this circuit is a LED shifter. It might work at 1 Hz. That is not a problem in speed optimization, but that's what the 100 ohm reference is about...speed.
 
Top