Logic level mosfet + solenoid design, decoupling capacitors?

Thread Starter

Nicholas

Joined Mar 24, 2005
139
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
 

spinnaker

Joined Oct 29, 2009
7,830
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.
 

Thread Starter

Nicholas

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

Which is the easiest?

Dodgydave, won't that drop the forward voltage?
 

dl324

Joined Mar 30, 2015
16,909
won't that drop the forward voltage?
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.
 

spinnaker

Joined Oct 29, 2009
7,830
So, you are not blown away by my sketch? :)

Which is the easiest?

Dodgydave, won't that drop the forward voltage?
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.
 

Thread Starter

Nicholas

Joined Mar 24, 2005
139
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
 

spinnaker

Joined Oct 29, 2009
7,830
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.
 

spinnaker

Joined Oct 29, 2009
7,830
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.
 

Thread Starter

Nicholas

Joined Mar 24, 2005
139
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
 

Dodgydave

Joined Jun 22, 2012
11,301
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!
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.
 

Thread Starter

Nicholas

Joined Mar 24, 2005
139
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
 

cmartinez

Joined Jan 17, 2007
8,252
... so is the cap on the μC output.
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
 

Attachments

dl324

Joined Mar 30, 2015
16,909
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.
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

Joined Jan 17, 2007
8,252
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.
 

cmartinez

Joined Jan 17, 2007
8,252
I am using IRL530/IRL540, not IRF
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.
 
Top