Logic level mosfet + solenoid design, decoupling capacitors?

Discussion in 'General Electronics Chat' started by Nicholas, Nov 28, 2015.

  1. Nicholas

    Thread Starter AAC Fanatic!

    Mar 24, 2005
    121
    1
    Hi guys

    Back in 2012 a lot of you guys were very helpful educating me in logic level mosfets etc.
    I remember Kubeek and tracecom pitching in a lot :)

    Now I am back, and I have this circuit(which is almost a carbon copy of what tracecom made for me
    several years ago)

    I was thinking, if you look at the picture below, I have *tried* to insert some decoupling capacitors. Is this a good
    idea? Also, if I wanted to protect the micro controller from the mosfet failing or whatever, and bleeding 36+V back
    into it, what should I do? So, generally, what components should I add or think of, if I want to make the circuit
    'by the book'?

    ...and should I go for IRL530 or IRL540 for voltages around 40v?

    Thanks for your time!!

    Nicholas

    drv1.jpg
     
  2. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,993
    745
    Put a diode in series with the base/gate drive resistor, this will prevent feedback from the psu, or use an opto coupler instead.
     
    Nicholas likes this.
  3. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,887
    1,012
    Not really answering your question but have a look at DipTrace or ExpressSCH if you are going to be doing a lot of schematics. It will really help.
     
  4. Nicholas

    Thread Starter AAC Fanatic!

    Mar 24, 2005
    121
    1
    So, you are not blown away by my sketch? :)

    Which is the easiest?

    Dodgydave, won't that drop the forward voltage?
     
  5. dl324

    Distinguished Member

    Mar 30, 2015
    3,244
    622
    Not enough to matter and it's required to protect your controller from an unlikely collector-base short failure. Just adjust the series resistor if you need more base current.

    The resistor in parallel with the base emitter junction is unnecessary and, unless you're operating in an extremely (electrically) noisy environment, so is the cap on the μC output.
     
  6. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,887
    1,012
    Actually it was pretty good compared to a lot of them! :)

    Express is easier because it has less features. But Diptrace is pretty easy too. The good thing about Diptrace is they have lots of components. The bad thing about Diptrace is they have lots of components. ;) What is nice about it is you can easily build your own components.
     
    cmartinez likes this.
  7. Nicholas

    Thread Starter AAC Fanatic!

    Mar 24, 2005
    121
    1
    Okay, I am sitting in Diptrace right now...and I want to put down the IRL540 mosfet in a TO220 package
    like this (see picture below)

    I get this object in the software(see picture below). The pins are marked by one square and two round. I am unsure,
    what is gate, what is souce and what is drain? Maybe the slim rectangle is the tab? I don't know :)


    Thanks!

    220.jpg

    mosfetcad.jpg
     
  8. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,887
    1,012
    Looks like you are in the PCB Design portion. I think you want the schematic portion.

    BTW once you get your schematic built you will want to run a verification. You can then open the PCB editor and link the PCB to the schematic. The software will guide you trough the connections. And there is a tool to verify the connections. There is an auto trace but it does not work well except for the most simple boards.
     
    Nicholas likes this.
  9. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,887
    1,012
    Look at the datasheet for your component. It should list which one is pin 1. The schematic software will also show the function of each pin by it's number under properties for the component. But the Gate is pin one for this component.
     
  10. Nicholas

    Thread Starter AAC Fanatic!

    Mar 24, 2005
    121
    1
    Thanks for your answer!

    So, I make the schematic, verify it, then save it and open it in PCB design? Then the software will be able to make the
    PCB from the schematic? That would be amazing!

    Thanks again,

    Nicholas
     
  11. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,887
    1,012
    Once in PCB Layout look for File/Renew Design From Schematic/ by PCB Component
     
  12. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,993
    745
    The Gate, Drain and Source, are the terminals of the mosfet,like ordinary bipolar Transistors

    Gate =Base
    Source = Emitter
    Drain = Collector

    tha metal tab is the drain also.
     
  13. Nicholas

    Thread Starter AAC Fanatic!

    Mar 24, 2005
    121
    1
    Dodgydave, thanks, I was referring to the G, S, D in the software, but I got it now.

    What value diode would you recommend for the gate?

    Thanks,

    Nicholas
     
  14. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,993
    745
    Any small silicon diodes, 1N4001..7
     
  15. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,573
    2,541
    Which will also add to the fet's gate capacitance and make it even harder to switch at higher frequencies, and also stressing the MCU's output pin by drawing unnecessary instantaneous current.
    Why don't you download LTspice instead? It's not too bad for sketching purposes, and you get the extremely helpful plus of being able to actually simulate your circuit, instead of just drawing pretty pictures?

    Here's a quick sketch that I did of your original circuit. I even left in your abominable capacitor at the gate so that you can play around with it and try to delete it, as your first exercise. :)

    Capture.JPG
     
  16. dl324

    Distinguished Member

    Mar 30, 2015
    3,244
    622
    I interpreted the switch as an NPN transistor. If it's an N channel MOSFET, none of the resistors are required if the driver sinks and sources current.
     
    cmartinez likes this.
  17. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,573
    2,541
    And, BTW. The IRF530 is not a logic-level gate mosfet. If you're planning on switching its gate with a 5V signal directly from your MCU's output pin you might run into trouble. I'd recommend switching it with 10V instead.
     
  18. Nicholas

    Thread Starter AAC Fanatic!

    Mar 24, 2005
    121
    1
    cmartinez, thanks!! Can that software make a gerber file? Also, I am using IRL530/IRL540, not IRF :)
     
  19. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,573
    2,541
    Ooops... :confused: what a difference mis-reading one character can make!
    Yes, the IRL530 n-mosfet is of the logic level gate type, so you should be safe. (btw, I highly recommend you give this a good read, it's extremely basic, but highly informative)
    No, I'm not aware of any LTspice add-on that could generate a gerber file. For that, you'd actually need a PCB design software that also had that capability. It's more likely that Diptrace has that sort of feature, but I'm not familiar with it.
     
  20. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,887
    1,012
    The software I recommended can.
     
    cmartinez likes this.
Loading...