Electronics > Projects, Designs, and Technical Stuff
LM317 control by PWM
Yansi:
This is not a precision circuit in any way shape or form, and if there was a requirement for the output to go from 0 to 30V. Adding a negative supply, or other hacks (the pre-load current sink) for it to work at least close to zero, is just to much fucking around for nothing, in my opinion.
A simple NPN darlington cascade would be more than adequate, with some form of fold-back current limiting circuit (still nothing more, than a TO220 power darlington and a small signal NPN to handle the current limiting).
Thermal protection being the most difficult difficult of these to implement (you've got me on that one), but a thermal cutoff switch (that mechanical one) would probably do more than enough in that case.
However PWM indicates a presence of an MCU, so simple temperature sensing is a matter of just an NTC and a couple of resistors. Not ideal, but simple and effective also.
SiliconWizard:
--- Quote from: Zero999 on February 01, 2019, 09:39:08 pm ---
--- Quote from: SiliconWizard on February 01, 2019, 06:21:25 pm ---I would get rid of the -15V supply and select an appropriate opamp. An LM358 would kinda work, but it doesn't have nulling offset pins (if that matters, since you'd probably get only a few mV offset), and whereas its output can get down to almost ground, it won't get high enough - due to the current it will have to sink - to get your full output voltage range here IMO.
--- End quote ---
You've got that backwards. The LM358 won't do without a negative supply because it can't sink enough current with a low enough saturation voltage for 1.25V out. The higher end of the voltage range is no problem.
--- End quote ---
Well, yeah. The sink current (as opposed to source) is going to have the opposite effect. My bad.
That said, I think an LM358 can sink 5mA without much problem. Its output should be able to get as low as a few tens of mV, and I think it will still get further away than this from the positive rail on the other end. From its datasheet, it's given for a typical 8mA of max current sink. Would have to be tested, but simulation shows that the output can go as low as ~30mV for 5mA of current sink, and can't get higher than the positive rail minus ~1.2V, so there's still this asymetry (of course for higher currents, the output range would get shifted up). Looking at an LM317 datasheet, its reference voltage is specified between 1.2V and 1.3V, so a minimum of 50mV output for the opamp is not really going to make much of a difference actually. If the OP really wants 1.25V min voltage output to a few mV of accuracy, then clearly this topology is not for them. Given the proposed schematic and their questions, I doubt 50mV or 100mV from 1.25V will make any difference! But if it did, I guess an LM317 could go lower than its reference voltage by setting a negative voltage on its ADJ pin, but not 100% sure it would not cause issues. In this case, a slightly negative supply voltage (-15V would certainly not be needed) should allow to do this.
(As to the higher end, there is a lot of headroom here actually, if the opamp is powered by the input voltage of the circuit, given that the LM317 has around 2.5V of dropout voltage and there is an extra 1.25V, so that's 3.75V of headroom. So yes the higher end shouldn't be a concern here anyway.)
The OP's schematic's idea was actually given here: https://www.edn.com/design/analog/4363990/Control-an-LM317T-with-a-PWM-signal
There are of course a lot of ways to do better, but as far as I've gotten it, the OP simply wanted something that "works" before going any further and chasing after a few mV... ::)
And in that case, it seems to just be a matter of using a more appropriate opamp than the TL081.
Zero999:
--- Quote from: SiliconWizard on February 02, 2019, 03:27:45 am ---
--- Quote from: Zero999 on February 01, 2019, 09:39:08 pm ---
--- Quote from: SiliconWizard on February 01, 2019, 06:21:25 pm ---I would get rid of the -15V supply and select an appropriate opamp. An LM358 would kinda work, but it doesn't have nulling offset pins (if that matters, since you'd probably get only a few mV offset), and whereas its output can get down to almost ground, it won't get high enough - due to the current it will have to sink - to get your full output voltage range here IMO.
--- End quote ---
You've got that backwards. The LM358 won't do without a negative supply because it can't sink enough current with a low enough saturation voltage for 1.25V out. The higher end of the voltage range is no problem.
--- End quote ---
Well, yeah. The sink current (as opposed to source) is going to have the opposite effect. My bad.
That said, I think an LM358 can sink 5mA without much problem. Its output should be able to get as low as a few tens of mV, and I think it will still get further away than this from the positive rail on the other end. From its datasheet, it's given for a typical 8mA of max current sink. Would have to be tested, but simulation shows that the output can go as low as ~30mV for 5mA of current sink, and can't get higher than the positive rail minus ~1.2V, so there's still this asymetry (of course for higher currents, the output range would get shifted up). Looking at an LM317 datasheet, its reference voltage is specified between 1.2V and 1.3V, so a minimum of 50mV output for the opamp is not really going to make much of a difference actually. If the OP really wants 1.25V min voltage output to a few mV of accuracy, then clearly this topology is not for them. Given the proposed schematic and their questions, I doubt 50mV or 100mV from 1.25V will make any difference! But if it did, I guess an LM317 could go lower than its reference voltage by setting a negative voltage on its ADJ pin, but not 100% sure it would not cause issues. In this case, a slightly negative supply voltage (-15V would certainly not be needed) should allow to do this.
--- End quote ---
The simulator you've used doesn't model the output stage correctly. Never rely on the manufacturer's SPICE models to accurately show things such as output voltage saturation, supply current and input common mode range. They're more often than not wrong. The only way to test this is to build it!
The LM358 doesn't have a proper single supply output stage. It has 50µA current sink, consisting of a current mirror, connected to an ordinary push-pull stage, with a PNP low side. As long as the output isn't sinking any more than 5µA, the saturation voltage will be fairly low and there's a huge ramp up, as the current exceeds 10µA.
This is all on the datasheet.
http://www.ti.com/lit/ds/symlink/lm158.pdf
In short, the LM358 is not designed to sink any current, with its output at the negative rail
Yansi:
Once more - using a NPN darlington output stage instead of 317 solves all of these hassles. Only current supplied, not needed to be sunk!
Zero999:
--- Quote from: Yansi on February 02, 2019, 09:58:43 am ---Once more - using a NPN darlington output stage instead of 317 solves all of these hassles. Only current supplied, not needed to be sunk!
--- End quote ---
That's all well, until it overheats, resulting in magic smoke. It also will have a higher drop out voltage than the LM317, as the saturation voltage of the op-amp's output stage will add to Darlington pair.
Just use the LM317 and current sink, to provide the minimum load. It's not complicated.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version