Oscillations with LM358 electronic load - Page 1
Forum section: electronics / beginners

author: salami738
author_rank: Contributor
timestamp: July 13, 2019, 01:43:17 pm
content: Hi,i build an electronic load based on the schematics from:https://www.eevblog.com/forum/beginners/lm358-in-consant-current-circuit-problem/My changes are:- digital controlled by MCP4725 12 Bit DAC / Arduino- The power stage is multiplied 3 times in parallel- mosfet: STP80NF55L-06 (datasheet:https://www.st.com/resource/en/datasheet/stp80nf55l-06.pdf)SchematicThe problem is, that the circuit becomes unstable above approximately 1600mA current (~530mA per mosfet).I checked the load current fluctuation with my oscilloscope and got this results:500mA:1000mA:1600mA:2100mA:3000mA:What is the problem with this schematic? How is this fixable? Thanks for your help.

author: exe
author_rank: Unknown
timestamp: July 13, 2019, 02:13:45 pm
content: It can be due to power supply you are loading: two control loops counteract each other. Try increasing compensation cap, or use, e.g., a battery to check if the problem is in load, not in power supply.

author: MarkF
author_rank: Super Contributor
timestamp: July 13, 2019, 02:48:50 pm
content: Try changing C3 to 10nF instead of 1nF.I wasn't looking for switching speed in my eLoad so I used 10nF (My opamp and MOSFET are also different).See if that stops the oscillation. Then, back it off from there. I expect you can go as low as 4nF.Also see:

author: Kleinstein
author_rank: Super Contributor
timestamp: July 13, 2019, 02:55:50 pm
content: It may take an RC series element (e.g some 10 Ohms and 1 µF) for damping the output.The output impedance of the constant current circuit tends to look like a capacitor. The output impedance if the usual simple voltage regulator looks a lot like an inductor. So the two together tend to form a resonant circuit and if one of the two has a little more than the ideal 90 degree phase shift they can oscillate. It is sometimes hard to tell which of the two is at fault.The LM358 has an output stage (class B) with quite some cross over distortion this can be a problem for stability, is in the trun over point it adds delay and thus destabilizing phase shift. One could try a different OP, like TLC272. Also a resistor from the OPs output to ground to add some load to the OP may help.

author: salami738
author_rank: Contributor
timestamp: July 13, 2019, 07:15:27 pm
content: Quote from: exe on July 13, 2019, 02:13:45 pmHi, i checked the electronic load with a 18650 cell as power supply and got similar results. So it is not a control loop problem.

author: salami738
author_rank: Contributor
timestamp: July 13, 2019, 07:39:49 pm
content: Quote from: MarkF on July 13, 2019, 02:48:50 pmI tried with a additional 10nF in parallel with the existing 1nF, so I have now 11nF. But the problem stays the same.

author: salami738
author_rank: Contributor
timestamp: July 13, 2019, 07:46:31 pm
content: Quote from: Kleinstein on July 13, 2019, 02:55:50 pmWhere should I add the RC snubber? Between R3 and M1?Which size of resistor should I use to pre load the OpAmp output?

author: floobydust
author_rank: Super Contributor
timestamp: July 13, 2019, 07:55:36 pm
content: Three mosfets and three R3's? I would try lower than 200R due to the high 3x 5nFCgsCiss, at 50kHz the phase-shift is there.You have single-point grounding where R5 and R2,C1 are grounded together at one point?I don't see cross-over distortion as a problem because the LM358 is on a single supply.

author: exe
author_rank: Unknown
timestamp: July 13, 2019, 08:01:20 pm
content: Wait, you have three mosfets driven from one opamp? If so, I suggest drive them individually. If you drive fets independently, does it oscillate when you use only one channel?As of stability, try1) increasing the cap2) lower R33) add resistor from opamp output to ground (100-2k, experiment here).

author: iMo
author_rank: Super Contributor
timestamp: July 13, 2019, 10:20:30 pm
content: The OP has 3 "modules" (module= opamp + fet) wired in parallel, all driven from 1 DAC output (btw 5k is the recommended load of the DAC).

author: MarkF
author_rank: Super Contributor
timestamp: July 13, 2019, 10:55:56 pm
content: The only thing more I can suggest is trying a different Op-amp or MOSFET.Also, have a look at what @Jay_Diddy_B did for more ideas:https://www.eevblog.com/forum/projects/dynamic-electronic-load-project/Notice the 2.2Ω 2.2uF RC damping circuit on his output.

author: MarkF
author_rank: Super Contributor
timestamp: July 13, 2019, 11:25:00 pm
content: I just noticed where you indicate you have the scope probes.You can NOT put your scope ground where you show it.The scope GND should be on the circuit GND and the scope probe on the MOSFET source or drain.

author: salami738
author_rank: Contributor
timestamp: July 14, 2019, 03:25:36 pm
content: Quote from: MarkF on July 13, 2019, 11:25:00 pmHi, is this also a problem with galvanically isolated power supplies? The circuit under test was driven by a 12V wall adapter (230V).I also tested the circuit with a battery driven oscilloscope and got the same result (JYETech DSO 150)

author: Kleinstein
author_rank: Super Contributor
timestamp: July 14, 2019, 03:56:27 pm
content: The scope and thus PE connection would not be a real problem with an isolated supply (for the constant current circuit and the DUT). However even an isolated supply adds some capacitance that would influence the circuit (though not necessary a bad thing). With a SMPS there can also be common mode current that is injected.Usually it should be enough to watch the voltage over R5.

author: salami738
author_rank: Contributor
timestamp: July 14, 2019, 06:16:28 pm
content: Quote from: exe on July 13, 2019, 08:01:20 pm1) which capacitor?2) will try that later - i lowered R3 to 100 Ohms and got worse results3) I tried a 910 Ohm from opamp output to ground. now I have oscillations way earlier at >= 300mA.

author: Kleinstein
author_rank: Super Contributor
timestamp: July 14, 2019, 07:18:53 pm
content: One could lower R3 a little, but should not go much below some 100 Ohms.The capacitor C3 would be the one to make a little lager. Alternatively R4 could be a little larger (e.g. 10 K or 22 K). This slow down the loop - with such a high capacitance MOSFET the loop needs to be slower.The FET given is not a good choice: it has a lot of gate capacitance and likely a poor DC SOA. So it would be save for low voltage (e.g. < 10 V) only.There is a SOA curve with DC in the Datasheet, but it's not credibly - it's probably just calculated from P_tot and the transient heat capacity. This type of SOA curve ignores thermal instability and thus does not help.A more suitable MOSFET would be IRFP250 or IRF840. More like much higher voltage rating and careful with more modern types (with some exceptions for super junction Fets).

author: vk6zgo
author_rank: Super Contributor
timestamp: July 15, 2019, 01:27:24 am
content: 358s do rather like to oscillate, especially if they have a reactive load like C3.Try putting a 220resistor in series between the device's output pin & C3.We had a similar circuit in a piece of RF gear in which the 358 would oscillate at around 80kHz at some settings.

author: salami738
author_rank: Contributor
timestamp: July 15, 2019, 05:21:25 am
content: Quote from: Kleinstein on July 14, 2019, 07:18:53 pmHi, thanks for this detailled information!I didn't know, that the DC SOA can be tricky, I only saw that there was a DC SOA and ordered some MOSFETsAt the moment i do not have a IRFP250 or IRF840 lying around, but will order those in the future.I will try the following mosfets I have in my stock pile:- STW13NK60Z- IRFP250MWill post an update later on!

author: Kleinstein
author_rank: Super Contributor
timestamp: July 15, 2019, 06:51:23 pm
content: The STW13NK60Z looks good, at least for no too high voltages (e.g. < 50 V), though the SAO curve may also be the same useless theoretical one ignoring the important part. The trans-conductance is much lower and thus less stability problem expected.Gate capacitance is also smaller, which helps.

author: salami738
author_rank: Contributor
timestamp: July 16, 2019, 09:55:43 am
content: Quote from: Kleinstein on July 14, 2019, 07:18:53 pmHi, I tested a IRFP250M (TO247) and it works like a charm! Thanks for the recommendations.The problem is, my pcb is suited for TO220 only. Will the IRF530 be suited (https://www.reichelt.de/index.html?ACTION=7&LA=3&OPEN=0&INDEX=0&FILENAME=A100%2FCKIRF530_DATA_EN.pdf)?Maybe I will redisign the pcb because the TO247 can dissipate more power, which is good.

author: salami738
author_rank: Contributor
timestamp: July 16, 2019, 09:57:00 am
content: Thanks to all contributors, you have helped me a lot.I will post an updated schematic, when it works!

author: Kleinstein
author_rank: Super Contributor
timestamp: July 16, 2019, 10:04:39 am
content: The IRF530 should also work. However it's still a relatively low voltage FET with high trans-conductance and may thus show thermal instability at higher voltage. So it's likely OK up to maybe 20 V or so. At higher voltage one may have to reduce the power limit to be on the safe side.Estimating the real SOA is difficult. There are some MOSFETs extra specified / designed for linear operation, but these tend to be expensive.

author: salami738
author_rank: Contributor
timestamp: July 20, 2019, 03:02:03 pm
content: Current schematic:Features:- cheap, many components from aliexpress (main mosfet costs around 1$ at lcsc)- can be scaled by adding more "load units" (dashed line)Problems:- slight current drift over time (about -1% below 500mA and around +/-0,5% above)- initial set point (V1) is not stable. For 1A of constant current, one needs around 1,101V to 1,114 - +/- 1,2%)I think I will counter the open problems with software.