CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

How can I drive a mosfet like a transistor
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ghostmanzero



Joined: 01 Jan 2017
Posts: 12

View user's profile Send private message

How can I drive a mosfet like a transistor
PostPosted: Tue Mar 14, 2017 8:18 am     Reply with quote

I want to drive a mosfet like it is a transistor I mean I don't want to use a driver circuit (for instance the circuit with npn and pnp transistors ) is there any kind of mosfets that I can connect ( 0-5V. It will be a pwm signal ) mcu's pin to the gate pin of mosfet? I don't need something big. I have some Leds to use as load. I'll use a 12V- 6A adapter. I tried irfz44n but i measured only 2.5 V with 5V gate voltage . It was supposed to be 11v at least :/
newguy



Joined: 24 Jun 2004
Posts: 1899

View user's profile Send private message

PostPosted: Tue Mar 14, 2017 8:31 am     Reply with quote

There are literally thousands of MOSFETs that accept logic level gate voltages. Digi-Key, in particular, has a very easy to navigate parametric search.
temtronic



Joined: 01 Jul 2010
Posts: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Mar 14, 2017 8:42 am     Reply with quote

Logic level fets as stated easy to come by these days. Since you're doing PWM, be sure to check FETs max frequency to be compatible with whatever your PWM freq is.

Jay
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Tue Mar 14, 2017 8:50 am     Reply with quote

Try the IRL 640A
it saturates source to drain
at 200 milliohms or less with under 4 V Vgs

learn to read data sheets and you will do better designs
ghostmanzero



Joined: 01 Jan 2017
Posts: 12

View user's profile Send private message

PostPosted: Tue Mar 14, 2017 9:31 am     Reply with quote

You all are right Smile but I used the irfz44n with Pic16f628a once . It was working well. But it didn't work this time :/ I don't know why but it didn't. So I thought that I should take some advice.
Should I add a resistor between gate and drain? I saw too many schematics about driving a logic level mosfet. I don't know which one is right. Can anyone give a (tried) schematic?
temtronic



Joined: 01 Jul 2010
Posts: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Mar 14, 2017 12:20 pm     Reply with quote

An IRLF44N would work fine (L means Logic Level) though way overkill for LEDs...
I'm thinking it's good for 40 amps ?

Whatever you choose, be sure to account for power dissipation !
Often overlooked..project is fine on bench, stuff in box, 2 days later it catches on fire.....

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Tue Mar 14, 2017 12:46 pm     Reply with quote

There are several separate issues.

A FET gate on a power device may have a capacitance of many thousand's of pF. If this is connected to a driver that can deliver a lot of current, then momentarily large currents can flow. Potentially damaging the driving device.
A resistor limits this.

Then if the device can deliver good current, the switching speed of the FET output, may be faster than actually wanted. The resistor can be used to fractionally slow the switching. Particularly in one direction. This is why it is quite common to see a combination of a resistor, capacitor and diode, to control the actual speed that the voltage changes at the actual gate.

The PIC is not able to deliver enough current to run into the second problem, so it becomes a matter of limiting the current to below the 25mA that a PIC pin is rated to deliver. Assuming the gate is discharged, and the PIC switched to 4.5v, then simple R=V/I gives 180R as a a sensible resistor to prevent problems to the PIC.

Separately you have the problem of just whether the PIC can deliver what is needed for what you are trying. A simple PIC output can drive a FET on/off, provided the gate voltage needed can be delivered. So turning something on/off, no problem. However it can't drive it fast. Given the large capacitance of a gate. It's going to take several uSec to properly switch. No problem for a static switching operation, but a problem for a PWM....
This is why proper FET drive circuits can deliver relatively high currents, to charge and discharge the get quickly. The average current may be tiny, but most drivers can deliver over an amp momentarily.

I suspect you are trying to drive the PWM faster than a PIC can really handle without a driver....
temtronic



Joined: 01 Jul 2010
Posts: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Mar 14, 2017 8:23 pm     Reply with quote

Since he's driving LEDs he doesn't need a super fast PWM control signal. Anything around 50-60HZ does look 'on' to human eyes, at least to mine.

If it's just 1 led he can just tie directly to the PIC I/O pin with say a 47R to limit current. I know the ports are robust as I routinely tie a white LED to pins with no resistor. Yeah 'bad' but only for quick board testing, usually to confirm the pin is active.
Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Wed Mar 15, 2017 1:20 am     Reply with quote

I have a suspicion the mention of LED's, was as a 'test' load, not what he intends to finally drive. Potentially makes a large difference...

However it may simply be that he is setting the PWM up much faster than it needs to be.
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Wed Mar 15, 2017 5:53 am     Reply with quote

2N7000 with 3.3k resistor worked good for me.
_________________
CCS PCM 5.078 & CCS PCH 5.093
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Wed Mar 15, 2017 6:23 am     Reply with quote

There is a big difference here with a power MOSFET.

That he is talking about a power MOSFET, presumably implies he is intending to switch a lot more power later.
Power MOSFET's are internally like hundreds of smaller MOSFET's built 'in parallel'. Big downside of this is where a small MOSFET will have a gate capacitance of just a few pF, the loads of FET's in parallel, raise this to thousands or even tens of thousands of pF.
The 2N7000, has an input capacitance of only about 60pF. The sort of power FET he is talking about has perhaps 2000* this.
temtronic



Joined: 01 Jul 2010
Posts: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Mar 15, 2017 6:59 am     Reply with quote

The problem we have is not KNOWING what the OP has to control. A MOSFET that's good for 49 amps can turn on a heckuva lot of LEDs !

Without more information we're all guessing. It's be nice to find out what the real load is though. Heck for $30 I can buy a PWM controller good for 1500 Watts, 35 volts and ANY PIC can be used as the 'brains'.

Jay
ghostmanzero



Joined: 01 Jan 2017
Posts: 12

View user's profile Send private message

PostPosted: Wed Mar 15, 2017 7:12 am     Reply with quote

THANK YOU SO MUCH. YOU'RE GREAT PEOPLE. I FOUND THE PROBLEM.
I was trying to drive it by using the high side :/ I connected the source to GND. And I put the load between drain and +12V power supply. It did work! I can't believe that I missed that part Rolling Eyes
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Wed Mar 15, 2017 8:41 am     Reply with quote

Ugh....
temtronic



Joined: 01 Jul 2010
Posts: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Mar 15, 2017 9:34 am     Reply with quote

re: ugh..
I don't know whether to laugh or cry.
Still don't know what the huge load is though....
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group