Mosfet sensitive to touch? (Not static) - Page 1
Forum section: electronics / beginners

author: johm
author_rank: Contributor
timestamp: June 26, 2015, 12:49:03 pm
content: Good day,I have an issue with a 500ish Hz PWM signal coming out of pin PWM2 from a PIC12F1572 microcontroller. Despite being programmed to be constantly at 50% duty cycle I'm getting 31% and 1.4% intermittently (changes after few minutes). This output connects directly to the gate of an IRFR2905Z mosfet which in turn switches a stripe of 12V RGB LEDs (around 1A).However when I place my finger over the PWM pin the duty cycle changes to 50% as it should. What's happening? It's clearly some capacitive/floating effect. Maybe I need a pullup, is there sth wrong with the chosen mosfet? Please note that both grounds (signal 5V and power 12V) are tied together.Any insight will be appreciated.John

author: jlmoon
author_rank: Unknown
timestamp: June 26, 2015, 01:02:15 pm
content: Check that pin on pic chip making sure it isn't a open collector design. Have you tried a pull up to pic chip supply?

author: Skimask
author_rank: Super Contributor
timestamp: June 26, 2015, 01:12:59 pm
content: It's not, unless that pin has a blown output FET on either the high or low side.Datasheet, page 108. Try that.

author: johm
author_rank: Contributor
timestamp: June 26, 2015, 01:37:14 pm
content: I have that pin software configured to pushpull output, so it does not change at all when placing a 10k pullup. Changing it to open collector, the pullup works but showing the usual 31% DC, with some decay due to rc filter created at the gate.On the other side, page 108 of microchip's PIC12F1572 shows port slew rate and input level registers which are both set to zero and I do not understand why do they matter. Weak pullups are disabled too.

author: johm
author_rank: Contributor
timestamp: June 26, 2015, 01:43:06 pm
content: I don't think the output FETs are blown; it can drive 5V and 0V at 20 mA (tried with some LEDs).

author: Andy Watson
author_rank: Super Contributor
timestamp: June 26, 2015, 01:55:27 pm
content: It does not appear to be a logic level FET. At 5V gate drive there is a chance that the FET is still operating in its linear region - and therefore probably oscillating. By putting your finger on the gate you are damping down the oscillation. Try adding some extra resistance in series with the gate, 50-500 ohms.

author: johm
author_rank: Contributor
timestamp: June 26, 2015, 02:14:30 pm
content: I assumed it was a logic level FET because its threshold voltage was 2-4V. I DO have a 270ohm resistor in series with the gate, I've doubled it but the same happens.

author: Andy Watson
author_rank: Super Contributor
timestamp: June 26, 2015, 02:30:10 pm
content: Quote from: johm on June 26, 2015, 02:14:30 pmI always thought of the threshold voltage as the point at which things start to happen - the graph (Fig 3 - page 3) in IR's datasheet suggests that things are still happening when VGS is 5V.QuoteOh, that was best guessPerhaps you need to look at providing a higher level of gate drive?

author: fubar.gr
author_rank: Unknown
timestamp: June 26, 2015, 03:35:27 pm
content: Quote from: johm on June 26, 2015, 02:14:30 pmVgs(th) is the voltage where the mosfet just barely starts to conduct. A logic level mosfet would have a Vgs(th) at about 1-2 Volts or less.

author: PSR B1257
author_rank: Frequent Contributor
timestamp: June 26, 2015, 03:44:23 pm
content: QuoteDo not refere to this figure too much.Have a deeper look in the datasheet and you will find a parametric ID=f(VDS) graph, with the gate-source voltage as parameter.The IRFR2905Z have a graph for 4.5V*, so its fine to switch it with VGS=5V at ID=1AYou also find, that ID=2A is about the limit at VGS=5V if you want avoit a too high voltage drop across drain-source.*) note the drastic decrease in drain current at VGS=4.5VDo you measured your actually 5V supply? And more importend, the gate source voltage direcly at the MOSFET?Is the MOSFET any far away from the controller?P.S.: You can easily put a 1k resistor to the gate.

author: krish2487
author_rank: Frequent Contributor
timestamp: June 26, 2015, 04:32:42 pm
content: Why are we assuming that the FET is the reason??PICs are notorious for their RMW issues.The OP has mentioned about the PICs DC being constantly updated to 50%.I would assume that the reason for such erratic behavior is another port write or read happening on the PIC.

author: Seekonk
author_rank: Super Contributor
timestamp: June 26, 2015, 05:14:54 pm
content: Maybe software. Had that issue with another processor when I forgot to declare that pin an output. It went from on to floating and the gate capacitance kept the FET on for a while. It is actually a handy trick to use.