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

0 Members and 4 Guests are viewing this topic.

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Operational Amplifier driving MOSFET
« on: April 24, 2018, 02:26:36 pm »
Dear Forum,

I just built the attached schematic and it is working.
I tested the circuit using a 12V/20W light bulb (halogen) and a 27R/5W resistor, separately, connected on the LED_load connector. One test with the light bulb and one test with the resistor.
When the mosfet is OFF, when I put the oscilloscope probe on the terminals of the resistor (27R/5W) on the oscilloscope screen appears the following image:
. Why ?
I powered the circuit using a LM317 + PNP variable power supply, set at 12V. The maximum current that can be draw from the power supply is 3A.
The circuit is a switch which is turning ON the mosfet when the night comes. I added a hysterezis and two leds, with 1.5k series resistor.
When I used the 12v/20W light bulb and I put the oscilloscope probe on the bulb terminals, on the oscilloscope screen appeared only noise, with 5mV amplitude.
On the pin 1, pin 6, pin 7 (LM358) and on the output of the LM317 power supply, whith respect to the GND, is only noise (about 5mV).
« Last Edit: April 24, 2018, 02:44:40 pm by mike_mike »
 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2363
  • Country: mx
Re: Operational Amplifier driving MOSFET
« Reply #1 on: April 24, 2018, 02:43:11 pm »
Looks like 50 Hz hum.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6269
  • Country: de
Re: Operational Amplifier driving MOSFET
« Reply #2 on: April 24, 2018, 02:44:13 pm »
Yep, 50 Hz. I'd suspect your 'scope probe ground connection.
 

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #3 on: April 24, 2018, 03:19:53 pm »
Is that 50 Hz hum dangerous for my circuit ?
Or it is just a hum captured by the oscilloscope probe ?
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6269
  • Country: de
Re: Operational Amplifier driving MOSFET
« Reply #4 on: April 24, 2018, 03:50:49 pm »
Is that 50 Hz hum dangerous for my circuit ?
Or it is just a hum captured by the oscilloscope probe ?

It's only 20 mVpp, Dangerous, no, I'd say it's noise captured by the probe. Place the probe point and probe ground directly on the resistor.

 

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #5 on: April 26, 2018, 06:29:50 am »
Thanks for the reply.

The 100 ohm gate resistor of the mosfet has a sufficient value ?
The inrush current of the mosfet will not be too high for the LM358 if I use a 100 ohm gate resistor ?
« Last Edit: April 26, 2018, 12:15:20 pm by mike_mike »
 

Offline byoungblood

  • Contributor
  • Posts: 48
  • Country: us
Re: Operational Amplifier driving MOSFET
« Reply #6 on: April 27, 2018, 03:06:42 am »
A MOSFET is a voltage controlled device and draws very little current at its gate, datasheet says there is about 100 nano amps leakage at the gate. If anything, you may want to use a pulldown on the gate of the MOSFET (10k would be fine) to ensure noise doesn't make it conduct.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20046
  • Country: gb
  • 0999
Re: Operational Amplifier driving MOSFET
« Reply #7 on: April 27, 2018, 08:19:35 am »
It's a bad design. Use a comparator IC, such as the LM393, rather than the LM358, which is optimised for linear operation. The LM393, will need a pull-up resistor from its output to +V: 3k3 will do.
 

Offline 0xfede

  • Regular Contributor
  • *
  • Posts: 201
  • Country: it
Re: Operational Amplifier driving MOSFET
« Reply #8 on: April 27, 2018, 09:02:46 am »
Hi mike_mike,

you may want to add a couple of resistors (one in series with the LDR and the other in series with the trimmer) because with some combinations of light/trimmer settings the two components may be damaged.
There is nothing wrong using an opamp to drive a MOSFET as long as it go to 0 volts; the LM358 has a VOL of max 20mV (page 6 of this datasheet: http://www.ti.com/lit/ds/symlink/lm158-n.pdf ) so it should work.
By the way as byoungblood suggested a 10K resistor between gate and ground is a good thing.

Hope this helps.

Best,
0xfede
Semel in anno licet insanire.
 

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #9 on: April 27, 2018, 09:12:06 am »
@0xfede What value should have those resistors ? (the resistor in series with the LDR and in series with de 10k trimmer)
 

Offline 0xfede

  • Regular Contributor
  • *
  • Posts: 201
  • Country: it
Re: Operational Amplifier driving MOSFET
« Reply #10 on: April 27, 2018, 09:15:36 am »
@0xfede What value should have those resistors ? (the resistor in series with the LDR and in series with de 10k trimmer)

With a couple of 1K resistors you will limit the maximum current flowing thru the LDR/trimmer to 6mA and that should be safe.

Best,
0xfede
Semel in anno licet insanire.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13142
Re: Operational Amplifier driving MOSFET
« Reply #11 on: April 27, 2018, 09:36:41 am »
Although its not good design practice to use an OPAMP as a comparator, I don't think the OPAMP can get itself in any trouble driving an IRF830 MOSFET gate.   

* The circuit has over 4% hysteresis, which with the likely supply voltage in the 10 to 15V region, is over half a volt , so its extremely unlikely that it could ever rapidly pulse between on and off at a rate fast enough that the dissipation due to charging/discharging the gate capacitance could be significant.

* The LM358 has a slew rate of about 0.5V/us and is good for about 40mA of output current (subject to dissipation constraints).   The IRF 830 has 38nC worst case total gate charge, with a turn-on plateau of about 12nC.   The OPAMP cant actually slew fast enough outside the plateau region to drive 40mA into the gate, and worst case, assuming entering the plateau region at 0mA output current and ramping up to 40mA at the end of the plateau charging time, gives a duration of 0.6us during which time the voltage across the gate resistor, limited by the slew rate cant exceed 0.3V.  That means the resistor could be as low as 10 ohms and the peak current would still be under 40mA.

* The LM358 output current is internally limited and its short-circuit tolerant, subject to dissipation constraints.

* 100 ohms in series with the gate should be sufficient to prevent RF oscillation as the MOSFET passes through its linear region (though it would be advisable tp locate the resistor close to the gate pin.

0xfede's suggestion to add some series resistance to the LDR+trimmer potential divider to prevent damage if the trimmer is set to minimum and the LDR is brightly illuminated is good.  A total of 570 ohms would keep the LDR dissipation under 0.1W at up to 15V supply voltage.  It only needs one 680R resistor in series with the pot unless you need to be able to set the switching point for very bright illumination, in which case a pair of 330R resistors one in series with the LDR and the other with the pot would be preferable.  That should be safe for any ORP12 clone.  If you are using a miniature LDR, consult its datasheet for actual dissipation and current limits and recalculate the minimum resistance accordingly.

A 10K gate pull-down is pointless - the OPAMP has a push-pull output stage and no strobe pin so its output can never go Hi-Z.

Although the IRF830 is rated for repetitive avalanche operation, it would be advisable to add a reverse biassed diode across the main load terminals to shunt the back-EMF if long cables or an inductive load are ever connected.   
« Last Edit: April 27, 2018, 10:51:07 am by Ian.M »
 

Offline 0xfede

  • Regular Contributor
  • *
  • Posts: 201
  • Country: it
Re: Operational Amplifier driving MOSFET
« Reply #12 on: April 27, 2018, 09:44:27 am »
....
A 10K gate pull-down is pointless - the OPAMP has a push-pull output stage and no strobe bin so its output can never go Hi-Z.
....

Using my experience I can say that the LM358 has a much higher VOL when is not resistive loaded (especially when ambient temp is extremely low) to the ground hence the need for the 10K resistor.

Best,
0xfede
Semel in anno licet insanire.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13142
Re: Operational Amplifier driving MOSFET
« Reply #13 on: April 27, 2018, 10:05:44 am »
The LM358's Vol will be under 1V while sinking 1mA,  and the IRF830's minimum Vgs threshold voltage is 2V so there's plenty of safety margin for the off state even without a gate pulldown resistor.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20046
  • Country: gb
  • 0999
Re: Operational Amplifier driving MOSFET
« Reply #14 on: April 27, 2018, 10:18:39 am »
Yes 0xfede is mistaken. The only time this could be an issue is if the LM358 is sinking current.

The original poster should also consider a MOSFET more suited to 12V operation, than the IRF830, which is rated to 500V. A MOSFET rated to 50V or less will have a lower on resistance or lower gate charge, everything else being equal.
 
The following users thanked this post: Ian.M

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13142
Re: Operational Amplifier driving MOSFET
« Reply #15 on: April 27, 2018, 10:48:56 am »
While we are optimising the existing design, the potential divider biasing in+ of the spare OPAMP in the LM358 is pointless.  As its common mode input voltage range includes ground, the other half is already driving rail-to-rail, and the ON LED will be continuously drawing about 7mA, the tiny improvement in quiescent current consumption from biassing the spare OPAMP at Vcc/2 isn't worth the cost of the resistors.   Even without the LED, if quiescent current consumption was critical,  the spare OPAMP could be biased from the in+ of the active OPAMP, saving two resistors, with negligible effect on its operation.
 

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #16 on: April 27, 2018, 11:15:47 am »
Is there any relation between the ON LED and the spare opamp ?

Could you please be more explicit ?
« Last Edit: April 27, 2018, 11:24:55 am by mike_mike »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13142
Re: Operational Amplifier driving MOSFET
« Reply #17 on: April 27, 2018, 11:41:20 am »
Only that the LED is using more than an order of magnitude more current than the spare OPAMP, so any small improvement in quiescent current by biasing the spare OPAMP at Vcc/2 will have negligible effect on the circuit's total off-state current consumption.   If you needed to save power, using a high efficiency LED so you could reduce its current consumption to 1mA would be a good start.
 

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #18 on: April 27, 2018, 11:49:58 am »
Please confirm that the modifications to be made are:
1. add two resistor, each 330 ohms, one resistor in series with the LDR and one resistor in series with the 10k trimmer.
2. connect the non inverting input (pin 5) of the spare op amp to the pin 3 of the used op amp.

Beginner questions:
3. can I use IRF530 or IRF630 in the place of IRF830 ?
4. the mosfet gate resistor should be left at 100 ohms or it should be increased ?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13142
Re: Operational Amplifier driving MOSFET
« Reply #19 on: April 27, 2018, 12:50:25 pm »
1. Yes, that will work.  As an ORP12 in direct daylight can have a rather low resistance, if you need to distinguish between the lower light levels typical of artificial light and direct daylight, its better to add an equal resistance to the preset and the ORP12.  If you are only interested in lower light levels where the ORP12 resistance >1K,, a single 680R resistor in series with the preset would be sufficient

2. That would work, but it adds unnecessary complexity, to save at most a small fraction of a mA, and there's no good reason not to simply ground the spare OPAMP non-inverting input.   

3. *ANY* power N-MOSFET* with an adequate Vds voltage rating would work as long as its Vgs threshold voltage falls in the range 2V-6V.   If lower, it might not turn off reliably.  If higher, there would be insufficent gate drive to get the datasheet nominal Rds_on resistance.

4. There's no benefit in increasing it, but even if you made it several K the circuit would still function.

* Except modules, 'hocky pucks' and other extremely high current devices with far far too much gate capacitance vs the limited drive current available from the OPAMP
« Last Edit: April 27, 2018, 03:19:43 pm by Ian.M »
 

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #20 on: April 27, 2018, 02:14:59 pm »
Thanks for the reply.

I modified the R4 to 1.5K if Ian.M said that it will be OK to increase the R4 value.
I was advised (not on the forum) to add a capacitor (100nF) in paralel with the 10K trimmer, so I added that capacitor.

I attached the modified schematic. Please have a look at the schematic and tell me if it is OK.
« Last Edit: April 27, 2018, 02:38:26 pm by mike_mike »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13142
Re: Operational Amplifier driving MOSFET
« Reply #21 on: April 27, 2018, 03:46:54 pm »
C1 may give you more trouble than it prevents.   Without it both the +in and -in voltages are purely dependent on the resistance ratios  of their respective dividers and the instantaneous supply voltage.   With it, the -in voltage is delayed, which means that if the supply voltage transiently drops more than about 1.5V as the load switches on (and that 20W bulb has a cold resistance under 1 ohm so pulls a very large current spike at turn-on), the -in will be above the + in and it will switch back off resulting in oscillation.   If you *MUST* put a capacitor there , make it a lot smaller and distribute it evenly from the input pin to both supply rails e.g. 10nF to each rail from the pin.

1.5K will do for the gate resistor - it slows down the switching time to the order of 10us, which will increase the dissipation in the MOSFET, but its still well within the S.O.A for any of the MOSFETs you have listed, and unless it toggles rapidly and continuously (see issue in previous paragraph) the dissipation should be low enough that it wont need heatsinking.
 

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #22 on: April 27, 2018, 03:52:11 pm »
Thanks for the reply.
If I will remove that 100nF capacitor and I will use the circuit without it. It will be ok ?
« Last Edit: April 27, 2018, 04:04:47 pm by mike_mike »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13142
Re: Operational Amplifier driving MOSFET
« Reply #23 on: April 27, 2018, 04:39:54 pm »
Yes, as long as you keep the photocell wiring as short as possible.  If its mounted off-board use twisted pair.
 

Online mike_mikeTopic starter

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: ro
Re: Operational Amplifier driving MOSFET
« Reply #24 on: April 27, 2018, 04:42:26 pm »
I am planning to use for the photoresistor 1 meter long wires.
1. What should I do in this case ? It is sufficient to use twisted pair in this case ?
2. Or should I use a capacitor between GND and pin 2 and one capacitor between +12V and pin 2 ? 10 nF is sufficient ? Please confirm if I am correct.
« Last Edit: April 27, 2018, 05:17:10 pm by mike_mike »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf