Noob Question on N Channel Mosfet

mproia

Member
Hello,

I am looking to power a pump, 9-12V DC at 1200mA. I want to use an N channel MOSFET to do the switching from my picaxe. Does anymore have a suggestion on a particular MOSFET I could use for this application?

Thanks!
 

mproia

Member
Thanks for the info. If I wanted to go in the reverse direction, meaning have a device on constantly then shut it off with the picaxe would I just use the same type of MOSFET but a P Channel instead?
 

Dippy

Moderator
Best you sketch out what you mean and post it.

A MOSFET 'switch' can be used on the high side (supply side) or on the low side (ground route from pump). Generally P type for high side and N type for low side, pref logic-level for the latter for ease.
The 'ideal' choice depends on what you want to achieve, but (nearly) any old cheapie should be able to do it.

But a drawing by you will take out a lot of guesswork and questions ;)
 

eclectic

Moderator
@mproia

Do you have access to a scanner or a good digital camera?

Draw out your circuit, the old-fashioned way,
then post it here as a .jpg

e
 

lbenson

Senior Member
Among others, ExpressPCB has free PCB and schematic software. After struggling with the free Eagle software, I found ExpressPCB to work much more in the way a Windows user would expect it to. But they do want to try to tie you to their own board making (a decent deal in my experience) if you carry it that far. DIPTrace has gotten good reviews here, and Mycroft2152 has provided a PICAXE library.
 
Last edited:

jglenn

Senior Member
***Thanks for the info. If I wanted to go in the reverse direction, meaning have a device on constantly then shut it off with the picaxe would I just use the same type of MOSFET but a P Channel instead?***

This is a little confusing. If you want to do motor reversing, it has to be a PM motor, not series wound. With one 12V supply, you need a bridge (4 transistors, usually 2 N and 2 P channel.). Or a DPDT relay can be used for reversing the polarity to the motor. You would still use an N ch fet for on/off control. The N ch is referenced to ground, like the PICAXE. Using P ch fets in the supply side makes driving a little harder, usually an npn can do it.

But if you just want to turn the motor on and off, a single N ch is all you need. Put a diode across the motor, cathode towards the supply, a 1N4004 is good.
 

mproia

Member
jglenn,

just to clarify "reverse direction", I don't want to reverse the direction of the pump. By reverse direction I mean instead of having the pump off all the time then have the picaxe turn it on I will have another pump (airpump to be exact) turned on all the time and I want the picaxe to be able to turn it off on command by using a p channel mosfet. Sorry for the confusion! :p
 

premelec

Senior Member
Am I missing something or can't you just do that with the control logic? - 0,1 being on or off control to MOSFET - no need to use a different polarity of MOSFET - unless you want to...
 

jglenn

Senior Member
Yes, the N ch turns both on and off. P ch are used for "sourcing" a B+. N ch provide a ground when you turn them on. It is a good idea to use a gate pulldown resistor, even 100K. I had a problem with pics once, where there was a time delay until the output registers went from input to output, something blew up due to it.
 

moxhamj

New Member
"On all the time and send a signal to turn it off". Well, the simplest thing would be to use the same N channel mosfet and keep it on all the time and turn the gate low when you want to turn it off. That is just a coding issue. The picaxe will draw 3mA and the mosfet virtually nothing so power consumption should not be an issue.

Ah - but what if you want it to be on but there is no power to be had? I'm not sure about that scenario as there would be power that is powering the motor. But if indeed that is what you want then there are circuits using P channel mosfets. I'm not sure how much it helps given the power consumed by a picaxe is so tiny compared with the power drawn by the pump.

Then there is the good old relay circuit. Use a standard SPDT relay, and if you wire it the standard way it will turn on when energise, but if you wire to the NC connector it will be on when no current is in the coil and off when there is current on the coil.

So it very much depends on whether you are ok about the tiny current draw of these circuits when they are running. Personally, I'd look at the ratio of 1200 vs 3mA and use a standard N channel mosfet and just have the gate high most of the time.
 

mproia

Member
Thanks DR_Acula,

I like the idea of the N channel on all the time and then turning it off, low state, when needed. I will be powering the chip and the pumps from the same source, a 12 Volt Wall wart, with regulators 5V for the picaxe and a variable regulator set for 9 volt output for the pump. If the power goes then it all shuts down anyways. :D
 

Dippy

Moderator
This looks pretty simple.
Take a look the circuit picture in Manual 3 , bottom of page 7.
The MOSFET example.

Note the comment in the text above it re: 100K resistor.
(THey really should have included a dotted resistor in the picture as I bet only a few people actually bother reading).

"Pin" means a PICAXE out pin (or a pin configurable as 'output').
Personally, and esp for breadboarding, I'd have a smallish res (1k0 to 10k) in that line to prevent accidents.
 

mproia

Member
Dippy,

What do you mean by dotted resistor?

Also does anyone think I should look into a power MOSFET driver IC to do the task of switching the pumps off and on instead off just a MOSFET? :confused:

Thanks
 

Dippy

Moderator
Re; dotted resistor.
I was just making a comment on the little circuit drawing on that page.
Sometimes, in Data Sheets, the author puts in an 'option' or 'suggested option' for an additional component with dotted lines - just to show that it is an option and that it migth be a good idea to read any notes.
It's not some jargon fro anything fancy - it just makes reading easier.
Most people look at pictures, copy the circuit, but fail to read ;) (Including me).
I merely commented upon it as the resistor gets a mention in the text directly above the sketch.
Did you read it?

MOSFET Driver?
If you aren't doing really fast switching or PWM then I'd say that there was no need for it.
For your app I would have thought that an N channel MOSFET (logic level) would be fine for 'low-sided' switching i.e. between pump and ground.

If you are doing 'high-sided' switching with a P chan MOSFET i.e. between +Vpower and pump you may also need something simple like a transistor to pevent >5V getting to PICAXE output pin.

I'm not sure what you have decided upon. Either way is dead easy, but low-sided uses less components and is cheaper.

How's your electronics knowledge/experience?
 

mproia

Member
Hi Dippy,

I am a newbie in regards to this stuff so I appreciate everyones efforts to help me out. Also what is PWM? My newbieness is showing through. :p
 

Dippy

Moderator
Pulse Width Modulation. Commonly used for motor control, light dimming, loadsa stuff.

Check it out in the BASIC manual.

You don't need PWM to switch a pump on and off. All you probably need is a logic level MOSFET. I only mentioned it as an aside to explain why you DON'T need a MOSFET driver chip for your project - probably.
 

BeanieBots

Moderator
As this thread contains the word MOSFET several times, I'll just stick this in which YOU can ignore but incase somebody stumbles across it.

If you use PWM, you NEED to use a DRIVER.
 

leftyretro

New Member
As this thread contains the word MOSFET several times, I'll just stick this in which YOU can ignore but incase somebody stumbles across it.

If you use PWM, you NEED to use a DRIVER.
Good addition, however:

Citation required, examples would be helpful, as well as the theory behind the statement. Don't leave the inexperienced hanging. ;)

Lefty
 

BeanieBots

Moderator
Good addition, however:

Citation required, examples would be helpful, as well as the theory behind the statement. Don't leave the inexperienced hanging. ;)

Lefty
OK, this is a little daunting for the faint hearted but it's all there including methods of driving and why.

http://www.national.com/an/AN/AN-558.pdf

This is a little more wordy but also very informative.
http://www.zetex.com/3.0/appnotes/apps/an18.pdf

Put VERY simply.
The on resistance is a function of the gate voltage.
If the gate is not driven to the correct voltage, it will have a high resistance and get hot.
The gate has a large capacitance. It requires a high current (for a very short time) to charge or discharge. That takes time if the driver cannot supply a large current. During the transition from on to off and vice-versa, the FET conducts in linear mode and dissipates LARGE amounts of power. The amount of power dissipated increases with switching frequency.

Another good article:-
http://homepages.which.net/~paul.hills/SpeedControl/Mosfets.html
 
Last edited:

MartinM57

Moderator
If you use PWM, you NEED to use a DRIVER.
Even when using a new-fangled logic level MOSFET driving a purely resistive load?

Genuine question....prior to posting some pics of some bad ringing on a PICAXE PWM out pin when connecting a resistive load (foam cutting wire) to a STP36NF06L (Rapid 47-055) power MOSFET, when with no load the PWM output pin is completely square-edged
 

BeanieBots

Moderator
Please post the pics.
Ringing can ONLY occur when there is reactance in the circuit. The energy needs somewhere to be stored and then traverse to and fro like a pendulum.
The most common (undesired) reactance is inductive on account that ANY piece of wire has inductance.

If you are seeing ringing on the PICAXE PWM signal AND you are using a FET driver, then it only be caused by very poor layout. Even the FET capacitance between source/gate & drain/gate could not account for that with a driver between PWM signal and gate.

If possible, please also post pics of the ACTUAL layout as well as schematic.
I suspect it's not actually ringing but some form of supply collapse.
 

premelec

Senior Member
On slow speed occasional switching - no problem - you do need a gate capacitance dischange path - say you have a 10K R gate to drain and gate capacitance is 2nF then RC = 20uSec - to prevent ringing in leads you might want to put in a series R to gate so it'll turn on slower - note that DURING turn on and off large power dissipation in the MOSFET can occur - look at the data sheet - and calculate the maximum power during your transition of on to off. It's when you have many transistions at high speeds that things usually get dicey.

Sometimes it pays to only modulate part of the power to your resistive load - keep some current below what you are aiming for through the wire and add PWM current to that - that unloads the MOSFET requirements some...

What pictures of ringing? :) we do like pictures... smoking foam... hot wires yes!

How much current are you siwtching?
 

MartinM57

Moderator
No FET driver
No R between PICAXE output and MOSFET

Resistance of cutting wire ~0.9 ohm
Wire supply voltage 12v

mark:space ratio of PWM about 1:12. Frequency 3.9Khz

Ringing lasts for about 5% of the "space"

Power supply output current meter (obviously averaging somehow) steady at about 750mA

Power supply rating is 30v at 5A (not a TTI I'm afraid - Rapid 85-1704) - maybe that is the problem in that I'm trying to take ~13A from it instantaneously? But surely it's got enough capacitance to do that?

Pics will take a few days to get, for various reasons...

PS cuts foam extremely well - like a very hot knife through warm butter :)
 

evanh

Senior Member
What you are seeing is the load ringing backfed through the capacitive coupling of the mosfet. I always add a series resistor to the mosfet gate and also a clamping zenor/transorb to the mosfet gate.

The advice about using a driver when PWM'ing is good. The mosfet heating climbs as the ratio between transitioning and non-transitioning climbs. The less time the mosfet is spending in transition the better. However, the steeper that slope is the bigger the above ringing is also.

So, at low frequencies a Picaxe is a viable driver.
 

BeanieBots

Moderator
Agree with evanh. More likely to be feedback from internal FET capacitance if there's no driver AND no resistor. Could destroy the PICAXE if too high and will cause excess heating in the FET.
You will certainly be putting a lot of strain on the PSU output caps. Don't know that particular supply but many (quality ones) have very fast current limits. Worth putting a 'scope close to the supply output to see if it is collapsing.

It IS possible to drive FETs direct from a (standard) PWM output (via resistor) but only at moderate power levels and with care. (depends a lot on the FET used).
http://www.picaxeforum.co.uk/showthread.php?t=10986
 
Last edited:
Top