Author Topic: Operational Amplifier driving MOSFET  (Read 13978 times)

0 Members and 4 Guests are viewing this topic.

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13142
Re: Operational Amplifier driving MOSFET
« Reply #25 on: April 27, 2018, 05:45:49 pm »
Twisted pair helps to prevent it picking up EMI, which, rectified in the B-E junction of the OPAMP input, could cause incorrect operation.   With a 1m cable run, I'd add the 2x 10nF caps as discussed to further shunt RF EMI away from the OPAMP input.
 

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #26 on: April 27, 2018, 05:50:33 pm »
I made a schematic with those capacitors.
Please have a look and tell me if the schematic is ok.
« Last Edit: April 27, 2018, 07:07:19 pm by mike_mike »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13142
Re: Operational Amplifier driving MOSFET
« Reply #27 on: April 27, 2018, 09:35:51 pm »
Looks O.K.   Time to breadboad it, (with the MOSFET, its gate resistor, the diode and the MOSFET's supply and load connections soldered up on protoboard so no connections to/on the breadboard have to carry over 1/2A) and confirm it does what you want, then either lay out a PCB or develop a nice tight protoboard layout.
 

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #28 on: April 28, 2018, 08:16:13 am »
Thanks for the reply.
You said in one of the previous post that LM393 (comparator)
 is better for this design.
It will be fine if i will use LM358 or I shoud switch for LM393 ?
« Last Edit: April 28, 2018, 08:18:30 am by mike_mike »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13142
Re: Operational Amplifier driving MOSFET
« Reply #29 on: April 28, 2018, 08:33:09 am »
Not me.   You could switch to a comparator, but a LM393 isn't the best choice.  Its a dual comparator with open collector outputs, and for driving a single MOSFET gate, you'd be better off with a single comparator with a push-pull output stage.   However for such a slow circuit, (limited by the ORP12 and the load) there's no reason not to stick with an OPAMP.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20046
  • Country: gb
  • 0999
Re: Operational Amplifier driving MOSFET
« Reply #30 on: April 28, 2018, 11:28:15 pm »
Not me.   You could switch to a comparator, but a LM393 isn't the best choice.  Its a dual comparator with open collector outputs, and for driving a single MOSFET gate, you'd be better off with a single comparator with a push-pull output stage.   However for such a slow circuit, (limited by the ORP12 and the load) there's no reason not to stick with an OPAMP.
It was me and I wouldn't recommend using a comparator to drive a MOSFET. It's probably slightly better, than the LM358, but not much.

In this case, I think the MOSFET is unnecessary. The LED can be driven from the LM358 or LM393. The spare op-amp/comparator could be used to drive, the LED, which would prevent the voltage drop from interfering with the comparator circuit.

I'd recommend the LM311, which can drive up to 50mA out, with a very low saturation voltage.



« Last Edit: April 28, 2018, 11:30:41 pm by Hero999 »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13142
Re: Operational Amplifier driving MOSFET
« Reply #31 on: April 29, 2018, 12:09:44 am »
Errr the O.P's also driving a 12V 20W Halogen bulb, which will have a cold resistance of under one ohm!.   With a >16A turn-on surge, there's no realistic way of getting rid of the MOSFET.     Your buffered LM358 circuit looks nice for isolating the MOSFET gate drive from the hysterisis feedback.   Drive the LED off the comparator stage, sourcing current so it doesn't affect the Vol, and the MOSFET gate off the buffer stage.
 

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #32 on: April 29, 2018, 07:51:15 am »
Drive the LED off the comparator stage, sourcing current so it doesn't affect the Vol, and the MOSFET gate off the buffer stage.

Can you please be more explicit ? I did not understood this.
1. Are there any modifications that I have to do ?
2. Or it is ok to use the circuit as it was in the last schematic uploaded by me ?
« Last Edit: April 29, 2018, 08:00:46 am by mike_mike »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13142
Re: Operational Amplifier driving MOSFET
« Reply #33 on: April 29, 2018, 08:43:06 am »
It should work as-is, but Hero999 has proposed a small improvement (top schematic in reply#30) If you want to adopt his improvement, as you need to drive both a LED and a MOSFET, move the connection to R4 for his output LED from pin 7 to 1 to drive it off the first (comparator) OPAMP in the chip, and drive the MOSFET gate resistor from pin 7 of the second (buffer) OPAMP.
 

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #34 on: April 29, 2018, 09:01:18 am »
Thanks for the reply.
I tested the circuit and it is working as I expected (I tested the last schematic that I uploaded in post 26).
It is OK now to make the PCB @Ian.M ?
« Last Edit: April 29, 2018, 09:32:25 am by mike_mike »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13142
Re: Operational Amplifier driving MOSFET
« Reply #35 on: April 29, 2018, 09:40:11 am »
That's up to you.  Personally I am somewhat of a perfectionist so would investigate  Hero's improvement, but eventually you need to either scratch-build a prototype on matrix board, put it into service and see how it holds up or take a gamble and skip that step and go straight to laying out a PCB.   If you rarely lay out PCBs, you'll probably want to post PNGs or GIFs of it here for comment (PNGs or GIFs as many users cant handle proprietary PCB design file formats, and not everyone has a Gerber viewer program installed) 
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20046
  • Country: gb
  • 0999
Re: Operational Amplifier driving MOSFET
« Reply #36 on: April 29, 2018, 09:58:08 am »
Errr the O.P's also driving a 12V 20W Halogen bulb, which will have a cold resistance of under one ohm!.   With a >16A turn-on surge, there's no realistic way of getting rid of the MOSFET.     Your buffered LM358 circuit looks nice for isolating the MOSFET gate drive from the hysterisis feedback.   Drive the LED off the comparator stage, sourcing current so it doesn't affect the Vol, and the MOSFET gate off the buffer stage.
I agree. This is the problem with not putting everything on the schematic! Although I did read the text, I had forgotten about the halogen lamp, by the time it got to this stage of the thread!

Yes, the MOSFET or relay are unavoidable and the spare op-amp could be used as a buffer for the MOSFET.


I think a comparator with a push-pull output, such as the LMC6762, TSX3702 or LMC7211, would be the ideal solution, but they aren't always available in DIP packages or as cheap and easy to obtain as jellybean parts such as the LM358.
« Last Edit: April 29, 2018, 10:00:13 am by Hero999 »
 

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #37 on: April 29, 2018, 10:17:00 am »
Thanks for the reply @Ian.M and @Hero999.
I made the top schematic from post 36 (with LM358). I just modified on the old project. It is working.
It is ok to make the layout ?
« Last Edit: April 29, 2018, 10:50:49 am by mike_mike »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13142
Re: Operational Amplifier driving MOSFET
« Reply #38 on: April 29, 2018, 11:16:02 am »
Yes, it looks like time to tape it out.
 

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #39 on: April 29, 2018, 02:16:12 pm »
I attached the layout and the schematic.
The LDR will be connected to the board using wires.
Please have a look and tell me if the schematic and layout are ok.
« Last Edit: April 29, 2018, 04:20:01 pm by mike_mike »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13142
Re: Operational Amplifier driving MOSFET
« Reply #40 on: April 29, 2018, 07:32:26 pm »
That's fairly sucky.   The power in connector, load connector, MOSFET, 1N4007 diode and 470uF cap all need to be as close as possible to each other with minimal trace length between them so the MOSFET and diode should be right next to the connectors at the board edge.  The power trace *MUST* go direct from the power connector to the 470uF cap and from there one branch back to the load connector and one off to the rest of the board.   Same goes for Ground if you aren't using a ground plane. All high current traces need to be beefed up - doubling their width where you can wouldn't go amiss.   The 100nF cap needs to be asw close to the OPAMP as possible with minimal trace length between them. The ORP12 needs a connector in parallel for off-board mounting.   Otherwise,it doesn't look *TOO* bad for a minimal jumpers single sided layout, though you could probably do better making the traces round the OPAMP apart from its power and ground pins skinny enough that you can route one between its pins.
 

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #41 on: April 29, 2018, 08:14:24 pm »
I uploaded new files.
Please have a look and tell me if it is ok.
I am not sure if I understood correctly what you said.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13142
Re: Operational Amplifier driving MOSFET
« Reply #42 on: April 29, 2018, 08:51:33 pm »
I've hilighted the critical high current traces that need to be shortened and separated from the low current traces.  They should be grouped in one corner of the board, with the power and load connectors next to each other, then the MOSFET beside them, then the 470uf cap.  The 1N4007 diode and the gate resistor should be near the MOSFET.  They can go between the MOSFET and the cap for a bit of space so the MOSFET doesn't cook the cap if its ever loaded enough to run hot.   Apart from the diode, *NOTHING* I haven't hilighted should join a highlighted power or ground trace anywhere other than at the 470uF cap pins.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20046
  • Country: gb
  • 0999
Re: Operational Amplifier driving MOSFET
« Reply #43 on: April 29, 2018, 09:01:18 pm »
You don't need big, fat, traces everywhere, although it doesn't cause any harm. Only the ones which carry current, to the load, i.e. the ones from, J2, to the MOSFET's drain, source, the 470μF capacitor and J1 need to be much larger, than the other traces, which can be relatively thin. Ideally the heavy current carrying traces should be solid copper pours, if possible.  I don't know what the exact scale is. The traces look thick enough for 3A, but use the calculator, linked below, to be sure. Consider the trace length, the voltage drop, as well as the temperature rise.
http://www.4pcb.com/trace-width-calculator.html

By the way, please avoid using jpg format for drawings. It results in large files and fuzzy edges, which can make editing difficult. Please stick to PNG for schematics and PCB layouts. Look at the size of the files I posted and how sharp they are, compared to the JPGs. I also reduced the colour depth to 4-bit, to make the files size, as small as possible, but this can only be done with images which don''t contain many colours, without loss of quality: 8-bit colour will be fine for most drawings.
 
The following users thanked this post: Ian.M

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #44 on: April 30, 2018, 04:56:33 am »
It should work as-is, but Hero999 has proposed a small improvement (top schematic in reply#30) If you want to adopt his improvement, as you need to drive both a LED and a MOSFET, move the connection to R4 for his output LED from pin 7 to 1 to drive it off the first (comparator) OPAMP in the chip, and drive the MOSFET gate resistor from pin 7 of the second (buffer) OPAMP.
You said to drive the led from pin 1 of LM358. I drive it using the mosfet (like in the top schematic from reply #36). It is a mistake ?
I already made the top schematic from reply #36 and it is working. Also, the layout was made for the top schematic from reply #36.
It is a problem if I drive the led as shown in the top schematic from reply #36, using the mosfet ? (That led is connected at J3)
« Last Edit: April 30, 2018, 06:31:41 am by mike_mike »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13142
Re: Operational Amplifier driving MOSFET
« Reply #45 on: April 30, 2018, 06:49:24 am »
You can do it either way.  Before I talked you into adding the 1N4007 diode, an inductive load would have killed the LED at turnoff if you left it in parallel to the load.   I've got a mild preference for moving it to the output of the first stage OPAMP as if your load shorts and the MOSFET dies, the  LED should still work (the OPAMP will survive a MOSFET failure as the 1K5 gate resistor will limit the current to under 10mA, well within the OPAMPs ratings no matter how the MOSFET shorts out as it dies or blows apart), telling you the failure to command the load is either a load problem or a blown MOSFET.   If you aren't going to volume production, you may want to add a second LED on the board on the first stage OPAMP output instead of moving it as if the two LEDs don't match you know you've killed the MOSFET and its also handy for setting it up before you wire everything up as all you need to do is hook up power and the ORP 12 to test the board or set the threshold.

How are you doing on rearranging the board to shorten the high current traces?    One thing I forgot to mention - a fuse in the DC input would be a good idea.  It wont be fast enough to save the MOSFET, unless you vastly over-spec the MOSFET, but will prevent a high current short burning traces off the board, keeping it easily repairable.
 

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #46 on: April 30, 2018, 03:28:15 pm »
I am sorry for the delayed response.
I attached the updated schematic and layout.
I tried to do my best, but I am not sure if I made them correct.
All traces are 1.5mm wide.

Please have a look and tell me if the schematic and layout are ok.
« Last Edit: April 30, 2018, 04:12:47 pm by mike_mike »
 

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #47 on: May 01, 2018, 07:27:04 am »
I am attaching a new layout.
I am not sure if I made it correctly. I tried to respect the instructions.
I elongated the pads to make sure that will be enough copper on the board. I will make the PCB using transfer toner method.
I tried to make the power traces shorter but I don't know if they are short enough. I arranged the power traces on the top of the PCB.
The power traces width is 2mm and the rest of the traces are 1.5mm.

Please have a look at the schematic and at the layout and tell me if they are ok.
« Last Edit: May 01, 2018, 07:54:37 am by mike_mike »
 

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #48 on: May 01, 2018, 09:27:24 am »
@Ian.M Are you still there ? Can you please respond ?
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20046
  • Country: gb
  • 0999
Re: Operational Amplifier driving MOSFET
« Reply #49 on: May 01, 2018, 10:21:08 am »
@Ian.M Are you still there ? Can you please respond ?
People do have other things to do, than post here you know. If no one responds within a day or two, fair enough bump the thread, but you only waited a few hours, which demonstrates lack of patience.

The last layout looks better than the others, but I haven't looked in great detail.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf