2
\$\begingroup\$

I am trying to build a single LM317 power supply, with current limiting using a differential opamp and potentiometers.

I've came up with this (see schematic) and have built it on a breadboard but the current limiting (1k pot, lower left) is "glitchy."

  • Sometimes it will not limit at very low load resistor values (~1 ohm) but when the load resistor gets bigger it starts working.
  • Sometimes when the load resistor comes back from a high value to a low value (while in current limiting,) the current limiting breaks down and it allows a large current to flow.
  • A lot of the times I can't adjust the current below ~10mA no matter the set voltage. I am not sure if it ever worked on the breadboard, but it works in the simulator. I can set very low current in the simulator eg. 10uA. I know the LM317 needs a few mA flowing out of the pin for it to regulate but it dosen't even want to go below 10mA in a lot of load/voltage scenarios.
  • Other glitches.

I used:

  • LM224n
  • LM317t
  • BC547 (NPN)
  • Capacitors 100nF ceramic and 10uF electrolytic
  • Resistors 5% or 1% (not final)
  • 6x AA cells for the +9V supply
  • 2x AA cells for 3.3V (reversed for negative rail)
  • Diodes for the voltage reference (not final)

Schematic:

psu schematic lm317 lm224

What am I doing wrong?

Does this circuit makes sense?

Circuit:

breadborad photo1

\$\endgroup\$
11
  • \$\begingroup\$ Explain your voltage buffer on the right in more detail. It looks to me as though your 1 nF is essentially in parallel to your 100 nF (with a tiny ESR added?) Is that your read, as well, and your intention? I'm guessing you wanted a slew-rate limited adjustment of voltage. But I'd like to know your thinking in more detail. You have two controls interacting at the same site and I don't want to look at the left side until I've gathered the right, in detail. (Others may be faster at their uptake. So forgive me.) \$\endgroup\$
    – jonk
    Commented Apr 10, 2022 at 19:23
  • \$\begingroup\$ The ESR is just for the simulator (no resistance capacitor loop error). I have detected some high frequency ripple in the voltage control circuit, in the simulation and wanted to fix that. (~50kHz if i measured correctly) And yes slower slew rate, at least for the simulation. \$\endgroup\$
    – user296633
    Commented Apr 10, 2022 at 19:29
  • \$\begingroup\$ And you want your voltage sense/potentiometer set resistor divider chain tied back to the input voltage, after the current limit resistor that is also under control, and not the output voltage that the load sees? \$\endgroup\$
    – jonk
    Commented Apr 10, 2022 at 19:33
  • \$\begingroup\$ That was the first setup, but i wanted forced voltage via adjust pin, may change that if i need to. \$\endgroup\$
    – user296633
    Commented Apr 10, 2022 at 19:35
  • \$\begingroup\$ I don't see why you'd go there, at all, myself. I am frankly confused by that choice. So I'll let others have at this unless you write something that allows me to understand the thinking or I find a way to understand it on my own. (Which I doubt, as it just doesn't make sense to me.) Also, what's the minimum current that the LM317 you are using requires in order to remain in control?? \$\endgroup\$
    – jonk
    Commented Apr 10, 2022 at 19:36

1 Answer 1

0
\$\begingroup\$

Your current limit loop may be unstable in practice. There is no (little) loop compensation in it, and you have very high gain (comparator). A simple simulation may not show this instability.

Also, the LM224 cannot pull down closer than ~ 0.7 V to its GND, so it likely can't fully turn off the NPN. Add a diode in series with its emitter to effectively increase its VBE; you may even eliminate that comparator and drive directly with the difference amplifier (perhaps increase its gain).

\$\endgroup\$
2
  • \$\begingroup\$ But the simulation shows -3v on the output of the comp. , its "Vcc -" i connected to -3v, so it will pull below 0,7? or im reading the datasheet wrong? How would you compensate the "small" loop? \$\endgroup\$
    – user296633
    Commented Apr 10, 2022 at 20:08
  • \$\begingroup\$ You have -3.3V for the neg. supply; it has a PNP output device, so can't actively pulldown well within 0.7 V of this (e.g. below -2.6 V). I don't know what simulator you are using, but it may not be accurate in this condition. Try adding a diode in series; or a pull-down resistor (maybe 1k from the LM224's output to -3.3V). \$\endgroup\$
    – jp314
    Commented Apr 10, 2022 at 20:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.