element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Circuit Issue with MOSFET
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 14 replies
  • Answers 2 answers
  • Subscribers 394 subscribers
  • Views 2356 views
  • Users 0 members are here
  • irf540
  • 2N7000
  • arduino
Related

Circuit Issue with MOSFET

wallarug
wallarug over 10 years ago

Hey,

 

I am having issues with this circuit:

 

image

 

Background:  This circuit is to control an RGB LED strip (so three of the above would achieve this).  The reason for this particular design is: IRF540 to drive load (large current) and the two 2N7000 drive the MOSFET, reducing current drain from Controller (possibly a 3v3 Arduino).  The double 2N7000 allows the IRF540 to be active when logic high.

 

Can someone please tell me if there is a problem with the above schematic, otherwise I think it would be my breadboard layout is not correct. (too hard to post that right now).

 

Any comments would be much appreciated.

 

Many thanks,

 

wallarug

  • Sign in to reply
  • Cancel

Top Replies

  • johnbeetem
    johnbeetem over 10 years ago +2
    How is it (mis)behaving? Just some ideas: 1. In general, don't hook up your actual output device until you're sure the circuits controlling it work with a voltmeter. Put a resistor in place of the LED…
  • wallarug
    wallarug over 10 years ago in reply to johnbeetem +1
    Thanks John, I will take everything above into consideration.
  • mcb1
    mcb1 over 10 years ago +1
    @wallarug I'm having feeling of dejavue with a similar circuit some time back to do a similar task. The first FET is right on the limit for conducting, so you could reduce the resistor to 1k or similar…
Parents
  • mcb1
    0 mcb1 over 10 years ago

    @wallarug

    I'm having feeling of dejavue with a similar circuit some time back to do a similar task.

     

    The first FET is right on the limit for conducting, so you could reduce the resistor to 1k or similar.

     

    You should be able to prove it works with a voltage (12 or 5v) on the control side of R1.

     

     

    Personally to get what you want you might consider swapping both fets and using an Optocoupler.

    You can drive the LED (pin and ground) or have it connected between the 3v3 and Arduino pin, and simply connect the output in place of the second 2n7000 (ie between the IRF540 Gate/R3 and ground)

     

    image


    This is the part of the 2N7000 datasheet that shows you what current you can expect with what voltage applied at the different Gate to Source voltages (ie 3v3, 5v and 12v)

    image

     

    At the best you're probably only going to get 30-50mA on your first 2N7000, so you could try swapping the 2k2 with the 10k.

    I agree with John about ensuring the pin is in a known state, so ensure the PinMode is at the start of setup.

     

    Mark

     

    edit I was right my memory isn't going after all ...

    Arduino and Transistors Question - RE: School Musical Production

     

    So you had this version working ......

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • wallarug
    0 wallarug over 10 years ago in reply to mcb1

    Yes, that circuit works (from old thread) and I remember all of the content in the very very long and interesting discussion.

     

    In this new version I am trying to correct two issues I had with the last:

    1.  Circuit logic -> The logic in the old circuit was backwards, which was annoying.

    2.  Current draw was too high by Bi-Polar.

     

    A response by someone in the old long thread said that adding an extra FET would fix issue ( 1 ) above.

     

    For issue 2 I was under the impression that MOSFETs didn't pull anywhere near as much current as the Bi-Polar (which was around 50-70mA on the old circuit).  I was thought that for the first FET in the circuit the current in the Gate would be <10mA.

     

    I accept that a pull-down resistor needs to be added to that diagram.  I have corrected that.  Thank you.

     

    From a completely electrical theoretical point of view, will what I am trying here work? (yes / no)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dougw
    0 dougw over 10 years ago in reply to wallarug

    You are correct on all counts - the gate current will by much less than 1 mA.

    It looks to me like the circuit will work fine with no pull-down or pull-up on the first FET, Even R1 is not needed with this FET.

    To ensure full switching operation R2 should be relatively high -  between 30 K and 100 K should be safe, although it will likely work even with a 10 K resistor.

    My previous comments only apply if the FET doesn't work quite as well as the datasheet indicates.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • mcb1
    0 mcb1 over 10 years ago in reply to wallarug

    That explains it then.

     

    As another question, why are you worried if the output is HIGH or LOW to control the LED's.?

    Even if you used PWM, it would be similar that 0 is fully ON while 255 is OFF.

     

    That is one of the nice things about micros and code.

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • mcb1
    0 mcb1 over 10 years ago in reply to wallarug

    That explains it then.

     

    As another question, why are you worried if the output is HIGH or LOW to control the LED's.?

    Even if you used PWM, it would be similar that 0 is fully ON while 255 is OFF.

     

    That is one of the nice things about micros and code.

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • wallarug
    0 wallarug over 10 years ago in reply to mcb1

    Thank you everyone for your comments and recommendations.  They are always much appreciated.

     

    To answer your question Mark:  I wanted to use the RGB LEDs with a DMX shield and link them into the DMX controller.  Not sure how the DMX controller would cope with 'false' logic from a control point of view.  I thought it would be better safe than sorry! image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube