View previous topic :: View next topic |
Author |
Message |
crovex
Joined: 18 Apr 2007 Posts: 3
|
controling a MOSFET with PWM?? |
Posted: Wed Apr 18, 2007 7:58 am |
|
|
Hi all,
I'm currently trying to control a heating element using a MOSFET and tryiong to control the MOSFET using the PWM output on my PIC16F877. I have the PWM working properly or atleast thats what my multimeter tells me, but i'm unsure if the MOSFET is being opened/closed. Any suggustions dealing with this type of thing would be greatly appreciated, thanks.
Matt |
|
![](templates/subSilver/images/spacer.gif) |
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Wed Apr 18, 2007 8:47 am |
|
|
Is it a N-FET or a P-FET?
I would build a simple LED circuit.
Then test you can turn it on and off.
then try pwm to "dim" the led.
IRLZ24 spec
http://www.irf.com/product-info/datasheets/data/irlz24.pdf
Last edited by treitmey on Wed Apr 18, 2007 9:43 am; edited 1 time in total |
|
![](templates/subSilver/images/spacer.gif) |
Fabri
Joined: 22 Aug 2005 Posts: 275
|
|
Posted: Wed Apr 18, 2007 8:51 am |
|
|
Also depend from power supply the way to drive the mosfet.
I use TLP250 optocopler to drive IRFP250 mosfet.
Regards, |
|
![](templates/subSilver/images/spacer.gif) |
crovex
Joined: 18 Apr 2007 Posts: 3
|
|
Posted: Wed Apr 18, 2007 9:17 am |
|
|
It's a IRLZ24 product number, I believe its a N_Fet, but i'm not sure. The data sheets arent handy. as for power supply I was using a 12 volt powersource fromthe lab, not sure on the type. and the LED idea is pretty obvisous too bad I never thought it haha. thanks for all ur suggestions.,
Matt |
|
![](templates/subSilver/images/spacer.gif) |
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Wed Apr 18, 2007 9:55 am |
|
|
Trying to debug this kind of blind problems using a meter will be a pain.
To preserve your sanity, try to borrow one, but the use of a scope is a must.
Humberto |
|
![](templates/subSilver/images/spacer.gif) |
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Wed Apr 18, 2007 10:12 am |
|
|
That is a hefty MOSFET. What voltage and current are you running through it? What is your PWM frequency? Are you driving the gate directly from the PIC, or using some driver chip or transistor?
The threshold is as low as 1V so at high currents grounding is going to be crucial. Also with the transfer capacitance you will be driving several thousand pF of gate capacitance. You say you are unsure the MOSFET is being opened/closed. Is the heater getting hot? is the MOSFET getting hot?...Is the PIC getting hot? _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
![](templates/subSilver/images/spacer.gif) |
crovex
Joined: 18 Apr 2007 Posts: 3
|
|
Posted: Wed Apr 18, 2007 10:53 am |
|
|
i'm sending 12 volts from a power supply and operting the switch with a pwm frequency dependent on temperature. the mosfet itself did get hot at a few points and the heat sink on the pic also become hot to the touch at times. |
|
![](templates/subSilver/images/spacer.gif) |
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Wed Apr 18, 2007 1:03 pm |
|
|
If the FET is getting hot it indicates you are not switching it properly. For driving such a big FET I would use a driver like a MAX627. Read the MAX627 data sheet to see what it will do for you.
If the PIC is getting hot it implies something is REALLY wrong! The PIC should not need a heatsink. I would guess you are getting some sort of voltage spikes from the FET into the PIC causing problems.
1) First try dimming a LED as previously suggested.
2) Then add your FET and use it to drive the LED and make sure you can still dim the LED.
3) Finally put the heater back in and see if you can control that. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
![](templates/subSilver/images/spacer.gif) |
mikebroom Guest
|
Driving FET |
Posted: Thu Apr 19, 2007 12:47 am |
|
|
Is the FET in the high side, or the low side of the circuit. i currently drive IRFL640 FET using PWM at up to 24V an 5A without any problem in a low side switch configuration.
Low side switching is +V connected to device-negative of device connected to FET Drain, FET Source connected to 0V.
Include a 10R resistor to the FET from the PIC, and a 10-100k pull down resistor from the gate to 0v. Depending on your switching frequency also try using a 4R7 resistor in series with a 47pF capacitor from the FET Drain to 0v.
Connecting the FET in High side switching configuration (+V to FET Drain, FET Source to device +, device - to ground) can occasonally result in voltages appearing on the gate of the FET. These will be higher that the PIC 5v. Also in this configuration you will not be able to turn on the FET to full power without a driver, as you have to apply a higher gate voltage than you have on the Drain to swutch the FET full on. |
|
![](templates/subSilver/images/spacer.gif) |
|