Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
Tools
Old 7th November 2007, 11:50 AM   #1
Default PIC pin to MOSFET gate problem

Hello forum,

I'm working on a simple motor control using a PIC12F629 and 2 dual MOSFETs, a P-channel FDS6875 and a N-channel FDS6898AZ.

When I say "simple motor control" I mean full forward, stop and full reverse, no PWM is used. The controller is not speed critical, since it's for a small RC toy car with a small motor with a stall-current of 1,3A at 3,6V. The PIC is also running at 3,6V.

I have connected the MOSFETs in a H-bridge design, and have connected pull-up resistors on the P-channel gates, and pull-down resistors on the N-channel gates (56k).

The PIC is driving the gates directly.

The problem is, the PIC cannot drive the gates without a series resistor. This puzzles me. I know the gate is like a capacitor, and the PIC output current is max 25mA. But in other projects, a PIC10F206 is driving a SI2302DS MOSFET without problems.

Can some of you explain to me what my problem is?

Here is some links to the MOSFET datasheets if nessasary:

http://www.fairchildsemi.com/ds/FD/FDS6875.pdf
http://www.fairchildsemi.com/ds/FD/FDS6898AZ.pdf

Thanks.
Futterama is offline  
Old 7th November 2007, 12:16 PM   #2
Default

What actually DOES happen? My best guess with the information available is that the FETs are bursting into oscillation, and this is disrupting the program. A look with an oscilloscope would confirm this. The classic way of dealing with this problem is, strange to say, a resistor of 100 ohms or so in series with the gate, as close to the gate pin as possible. You could also try the effect of a 100n capacitor across the PIC's power pins. Both these things are often designed in as a matter of course.
spuffock is offline  
Old 7th November 2007, 12:35 PM   #3
Default

GP4 and GP5 is connected to the P-channel FET. GP0 and GP1 is connected to the N-channel FET.
At power-up the PIC pins are input, and the pull-up and pull-down resistors on the MOSFET gates keep the MOSFETs in a STOP condition.
In my program, I set the pins to the STOP state before making them outputs.

What happens is that the program is running, and all pins are doing their job, except the GP4 pin. It stays high, as in STOP state, even though the program sets the pin low.

Where should I connect the probe from the scope? I tried the misbehaving pin, but it just keeps it high state.
Futterama is offline  
Old 7th November 2007, 12:46 PM   #4
Default

Why not just use the series resistors?, I would consider it VERY poor design not to anyway.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 7th November 2007, 12:58 PM   #5
Default

Quote:
Originally Posted by Nigel Goodwin
Why not just use the series resistors?, I would consider it VERY poor design not to anyway.
Nigel, I will use the resitors, otherwise I would use a MOSFET driver. I'm just curious to know what is causing this misbehaving.

And why would you consider it poor design not to use the resistors?

By the way, I did try to put a 220nF close to the PIC, that didn't help...

Last edited by Futterama; 7th November 2007 at 01:05 PM.
Futterama is offline  
Old 7th November 2007, 01:19 PM   #6
Default

Quote:
Originally Posted by Futterama
And why would you consider it poor design not to use the resistors?
Because when the FET goes S/C it may well stick the full supply voltage directly on the output pin of the PIC - this means you have to replace the PIC as well as the duff FET's.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 7th November 2007, 01:27 PM   #7
Default

Thanks for the replies, I'll use a 100ohm resistor for these non-switching projects, and then I'll use a MOSFET driver (without any resistors I suppose?) for PWM projects.
Futterama is offline  
Old 8th November 2007, 06:31 PM   #8
Default

MOSFETs have a huge gate capacitance. Also it takes a large amount of charge to get the gate past its turn-on voltage. It is almost like an infinite capacitor, wth the voltage hardly changing for a while as current goes into the gate.

Because of that, the pin won't read high for a long time after the program has driven it high.

I would avoid all bsf or bcf operations on the port. That is because those commands read the port, modify one bit, and then write to the port. If one pin on the port is trying to go high, but is actually low, then doing a bsf/bcf on any pin on that port, will clear the pin that is being dragged low.

You need to write bits to a shadow register, then move that to the port.
Diver300 is online now  
Reply

Tags
gate, mosfet, pic, pin, problem

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
MOSFET Relay problem guilio_2000 General Electronics Chat 16 10th August 2004 05:33 PM
Problem Sinking Current 140mA through a Logic Gate weegee General Electronics Chat 3 18th April 2004 10:37 PM
higher current switching with MOSFET? evandude General Electronics Chat 10 29th January 2004 08:05 PM
MOSFET problem need help..!! TKS General Electronics Chat 25 6th November 2003 11:23 PM
NAND Gate problem... dark_vision General Electronics Chat 7 7th July 2003 08:12 AM



All times are GMT. The time now is 07:55 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker