Using PWM to drive a MOSFET

chizom3

New Member
Hi guys i was wondering if it is possible to drive a power mosfet using the pwm pin on the PICAXE 20M2. Am designing a DC-DC converter, i dont know if is ok i use it?
 

DaveC166

Member
you havnt stated if u are using a P chan or N chan mosfet. Ive used a 20m2 PWM to drive a P chan mosfet via a gate driver transistor circuit. The PWM is set for 10Khz with a dutycycle resolution of 0.5%. This is for a 12V solar regulator.
Note the P Chan gate driver cct was borrowed from Silicon Chip magazine article 'MMPT Charger cct" of FEB 2011.
 

GallopingAlice

New Member
Yes you can. I've controlled a model train at 20kHz with a picaxe connected via a 100ohms or so to slow the edges, but I guess you'd want it as fast as poss. so connect direct.
I assume your mosfet sits on the 0v line with +v above and needs a plus to switch on, n chan if you will.
 

Circuit

Senior Member
Hi guys i was wondering if it is possible to drive a power mosfet using the pwm pin on the PICAXE 20M2. Am designing a DC-DC converter, i dont know if is ok i use it?
Read the manual; PICAXE Manual 3: page 8- "Standard Circuits 4 - The Power MOSFET Interfacing Circuit". So, yes, of course you can do this. The main thing is to choose the appropriate MOSFET for the job. You need a "logic level" MOSFET, of which there are a limited number if you are looking for through-hole pinned chips; the choice is much wider if you can handle surface-mounted devices. If you are using pwm then you need to take care to choose an appropriate frequency/duty-cycle that is matched to the characteristics of the MOSFET (in terms of on/off times) to ensure that you do not have a heat problem. Without more parameters it is difficult for anyone to help you further.
 

chizom3

New Member
Thanks guys. Am using n channel power MOSFET (IRF510) to build a positive Buck-Boost converter. Am just going to try it and see how it works.
 

macrobeak

New Member
Thanks guys. Am using n channel power MOSFET (IRF510) to build a positive Buck-Boost converter. Am just going to try it and see how it works.
In my experience a non-logic MOSFET will run hot and inefficiently.
There are posts on this forum giving advice on this topic.
For a IRF510 with PWM I would recommend driving it at power supply voltage through a transistor or using a TC4426/7 mosfet driver.
There are a lot of circuits and tutorials on the web to guide you.
 

John West

Senior Member
Thanks guys. Am using n channel power MOSFET (IRF510) to build a positive Buck-Boost converter. Am just going to try it and see how it works.
Just don't touch the MOSFET then, because driving the IRF510 with only 4 or 5 volts is going to make it real hot, real quick if you have any significant current through it at all. As was stated above, either use a logic-level gate drive MOSFET or use a driver circuit of some sort that will drive the MOSFET's gate with the appropriate turn-on voltage, which is closer to 10V than 5V.
 

neiltechspec

Senior Member
I'm driving a 200w car cooling fan with PWM on two IRL540's at 2Khz using a 14M2.

The MOSFET's don't even get warm.

Neil.
 

Dippy

Moderator
If your testing is unsuccessful then post your circuit schematic (including component values).
There's a big difference between a fast switcher and a relatively slow 2kHz PWM switching - especially if your MOSFET choice is less than ideal.
 

Goeytex

Senior Member
While the Picaxe PWM can certainly drive a power MOSFET , the IRF510 /Picaxe combination is an extremely poor choice for an SMPS. You will find it will run very hot if fail due to the heat. There are several reasons.

1. High "on resistance". At 540 milliohms with a 10V gate drive the IRF510 will get hot even with good driving driving parameters. It will be even worse with a 5V gate drive from a Picaxe

2. THE IRF 510 has a max gate threshold voltage of 4v. This is not a Logic Level FET. The threshold voltage is the voltage where the FET just beings to conduct, not the voltage where it operates ideally. This FET operates ideally with a 10V gate drive.

3. The Picaxe cannot enough peak current to turn this FET on quickly. While FETS are voltage controlled devices, they do have an input capacitance that needs to be overcome before turning on fully.

4. Generally speaking, a PICAXE cannot process the feedback signal fast enough for a stable control loop.
 

John West

Senior Member
Got it. Stating that the IRL510 was a far better choice would have made it much more clear. And unfortunately, the OP was planning on trying a non "L" part, and didn't seem aware of the difference. We needed to make the difference clear to him that that the single letter "L" in the designation means the device has entirely different drive characteristics, not that some MOSFET he isn't using will work.

Glad to see you remembered the forum is a polite place. :)
 

John West

Senior Member
And I actually don't know why. I asked what your commenting on the use of the "L" device had to do with the device the OP was trying to use. You explained to me what it was you were trying to tell him. I understood what you said and acknowledged that. Case closed.
 

tmfkam

Senior Member
While the Picaxe PWM can certainly drive a power MOSFET , the IRF510 /Picaxe combination is an extremely poor choice for an SMPS. You will find it will run very hot if fail due to the heat. There are several reasons.

1. High "on resistance". At 540 milliohms with a 10V gate drive the IRF510 will get hot even with good driving driving parameters. It will be even worse with a 5V gate drive from a Picaxe

2. THE IRF 510 has a max gate threshold voltage of 4v. This is not a Logic Level FET. The threshold voltage is the voltage where the FET just beings to conduct, not the voltage where it operates ideally. This FET operates ideally with a 10V gate drive.

3. The Picaxe cannot enough peak current to turn this FET on quickly. While FETS are voltage controlled devices, they do have an input capacitance that needs to be overcome before turning on fully.

4. Generally speaking, a PICAXE cannot process the feedback signal fast enough for a stable control loop.
I built a full SMPSU using a 14M2. Variable voltage output of 0-35V (from a DC in of 36V) at 8A. I found that the problem wasn't the speed of the response of the PicAxe, more that the steps in the PWM were too large leading to the voltage wandering up and down by a few 100mV as it changed the pulse width in an attempt to regulate the supply. If you are not attempting such a wide range of regulation, this might be less of a problem.

Rather than mosfets, I used IGBT's which I had no problems driving using the outputs of the 14M2. With a rather lossy inductor to test the theory, the circuit worked rather well, even loaded up to 5-6A though the inductor got very, very hot, as expected. Only when I fitted the 16A inductor did I spot the poor overall regulation. Was I ever disappointed! I ended up redesigning the circuit entirely to use a TL494 with the PicAxe(s) used as the voltmeter drivers and PSU logic controller. For Buck-Boost I'd be tempted to look at the LM5118.
 
Top