picaxe to mosfet

lbenson

Senior Member
I'm trying to compare the usefulness with the picaxe of two MOSFETs, IRFZ44N and IRFL44N. The IRFZ44N is available from Jameco for $.61US; the IRFL44N is available from phanderson.com for $1.75US, and a note says, ""May be directly interfaced with PICAXE logic levels". I'm expecting to use PWM to drive 12
volts to LED lamps with a total draw of no more than 15 watts.

Datasheets are at: http://www.irf.com/product-info/datasheets/data/irlz44n.pdf
and http://www.irf.com/product-info/datasheets/data/irfz44n.pdf

In trying to determine what would make the "L" part preferable to the "F" part, I've looked at the datasheets, without entirely knowing what to look for. The
Drain Source Voltage, Drain Current, and Total Power Dissipation all seem to me close enough not to make a difference for my use. RDS(on) for the "F" part is
.0175 ohms, and for the "L" part is .022 ohms.

The "Power MOSFET Interfacing Circuit" in manual 3 shows no resister between the
picaxe and an IRF530. So how does one determine if a MOSFET can be directly driven by a picaxe, and is a resister desirable, and if so, what value?

These posts to a prior tread address general mosfet use without resolving the question of whether a series resistor is desirable between picaxe and mosfet, and what value.

inglewoodpete Posted - 23 October 2006 1:32
--------------------------------------------------------------------------------
"A resistor on the gate of a FET is of no real benefit. The impedance (input resistance) of the gate of a FET is very high (often mega ohms, even Tera ohms), so no current is going to flow."

[I assume he means a series resistor between the picaxe and the mosfet gate pin.]

premelec Posted - 23 October 2006 4:4
--------------------------------------------------------------------------------
"MOSFET gate resistance is indeed high however there is gate capacitance which is high when the MOSFET Rds ON is low... so sometimes to limit instantaneous
pulse current to gate [from PICAXE...] you would use a series R. This also lowers the rise time of the turn on which is or is not desirable depending on what you are doing... "

greencardigan Posted - 22 November 2006 0:10
--------------------------------------------------------------------------------
Can you give me an idea of a suitable resistor value [to connect a BUZ71 mosfet]? I'm switching 12v @ 1.75A.

premelec Posted - 22 November 2006 5:27
--------------------------------------------------------------------------------
If you can deal with a slightly delayed on and off time 1000 ohms should be fine limiting the 5 v peak current to 5ma. …
Don't forget to put a reverse diode across any inductive load and if you are worried about drain-gate short you could put a zener diode from gate to source [5v] and fuse etc... there are a variety of ways to protect the PICAXE from harm... [20K resistor drive would be easy..].

evanh Posted - 22 November 2006 11:36
--------------------------------------------------------------------------------
1: BUZ71 does not have logic level gate threshold. You'll prolly be okay at 2 Amps but be warned you are not turning the mosfet on very hard.

2: The series resistor is to protect the driver (Picaxe) in normal operation. In addition you also need a 5v1 zenor/tranzorb across the Gate-Source pins of the mosfet. As premelec has said the Gate is a capacitor and it is effective to both the Drain and Source so any sharp transitions on either are reflected straight back into the Gate.




 

Michael 2727

Senior Member
If you use this config you pretty much can't go wrong.
For p-ch MOSFETs swing the ground resistor to up +POS.


<code><pre><font size=2 face='Courier'> o +POS
|
|
o o----.
| Back EMF
LOAD - Protection
^ Diode.
| If needed.
10K D o o----'
to |
47K ||-+ N-ch
Input ___ G ||&lt;- MOSFET
o-------o-|___|-----||-+
| |
.-. S |
| | 100K |
| | to |
'-' 1M |
| |
| |
o 0V -NEG o


(created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de) </font></pre></code>




Edited by - Michael 2727 on 17/03/2007 22:33:35
 

lbenson

Senior Member
Thanks for the circuit. Considering the post quoted from premelec--&quot;If you can deal with a slightly delayed on and off time 1000 ohms should be fine&quot;, what kind of delay would the 10K introduce in my PWM (using the duty cycle to control the dimming of 12-volt LED lamps--up to 8 watts)?
 

Dippy

Moderator
Michael's circuit is fine for general purpose use, but my findings (with power MOSFETs) is to have a much lower res for microsecond switching times; perhaps 220R/470R. Capacitance and all that. Some experimentation based on the given circuit will be very educational... and reading device Data Sheets is a must-do.

Also (to reduce ambiguity) his connection marked 'input' strictly means input to FET/MOSFET and is connected to the output of the PICAXE.

Whether or not to have a resistor is a moot point. For PICAXE-health and wallet-health a resistor is a good idea.

For circuits where MOSFET is controlling a higher voltage and/or P-Chan for high sided switching an extra tranny is sometimes necessary.
 

lbenson

Senior Member
Dippy--thanks for the clarification regarding series resistor size, picaxe to MOSFET gate.

When you say &quot;For circuits where MOSFET is controlling a higher voltage ... and extra tranny is sometimes necessary&quot;, would you include 12 volts at less than one amp? I'm thinking that you would not, but would appreciate guidance.

How about the 5.1V zener, source to gate, pointy-end toward picaxe?

I appreciate your regular advice about reading the datasheets--it can be hard for the inexperienced to understand what they need to be looking at. In particular, with my question of the IRFZ44N versus the IRFL44N, is there a reason to think that one is more appropriate for picaxe use than the other, and what data item would give me the clue about this?



Edited by - lbenson on 18/03/2007 18:04:46
 

Dippy

Moderator
Sorry, my wording was clumsy. What I meant was that if, for example, you were using a P-Chan MOSFET as a high sided switch from a 12V source, you would typically use an NPN (for cheapness) emitter-ground to make the gate go low to switch it on, as you would have a resistor from Gate to 12V to switch it off. As you don't want 12V at the PIC pin.
Oh blimey that sounds even worse and I can't do that 'orrible ASCII Art. I'm sure a clever person can draw it.

PS. Sorry, just read your last para.
I could only find data sheets on IRLZ44NS/L (logic level) at Digicom. Compared to 'standard' IRFZ44N.
Standard type &gt; <A href='http://www.quasarelectronics.com/ds/irfz44n.pdf' Target=_Blank>External Web Link</a>
'Logic' Level &gt; <A href='http://www.irf.com/product-info/datasheets/data/irlz44ns.pdf' Target=_Blank>External Web Link</a>

Compare the Gate Threshold values. These are the voltages you need at the Gate to switch it ON.
For the logic level optimised this is 1.0 to 2.0V. For the normal this is 2.0 to 4.0V.
Also, see how the turn-on-off times are affected by Gate voltages. See the difference between the two types. This sort of thing is generally the same between all standard and logic-level types, give or take a bit.

And just think, now you've read the data sheets you may not need Michael's protection diode after all...

Edited by - Dippy on 18/03/2007 19:34:08
 

lbenson

Senior Member
Thank you--Gate Threshold Value of 2-4V for the Standard type (IRFZ44N) versus 1-2V for the logic level (IRLZ44N)--and 250uA for both.

But ... since (I thought) the picaxe sources 5 volts at up to 25mA (depending on the supply voltage--mine is 4.5V), what practical difference would I see between the chips (considering that the difference in turn-on/off times is not significant to me). Is it that the logic level part would be suitable for a picaxe running at, say, 3.3 volts?

And also, pardon my density, regarding the data sheet perhaps telling me that the protection diode (between source and gate) is not needed, I know that some later parts, not necessarily MOSFETs, have been designed with protection diodes built in to counter previous failure modes--what would I look at in the data sheet to determine that this had been done or that otherwise the 5.1V zener protection diode was unnecessary?
 

premelec

Senior Member
Note that the input gate capacitance is about 3.3 nF so if you have a 10k drive r the time constant [r x c] is about 1^4 x 3.3^-9 = 33 microseconds - to turn on AND off if you drive the input of the 10k to zero. Probably not bad depending....
 

Michael 2727

Senior Member
Dippy, lowering the resistor values for high frequency apps would probably
be a better idea.
I don't know if I would go as low as 220 Ohms from the picaxe output to MOSFET Gate.
5V / 220 R = 22.7 mA current if a MOSFET short circuit were to occur.
5V / 470 R = 10.6 mA current if a MOSFET short circuit were to occur.

I would probably use 470 R to 1K as a minimum at 5V, a little
safety buffer never goes astray.
Also remembering that many applications will be using 12V or 24V as
the load driver voltage, maybe even more. So the Gate driver resistor
would need to be upgraded accordingly e.g. 2K2 or 4K7 Ohms.

I also had a play with the 1M Gate discharge resistor, I reduced it
to 47K and did get much better results at very High and Low PWM duty.

<b>Originally I thought @ 4KHz PWM,,, Ahhh !, piece of cake. </b>

After further procrastination -
e.g. 4 KHz at 1% and 2% duty pulses.
Using a PWMOUT frequency of 4KHz and at 1% duty you get
a very narrow pulse which would equate to a very high equivalent frequency.
With a PWMOUT of 16KHz and at 1% duty you would be pushing the limits
even for a power MOSFET it would be quite fast.

I need to download some calculators for this I think.

Maybe Fowck could make an addition to the PWMOUT calculator, ~ ;o)

By the way the 3A 1N5408 Doide I used gets
warm at 25% to 35% duty, not much at other
Duty ranges, so it does work, I would still
include them into the design.
 

Dippy

Moderator
Yes, I take your point about fail safe protection.

I've just looked at an old circuit I did where I needed 10uS 1Amp pulses @10%D/C and I've just used a 220R onto gate. I didn't bother with your 'Gate discharge resistor' as the gate discharges far quicker through 220R when PIC O/P goes low. Though obv during startup that resistor may be handy for protection to prevent FET going ON if output is sensitive.

On an even older circuit where I needed 10uS @ 3Amp I buffered the O/P with an NPN. That was pre-PICAXE when I was stuck with expensive Stamp aargh.

All I'll say, is that there are variations on the basic circuit theme to suit special needs. I hate to say 'Horses For Courses' again but its true. This is where people need to gain knowledge/experience and not just use the same old circuit for everything. SAdly that takes time and the patience to read and understand.

And, generally speaking, when people start 'pushing' deigns a bit there is NO AVOIDING proper expensive test equipment (unless they plan to spend their whole lives using other people's work).
 

Michael 2727

Senior Member
Forgot to mention, I was using -

12V DC supply rated at 10A.
(Transformer, Bridge Rectifier, Capacitor config)
IRF540 n-ch MOSFET, 28A from memory.
Driving 2 x automotive windshield wiper motors at once.
 

Dippy

Moderator
Ibenson, I was merely saying that a diode was built-in and implying that if space were tight it may (repeat may) not be needed. Personally I'd bung one in for pwming a motor. I'd also do a lot of pwm freq testing too.

I was just saying that all the parametric info is in a data sheet (usually), BUT what is NOT in a Data Sheet is whether it is SPECIFICALY SUITABLE for YOUR project. And you may want to add bits to play safe.

Many Data Sheets give example test circuits which you can base your design upon. But getting it exactly right is down to you.

This is where you + Data Sheet + Test Equipment (or other people's experience) come into play.

Reading a Data Sheet should allow you to dismiss 99% of devices as unsuitable. But the bottom line is selecting and testing what seems most suitable. Sometimes this means knocking those moths from your wallet.

Finally, whatever you decide upon, record your findings either as a CAD schematic with notes or an old-fashioned pen in your electronics 'Grimoire'.
 

lbenson

Senior Member
Thanks, premelec, Michael, Dippy--this has been very informative for me. All goes into my project Grimoire. I know solutions cannot be &quot;one size fits all&quot;, and tapping into the experience on this forum gives one an idea of the range.
 

lbenson

Senior Member
To bring closure on my original question, is it correct to say that it would be appropriate to connect the &quot;logic level&quot; mosfet, IRLZ44N (through a series resistor as recommended above) to a picaxe running at either 3.3 volts or, say, 4.5 volts, but the &quot;standard&quot; mosfet, IRFZ44N, could only connect to the picaxe with (an approximately) 4.5 volt or higher supply, and this, for picaxe use, is the most significant difference between the two?


Edited by - lbenson on 19/03/2007 19:07:12
 

Michael 2727

Senior Member
Basically Yes.
They are both guaranteed to turn on at under
4.0V. You may even get lucky with the IRFZ44N
turning on at 3.0V, says 2.0V min sometimes.

For me, I'd be buying 3 x IRFZ44Ns and just
using 4.5V to 5.0V picaxe supply.
Put 2 in the drawer for other projects.

You never said what voltage your LEDs/LED Module was ?
A current limiting resistor will be needed if they are not designed for 12V.

Try a 1K Gate resistor.
10K to 47K ground resistor, can't hurt.
Diode not really needed, as LEDs are not inductive.
And you may even get away without a heatsink,
if the MOSFET gets above warm add one.
 

lbenson

Senior Member
The 12-volt bayonet-style LED lamps I used I got here: <A href='http://www.batteryspace.com/index.asp?PageAction=VIEWPROD&amp;ProdID=3091' Target=_Blank>External Web Link</a>

The people at that site do not know the lumin output of the lamps.

I made my fixtures from lampholders I got on the web and metal dome-shaped ceiling outlet box covers from Home Depot.

Here are pictures.

<A href='http://i11.tinypic.com/4cneamp.jpg' Target=_Blank>External Web Link</a> -- fixture board: 5 fixtures with 1, 2, 3, 4, and 5 led lamps each for testing, mounted on a cherry wood board.
<A href='http://i10.tinypic.com/2dsnz2c.jpg' Target=_Blank>External Web Link</a> -- 12-volt light control board, 08M and 4 relays, mosfet not yet mounted
<A href='http://i9.tinypic.com/2dt841z.jpg' Target=_Blank>External Web Link</a> -- 12-volt lights in action, controlled by IR or serial from PC
<A href='http://i5.tinypic.com/4d4y71h.jpg' Target=_Blank>External Web Link</a> -- my desk, oh the shame, 12 bulbs lit, 8 watts

Thanks to all on the forum who helped from my state of ignorance of picaxes starting in December, and near-ignorance of electronics components.

With all the lights lit it draws 8 watts according to my KillAWatt meter.


Edited by - lbenson on 20/03/2007 01:46:47
 
Top