Shop OBEX P1 Docs P2 Docs Learn Events
MOSFETs and the Propeller — Parallax Forums

MOSFETs and the Propeller

idbruceidbruce Posts: 6,197
edited 2015-03-13 10:01 in Propeller 1
Hello Everyone

I am starting this thread to gather information pertaining to the control of MOSFETs by the Propeller chip. Feel free to add any information that you may feel is helpful, however I am specifically looking for detailed information, such as schematics, part numbers, resistors and transitors used, etc... Additonally items such as:
  • MOSFETs that can be directly triggered by the Propeller chip
  • Circuts that handle large loads
  • Circuits to push small loads
  • Anything useful pertaining to MOSFETs and the Propeller
  • And absolutely any information about powering inductive loads from MOSFETs
Give as much detail as possible, and please include working schematics, part numbers, and working values if possible.

I am hoping this will become a nice thread pertaining to MOSFETs that will become an asset to newcomers and old timers alike. Considering my lack of expertise is this area, I personally have nothing to post, but I look forward to lots of input.

I thank you all in advance for sharing your knowledge and any input that you may provide.

Bruce
«13

Comments

  • ErlendErlend Posts: 612
    edited 2012-01-04 03:48
    Hi,

    In my mind this is very simple. I've connected several MOSFETs to my Propeller directly:
    1) Choose a MOSFET which is rated for the current needed. It has three pins; Source, Gate, and Drain. Think of it as a switch between the Source and Drain pins. The Gate is a high impedance input which acts the switch to close when voltage is applied. It draws virtually no current.
    2) Connect the Drain to Gnd
    3) Connect a resistor between Gate and Gnd - value not important - from 10k to hundreds k will do. This is to prevent the Gate to float and act as an antenna.
    4) Connect the Propeller pin to the Gate - if you want to be short-circuit-careful use a 1k'ish resitor in series
    5) If the load to be driven is inductive (eg. a relay, motor, etc) connect a fast high voltage diode (>100V) across the load in reverse of the voltage that drives the load
    6) Connect the load between +V and the Source pin of the MOSFET

    here you go
  • LeonLeon Posts: 7,620
    edited 2012-01-04 03:54
    I'm on the NXP mailing list, and got a notification the other day about an interesting new logic level MOSFET:

    http://www.nxp.com/products/mosfets/automotive_mosfets/BUK9Y19-75B.html

    Looking at the characteristics, it should work OK with the Propeller for controlling large loads.
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-01-04 06:24
    2) Connect the Drain to Gnd
    Actually one should connect the Source to Gnd
    And the Drain to the load.

    Duane
  • sylvie369sylvie369 Posts: 1,622
    edited 2012-01-04 07:09
    Actually one should connect the Source to Gnd
    And the Drain to the load.

    For those of us who know nothing about this, can you explain why?
  • Mike GreenMike Green Posts: 23,101
    edited 2012-01-04 07:23
    Although the symbol for an MOSFET looks symmetric as far as source and drain are concerned, that's not how it's actually made. There can also be a parasitic diode between source and drain that's often used as a snubber diode when controlling inductive loads like a relay or motor and this is an asymmetric feature.
  • ReinhardReinhard Posts: 489
    edited 2012-01-04 07:29
    Hello,

    this should be a good entry point

    http://en.wikipedia.org/wiki/MOSFET


    from here are many references and links for further info ...

    @ there is also an explanation about the difference between nmos / pmos

    best regards

    Reinhard
  • train nuttrain nut Posts: 70
    edited 2012-01-04 08:08
    Controlling a high side N Channel Mosfet from Prop or other logic devices would be nice to have several methods to handle. I am currently working on a train control project that this would be handy to have. Any Ideas?

    Ben
  • RaymanRayman Posts: 14,652
    edited 2012-01-04 08:21
    I don't think mosfets can be hooked up backwards. Problem is that the source is connected to the substrate, so putting the voltage on backwards would short the thing out...

    I think JFETs can be used backwards though.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2012-01-04 08:35
    I've used the IRF3708 mosfet for lots of things:
    http://search.digikey.com/us/en/products/IRF3708PBF/IRF3708PBF-ND/811850

    For lots of applications, you can drive it directly with a Prop.

    The only thing I don't like about it is that its metal tab is electrically hot, but I'm told that's normal.
  • RaymanRayman Posts: 14,652
    edited 2012-01-04 08:38
    train nut wrote: »
    Controlling a high side N Channel Mosfet from Prop or other logic devices would be nice to have several methods to handle. I am currently working on a train control project that this would be handy to have. Any Ideas?

    I think it's a lot easier to use a P Channel on the high side. You can then just drive it with an NPN transistor from a Prop pin.
  • edited 2012-01-04 08:50
    The mosfet must be able to withstand the voltage between Drain and Source terminals (ie when it is in the off state).

    Note what Mike G said about the 'body diode', remember that voltage spikes caused by inductive loads can cause the mosfet to go into 'avalanche' conduction so you may need protection.

    Select a low RDSon type as the power wasted by a mosfet (in the on state) = RDSon x ID x ID. Many Mosfets quote their RDSon with the Gate at 10 V ('standard level') or 5 V ('logic level') but for driving from the Propeller look what the RDSon is with the Gate at about 3.0 V.

    For high-speed circuits capacitance is important.

    See what your favorite distributor has to offer, you should find plenty to choose from. Package is very important, especially if you are switching high currents, the NXP type Leon mentioned is an advanced 'Power SO8' package called LF-PAK.
  • JonnyMacJonnyMac Posts: 9,105
    edited 2012-01-04 09:27
    I'm leery about driving a MOSFET directly from a Propeller pin so I use the attached circuit. This is being used in a DMX lighting fixture that has 1500 units (and counting) deployed. The MOSFET controls a 33V, 3A supply into a specialty LED. The TC4427 is a nifty little push-pull voltage translator that will take the logic input from the Propeller and switch from 5 to 18V on its outputs. For very light loads the TC4427 can be used as a half-bridge as it uses MOSFET outputs.
    672 x 315 - 49K
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-01-04 10:05
    Hear are some driver circuits:

    PropDrivers01.gif


    BTW, generally the "Body Diode" in the MOSFET can't be used as a snubber diode on an inductive loaded circuit.
    The snubber diode is a separate diode connected across the load. See the circuit.

    I very much like using:
    RFP30N06 and IRF3708 power MOSFETs.
    And the 2N7000 low power MOSFET for level shifting ans signalling applications.

    There is another, the STD50NH02L which is in a small TO-251 package. However, I have not fully tested these yet so will comment on them later.
    (Ok, I tested it and have an Ron vs. Vgs graph.)

    One must note that any of these MOSFETs will not operate at their full current capabilities because the Prop only delivers 3.3V to the gate. Generally this is less than the optimum drive voltage. However, 3.3V is well above the minimum Vgth gate threshold voltage.

    Lastly, I know of no MOSFETs that don't have "Intrinsic Body Diodes" in their structure. I suppose they can be made but they would not be what would be called normal.

    Duane
    743 x 386 - 7K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-01-04 10:14
    I'm with Jon on using a MOSFET driver at fast switching rates, such as you'd encounter in a PWM situation. It has two advantages:
    1. The gate drive voltage can be much higher than you get with a logic output, so the MOSFET -- even a so-called "logic MOSFET" -- will switch on more fully.

    2. The drivers are designed to switch high-capacitance loads very quickly. IOW, they are capable of sourcing and sinking high currents of short duration.

    Also, you've got to be very careful about lead routing. You do not want your load return currents passing through the logic portion of your circuitry. That entails joining your load return and logic ground at a single point: the MOSFET source (or current-sensing resistor, if you use one). Just making the connections to a common ground plane is not good enough. Here's an example:

    attachment.php?attachmentid=64181&d=1254549366

    -Phil
  • LeonLeon Posts: 7,620
    edited 2012-01-04 10:40
    A MOSFET driver I've used is the Micrel MIC4426. I actually used them with a 5V PIC, but they can go down to 2.4V input so will work OK with the Propeller.
  • RaymanRayman Posts: 14,652
    edited 2012-01-04 10:45
    It turns out that transistors are often best for driving mosfets. In particular, I've often seen complimentary emitter followers used like the one described here:
    http://www.diodes.com/zetex/_pdfs/3.0/appnotes/apps/an18.pdf

    I've used the ZXGD3003 before and it works quite well...
  • idbruceidbruce Posts: 6,197
    edited 2012-01-04 12:26
    This thread is becoming much better and more informative. I thank you all for your input.

    Bruce
  • idbruceidbruce Posts: 6,197
    edited 2012-01-04 12:42
    Hey Jon

    That's a very nice circuit. I like it. Thank you.

    Bruce
  • tonyp12tonyp12 Posts: 1,951
    edited 2012-01-04 15:23
    tdson8.jpg
    http://www.mouser.com/ProductDetail/Infineon/IPG20N04S4L-08/?qs=HwMeRNENlMbtT64zQ7h8nw%3d%3d

    It will turn on at 3v but fully-on it needs 4v (look at: VGS [V] chart, bottom left page 5)
    So I recommend to run the signal through HCT buffer/driver with a 5v Vcc for this IC.
    http://www.mouser.com/Semiconductors/Logic-ICs/Buffers-Line-Drivers/_/N-50nahZscv7?Keyword=HCT&Ns=Pricing|0


    Here is my diptrace lib for it:
    http://www.diptrace.com/forum/viewtopic.php?f=19&t=3301
  • idbruceidbruce Posts: 6,197
    edited 2012-01-05 05:57
    I must say, considering the general helpful nature of this forum, I initially thought this thread might turn out quite nice and useful, but I am starting to get disappointed. In a 24 hour period, only (2) people bothered to take the time to provide a useful schematic with part numbers. I don't know if you folks are shy or just afraid of a little criticism, but come on let's see some MOSFET circuitry with some part numbers and how it interfaces with the Propeller. I am certain there is a lot of MOSFET circuits stowed away within your memory, so share what you know and it will come back you.

    There are a lot of folks within this forum that can truly benefit from your knowledge of MOSFETs and Propeller interfacing.

    Bruce
  • ElectricAyeElectricAye Posts: 4,561
    edited 2012-01-05 07:18
    There's a ton of stuff on Google if you search site:parallax.com mosfet

    And if you've got a hankering for schematics, then you can use the same search phrase but switch to searching for images, and many admirable things will pop up.

    For example, here's Phil's previous schematic with a few things labeled:

    attachment.php?attachmentid=74873&stc=1&d=1288553621

    I suppose you could filter through lots of that stuff and make a big comprehensive index, especially if you glean information from posts made by gurus like Phil and Jonnymac, et al.

    Just a thought. RIght now it seems to me that the forum participation is running a little slow. I guess people are still grieving the global loss of Dear Leader Kim Jong ill.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-01-05 07:40
    Bruce, thanks for starting this thread. There are some great nuggets buried in it.

    I don't know if this is a(nother) case of information overload or the 80/20 rule applies. Anyone posting a schematic on the Internets could be an electronics wizard until their contributions are verified. Caveat Googler as the ancients used to say.

    This seems like a great start and could be combined with other information for an interfacing cookbook.

    If Phil's schematic and Jonnymac's interface for protecting pins will satisfy 80% of the cases if adjusted for N-channel or P-channel and load properties, then this could be all that's needed for most of us. Anything else might be more esoteric or situational based on the load voltages, currents, switching speeds - it may take just a study of the data sheets to match the MOSFET with the load and then hook it up per the schematics. Maybe along with the basic schematics, an understanding of the important data sheet values is all that's needed to make an intelligent selection of parts.
  • idbruceidbruce Posts: 6,197
    edited 2012-01-05 07:55
    It was just a thought to have a nice resource. Oh well, I cannot force people to share their knowledge.

    C'est La Vie
  • ElectricAyeElectricAye Posts: 4,561
    edited 2012-01-05 08:09
    idbruce wrote: »
    ....Oh well, I cannot force people to share their knowledge....

    Well, if we keep bumping this to the top of the forum, I'm sure it will grow dirty-snow-ball style over the next few weeks. :-)

    Actually, I would say you've got this thread off to a very good start. And it's a very good topic, too. I've learned a lot from it and have it bookmarked for future reference. But keep in mind it's a lot to ask for people to do a data dump on everything they know about a topic that has taken them perhaps decades of experience to grok. On this forum it seems that the best way to smoke people out of their spider holes is to post a specific question about a specific problem. That seems to be the best way most forums operate. One tactic that has always worked for me is to say something totally stupid and then watch people come to my rescue.
  • train nuttrain nut Posts: 70
    edited 2012-01-05 08:43
    Rayman

    The problem with P Channel Mosfets is they don't have the ability to conduct the same current for a given size.

    Ben
  • RaymanRayman Posts: 14,652
    edited 2012-01-05 09:01
    Well, you can do it using an isolated DC-DC converter and a optoisolated gate signal.
    I also noticed yesterday a web page saying they did this using a voltage double circuit, which may be an easier way...
  • ChrisGaddChrisGadd Posts: 310
    edited 2012-01-05 13:24
    I guess it depends on what you're doing with the mosfet. Those intricate circuits might be necessary for switching high currents on and off at high speeds, however for something like a motor or fan-speed controller I simply connect a pulse-width-modulated output through a simple filter to the gate of the mosfet.
                                  +9V
                                    
                                   │
                 Analog voltage   FAN
                 0 - 3.3V          │
                       │           │
                       │         │┻┐                     
              1KΩ               │┐ [URL="http://www.datasheetcatalog.org/datasheet/irf/irlz44.pdf"][color=blue]IRLZ44[/color][/URL]              
    PWM ─┳──────┳─────────────┘╋┘                     
         0.1µf 0.1µf         │                   
                                 
    
    Using that circuit (values based on what happened to be in arm's reach) I was able to vary a 120mm computer fan between 566RPM at 56% PWM (1.85V at output of the filter) to 1449RPM at 60% PWM (1.98V). The fan stopped below 56% modulation and tapered off above 60%, but within that range it was very linear and stable. There's some ripple on the analog voltage, but not enough for a fan to care about.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-01-05 13:38
    Chris,

    Were you using true PWM or DUTY-mode output? Typically, you do not want or need to run a MOSFET in its linear region to control a motor, as it will dissipate too much heat. (A small fan, maybe, not so much.) The key is to use a true PWM output and just drive the gate without a low-pass filter. That way the MOSFET will either be all the way on or all the way off. (With a DUTY mode input, you will not realize this advantage, since it switches too rapidly.)

    In any event, with an inductive load, such as a motor, always be sure to add a protection diode across the load. This will prevent the voltage on the MOSFETs drain from exceeding its spec'd maximum when the MOSFET is switched off.

    -Phil
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2012-01-05 14:31
    The key of course here is in the silver lining.... "...That way the MOSFET will either be all the way on or all the way off. (With a DUTY mode input, you will not realize this advantage, since it switches too rapidly.)...."

    I think this has been mentioned, but I will mention it again, since it can be a show stopper. ... Assuming you get the correct drive voltage, you must also consider having the correct drive current, or else at high frequency PWM you will never leave the linear operating range of the MOSFET. ALL of the time that you spend in the linear region, you are wasting power in the form of heat that the transistor will dissipate. If the gate capacitance is high, and you have a weak drive strength to the gate you will waste more energy than if the drive strength is rated properly. The transistor will still switch, but it will take longer. On a related note, if the drive signal is too fast (i.e. a high base frequency PWM) the transistor may never leave the linear region.

    I should also point out, that the capacitive effects of the MOSFET gate also apply to turning the transistor OFF... if the drive strength to turn the transistor OFF is not adequate, then you have the same scenario.
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2012-01-05 14:47
Sign In or Register to comment.