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

0 Members and 1 Guest are viewing this topic.

Offline mike_mikeTopic starter

  • Frequent Contributor
  • **
  • Posts: 900
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #50 on: May 01, 2018, 10:23:37 am »
Thanks for the reply @Hero999.
I am sorry for bothering you and @Ian.M with my questions.

Have you looked at the schematic ? It is OK ?
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19710
  • Country: gb
  • 0999
Re: Operational Amplifier driving MOSFET
« Reply #51 on: May 01, 2018, 12:24:18 pm »
Thanks for the reply @Hero999.
I am sorry for bothering you and @Ian.M with my questions.

Have you looked at the schematic ? It is OK ?
I don't mind the questions, as long as you don't forget that people are not being paid for the advice they give.

The schematic would be better if J9 and R8 were switched by the MOSFET, rather than being connected to the op-amp's output.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12994
Re: Operational Amplifier driving MOSFET
« Reply #52 on: May 02, 2018, 02:34:17 am »
Use a Polyfuse, they are much more compact, and self-reset when the power is switched off for a few minutes.

@Hero999: the whole point of the second LED connected to the first stage OPAMP output is it should *ALWAYS* match the one switched by the MOSFET.  If it doesn't it means the MOSFET's blown - which is difficult to avoid in such a simple circuit if its output is shorted, without incurring excessive losses  or complexity protecting the MOSFET, so its useful to have an indication that there is a fault.
« Last Edit: May 02, 2018, 02:35:57 am by Ian.M »
 

Offline mike_mikeTopic starter

  • Frequent Contributor
  • **
  • Posts: 900
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #53 on: May 02, 2018, 04:52:07 am »
 Thanks for the reply.

I think I will use for the moment a 5x20 mm fuse which I can find at the local electronics store.
It is ok now to make the pcb, or there are any other modifications that I should do ?
« Last Edit: May 02, 2018, 05:16:49 am by mike_mike »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12994
Re: Operational Amplifier driving MOSFET
« Reply #54 on: May 02, 2018, 05:20:57 am »
Looks reasonable.  I'm sure I could tidy it up a bit 'hands on', and I'd probably use a ground plane, if not for the whole board, at least for the small signal stuff from a line across the board between J1 and J6 downwards, but its not worth the time to try to talk you through the changes, as you aren't PWMing anything so it isn't going to radiate significant EMI.  Worst case it may flash a bit if you get a cellphone too close to it!

If you've checked the high current trace widths and copper thickness are adequate with the calculator Hero999 linked in Reply #43, it passes the schematic package ERC and DRC, and you have sorted out how you will mount it without mounting holes, then go for it.  I've seen worse in commercial products!
« Last Edit: May 02, 2018, 05:22:56 am by Ian.M »
 

Offline mike_mikeTopic starter

  • Frequent Contributor
  • **
  • Posts: 900
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #55 on: May 02, 2018, 05:27:49 am »
Thanks for the reply.

The last uploaded schematic (reply #47) is correct ? Sorry for asking again. I just want to be sure.
« Last Edit: May 02, 2018, 06:32:45 am by mike_mike »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19710
  • Country: gb
  • 0999
Re: Operational Amplifier driving MOSFET
« Reply #56 on: May 02, 2018, 07:55:02 am »
Use a Polyfuse, they are much more compact, and self-reset when the power is switched off for a few minutes.

@Hero999: the whole point of the second LED connected to the first stage OPAMP output is it should *ALWAYS* match the one switched by the MOSFET.  If it doesn't it means the MOSFET's blown - which is difficult to avoid in such a simple circuit if its output is shorted, without incurring excessive losses  or complexity protecting the MOSFET, so its useful to have an indication that there is a fault.
Good point.
Thanks for the reply.

The last uploaded schematic (reply #47) is correct ? Sorry for asking again. I just want to be sure.
It looks good to me.
 

Offline mike_mikeTopic starter

  • Frequent Contributor
  • **
  • Posts: 900
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #57 on: May 03, 2018, 02:19:40 pm »
I built the circuit and I tested it.
Everything looked OK, but when I put the scope on pin 2, there appears an oscillation (I don't know what is it, but I suppose it is a oscillation).
The first image is from pin 2 of LM358 (the probe between GND and pin 2), and the second image is from the terminals of LDR.
On the pin 6 and 7 is only noise, about 2-3mV. On pin 1 is the same with pin 6 and 7 (DS0262.png).
I tried to remove the two 10 nF capacitors but it behaves the same.
I tried with another LDR and it behaves the same.
I do not know what other details I need to show.

It is normal or my circuit does not work correctly ?
« Last Edit: May 03, 2018, 02:43:33 pm by mike_mike »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12994
Re: Operational Amplifier driving MOSFET
« Reply #58 on: May 03, 2018, 03:12:31 pm »

So you've got 35mV of 100Hz ripple at the first OPAMP input.   That could be noise on your +12V supply - try probing the +12V rail with the scope input on AC coupling and see if its worse there, or run it from a 12V battery and see if the ripple at pin 2 goes away.  Alternatively it may just be the LDR responding to the room lights flickering at twice mains frequency.  Test that by turning off the lights and illuminating the LDR either with natural daylight, a LED keyring torch that doesn't have any electronic controls or fancy modes, or an torch with an incandescent bulb.  As the circuit has >0.5V hysterisis, 35mV of ripple isn't going to cause any problems.

As for what you measured at the LDR - unless its well lit, its fairly high impedance and that looks a lot like its picking up mains hum on the wiring.


« Last Edit: May 03, 2018, 03:53:08 pm by Ian.M »
 

Offline mike_mikeTopic starter

  • Frequent Contributor
  • **
  • Posts: 900
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #59 on: May 03, 2018, 03:44:26 pm »
I made some tests, with the light turned off in the room. The light of the room consist of 1 LED 230V light bulb.
Natural light, load off DS0355.png.
Natural light, load on DS0358.png.
Output of the 12V power supply: DS0356.png.
The probe on the LDR with the circuit turned off and the LDR connected directly to the PCB: DS0360.png.

Please have a look at the measurement images and tell me what you think.

« Last Edit: May 03, 2018, 03:53:51 pm by mike_mike »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12994
Re: Operational Amplifier driving MOSFET
« Reply #60 on: May 03, 2018, 03:52:33 pm »
That proves the 100Hz ripple at pin 2 was from the room lighting.   However there's still something odd about the 50Hz mains hum you are getting at the LDR.   Exactly what point on the above schematic are you probing, and where's the scope ground clip connected to?
 

Offline mike_mikeTopic starter

  • Frequent Contributor
  • **
  • Posts: 900
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #61 on: May 03, 2018, 03:55:49 pm »
The oscilloscope probe is connected on the terminal block marked with arrows. The ground clip is on the upper arrow.
And I am using the crocodile clip of the probe.

That 50 Hz sine wave (or approximate sine wave) as in the DS0360.png is present on the LDR even if the power of the circuit is off.
« Last Edit: May 03, 2018, 04:26:36 pm by mike_mike »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12994
Re: Operational Amplifier driving MOSFET
« Reply #62 on: May 03, 2018, 04:27:12 pm »
You can't do that unless you are using a self-contained battery powered scopemeter. You are lucky not to have blown the OPAMP, and if you'd put the ground clip on the other end of R3, if the PSU had a grounded output it would have damaged your scope.     As you are using a mains PSU, even if its fully isolated, the scope ground clip *MUST* go on the 0V (circuit Gnd) rail as otherwise anything you are trying to measure will be swamped by the line frequency leakage current through the PSU's pri-sec class Y EMI suppression capacitor.

The only way of making differential measurements safely with a conventional mains powered DSO is to either use two channels and use waveform arithmetic to display the difference (low accuracy if the common mode signal is large with respect to the difference signal, and no good at HF) or to use a differential  probe.



Forum topic: https://www.eevblog.com/forum/blog/eevblog-279-how-not-to-blow-up-your-oscilloscope!/
« Last Edit: May 03, 2018, 05:54:59 pm by Ian.M »
 

Offline mike_mikeTopic starter

  • Frequent Contributor
  • **
  • Posts: 900
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #63 on: May 03, 2018, 04:43:38 pm »
Thanks for the link, it is giving 404 error.
I measured again, with the ground clip on the gnd of the circuit and the probe on pin 1 and pin 2 of the J4 connector.
On pin 1, it gives me the following results:
DS0363 in completely darkness
DS0364 in direct natural light

On pin 2:
DS0366 in completely darkness
DS0365 in direct natural light

Please have a look and tell me what you think.
« Last Edit: May 03, 2018, 04:47:28 pm by mike_mike »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12994
Re: Operational Amplifier driving MOSFET
« Reply #64 on: May 03, 2018, 06:03:54 pm »
Yep. I was right. Mains hum due to incorrect probe ground connection.

I've fixed the links above.  You *SHOULD* watch the video above . . .
 

Offline mike_mikeTopic starter

  • Frequent Contributor
  • **
  • Posts: 900
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #65 on: May 03, 2018, 06:07:41 pm »
Thanks for the reply.
The circuit is OK now ?
And sorry for bothering you with my beginner questions.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12994
Re: Operational Amplifier driving MOSFET
« Reply #66 on: May 03, 2018, 07:06:27 pm »
If it works the way you want, its O.K.  We eliminated all the major problems earlier.
 

Offline mike_mikeTopic starter

  • Frequent Contributor
  • **
  • Posts: 900
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #67 on: May 06, 2018, 11:45:46 am »
Thanks for the reply @Ian.M.

The 1.5K ohms (R4) gate resistor is having a sufficient value to avoid ringing and oscillations ?
« Last Edit: May 06, 2018, 11:47:20 am by mike_mike »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12994
Re: Operational Amplifier driving MOSFET
« Reply #68 on: May 06, 2018, 12:35:37 pm »
Plenty.  Even 100R would stop it oscillating as long as its close to the gate pin.  The advantage of 1.5K is it limits the maximum gate current (even if the MOSFET fails shorted) to under 10mA, which the OPAMP can easily handle.  If you put a 100R one there, if you short the load and blow the MOSFET,  there's a significant risk of it taking out the OPAMP as well.  Series gate resistors always need to be as close to the MOSFET as possible - if you put them too far away, you risk the track between them and the gate acting as an antennae coupled to the load circuit, possibly turning the MOSFET into a power oscillator.
« Last Edit: May 06, 2018, 12:44:29 pm by Ian.M »
 

Offline mike_mikeTopic starter

  • Frequent Contributor
  • **
  • Posts: 900
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #69 on: May 06, 2018, 12:53:01 pm »
Thanks for the reply.

You said about distance between the resistor (R4) and mosfet.
On my layout, that distance is about 200 mils and the trace is about 2mm wide. It is sufficiently short ?
« Last Edit: May 06, 2018, 01:39:27 pm by mike_mike »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12994
Re: Operational Amplifier driving MOSFET
« Reply #70 on: May 06, 2018, 01:51:10 pm »
That should be fine for any normal power MOSFET.  Typically one sees problems if the gate track snakes around larger boards, or if the gate is directly driven by a low impedance and there is significant reactive impedance in both the drain and source circuits.

IMHO its time to just <expletive> build it!
8)


I'll probably be ignoring further posts in this thread unless you post a photo of the actual build. :popcorn:
« Last Edit: May 06, 2018, 02:00:26 pm by Ian.M »
 

Offline mike_mikeTopic starter

  • Frequent Contributor
  • **
  • Posts: 900
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #71 on: May 06, 2018, 02:24:43 pm »
@Ian.M you can find the photos in the following link: https://imgur.com/a/9Bpcbhi

I am sorry about the quality of the photos. I do not have a camera. I used my smartphone.
I used the toner transfer method for the PCB. I put solder on all traces to prevent the oxidation.
« Last Edit: May 06, 2018, 02:28:12 pm by mike_mike »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf