LM317 Tracking Preregulator - Page 1
Forum section: electronics / beginners

author: mike_mike
author_rank: Super Contributor
timestamp: October 12, 2018, 04:31:48 pm
content: Hello,I want to build a power supply based on the attached schematic.I have a few questions regarding the attached schematic:1. How can I calculate the maximum input voltage ?2. What is the formula for calculating the value of R1 and R2 ?3. Where should I place the protection diodes ?4. I want to use a 30Vac transformer, a rectifier and filter capacitor for this project. I need output voltage between 1.25V and 25V.

author: iMo
author_rank: Super Contributor
timestamp: October 12, 2018, 05:09:29 pm
content: You want calculate the output voltage Vo1 of the first (the left one) 317 the standard way (imagine the Vo is the "gnd" for the R1 and R2 calculation) and add to it the Vo. Thus the Vin of the second 317 (the right one) will always be Vo1+Vo.The input voltage (against the gnd) of the first 317 (the left one) should be at least Vo1+Vo+3V.The input voltage (against the gnd) of the second 317 (the right one) should be at least Vo+3V.See the 317's datasheet (8.2.2) for how to calculate the resistors (the datasheet your schematics is from)..The max voltage difference between a single 317's input and output (Vi-Vo) is 40V. Apply accordingly when cascading them..8.2.1 says why the protection diodes are used. You may place them the same way.

author: mike_mike
author_rank: Super Contributor
timestamp: December 11, 2020, 12:27:48 pm
content: Hello, I built the attached schematic and I would like to test the power supply in order to make sure that it works ?I tested the power supply using the PSU Shorter schematic from here:https://www.eevblog.com/forum/beginners/lm324-power-supply-with-variable-voltage-and-current/msg2281502/#msg2281502(reply #71, R23=1k and mosfet is a 20A continuous drain current) and I got the attached screenshot on the oscilloscope. The yellow trace is the output of the PSU and the blue trace is the pulses on the G of the PSU shorter mosfet.The output voltage of the psu was set to 25V, and the transistors are TIP3055 and not MJE3055 (I don't have the TIP3055 library yet). D4 and D3 are P600K diodes. I used 4x transistors and 6A diodes because I also wanted to test the psu using a LM338 instead of LM317. But for start I will use LM317.Please have a look at the schematic and at the screenshot and tell me what you think.

author: mike_mike
author_rank: Super Contributor
timestamp: December 11, 2020, 05:35:10 pm
content: I tested the psu in LTSpice and on my table (the practical circuit) and I found that the max output voltage is about 27.25 V. But when I connect a load, even a 1K resistor, the voltage drops immediately to about 25V.I don't know why is this happening.Can someone please give me some information about this problem ?LE: May be due to the output capacitor ?I found that if I leave the 1k resistor connected on the output and then I connect a 1.71A load then the voltage drops from 25.84V to 25.66V in a few seconds.Please find attached the simulation file and the schematic.

author: dietert1
author_rank: Super Contributor
timestamp: December 11, 2020, 06:03:40 pm
content: The circuit before the voltage regulator has a constant current source of about 0.7V / 47R = 15 mA. Where does this current go without load? First into the zener and then into R10 and U2. Plus the supply current of your LM317. Should be enough to turn the whole thing on completely. What is the problem with adding that 1K load as part of the circuit?Or put a pnp transistor buffer between the zener and the output that can sink the 15 mA to ground.Regards, Dieter

author: mike_mike
author_rank: Super Contributor
timestamp: December 11, 2020, 07:51:02 pm
content: It should be fine ?

author: Unixon
author_rank: Frequent Contributor
timestamp: December 11, 2020, 07:53:00 pm
content: What's the point with preregulating one LM317 with another LM317?

author: mike_mike
author_rank: Super Contributor
timestamp: December 12, 2020, 09:09:07 am
content: I modified the schematic a little by adding a pnp transistor, Q8 and a resistor R13.Please have a look and tell me what you think ?I tested the circuit and it works a little better. Without load the output voltage is 25.81V and with 1.71A load the output voltage is 25.64V.

author: dietert1
author_rank: Super Contributor
timestamp: December 12, 2020, 10:09:15 am
content: That should work better. If R13 is meant as a protection it could be 4K7 or so. Times 15 mA divided by hfe = 100 that will give you an extra 1.5 V including Ube of Q8, so you can reduce the zener voltage by that amount. If you have a prototype, this should be easy to test. Maybe you want to reduce C4 to improve recovery after short . The circuit should work without C4.My idea of a preregulator would be keeping heat away from the built-in reference of the final LM317. That 2N3055 buildup looks like using a LM338,Regards, Dieter

author: mike_mike
author_rank: Super Contributor
timestamp: December 12, 2020, 10:28:18 am
content: Please find attached the screenshot from the output of the psu, with C4 removed 42_001, and with C4=10uF, 42_007.Please have a look and tell me if this screenshot is normally ?The recovery should not have been faster when testing without C4 ?

author: Unixon
author_rank: Frequent Contributor
timestamp: December 12, 2020, 01:53:19 pm
content: Quote from: dietert1 on December 12, 2020, 10:09:15 amThen wouldn't a tracking high frequency DC-DC and sufficient low pass filter be more efficient? Too much noise?

author: dietert1
author_rank: Super Contributor
timestamp: December 12, 2020, 03:29:51 pm
content: Recovery after short is also delayed by C7. With U2 at its center, that gives a time constant of 10 uF * 1K = 10 msec. This matches your measurements. Another limit would be the 100 uF output cap. Interesting that you discharge that cap from 25 V without current limit and without breakdown of the Mosfet switch.Yes, a switching preregulator is a good solution, yet a bit tricky to implement with low noise (requires RF work).Regards, Dieter

author: mike_mike
author_rank: Super Contributor
timestamp: December 12, 2020, 06:15:28 pm
content: I tested the psu from top to bottom, and I found some things that I cannot explain when the output voltage is 1.25V.Please have a look at the screenshots:1. on the output of the psu: 46_017.jpg2. on the preregulator output: 021.jpg3. on the preregulator base (B of MJE3055T): 025.jpgWith output voltage at 12.03V:1. on the preregulator: 012.jpg2. on the base of preregulator (B of MJE3055T): 015.jpgI used MJE3055T in the practical circuit. This is what I had in the box with components.Are those wave forms normal ?LE: I tested again but this time using an MJ3001 as darlington transistor.The results are:1. On the output of the preregulator: 47_000.2. On the B of MJ3001: 47_001.jpg.

author: mike_mike
author_rank: Super Contributor
timestamp: December 12, 2020, 08:05:30 pm
content: I tested again. This time with a new PSU shorter, in same configuration as before. Used a K1257 mosfet in the new PSU shorter. It looks like the previous PSU shorter had some problems.The output voltage of the psu was set to 1.25V, during the following tests:Results:1. Output of the psu: 48_0002. Output of the preregulator (input of LM317): 48_0013. B of the preregulator (B of BD243): 48_002.Please find attached the schematic and simulation file.Please have a look and tell me what you think ?

author: dietert1
author_rank: Super Contributor
timestamp: December 12, 2020, 09:16:17 pm
content: It looks normal. The voltage swing at the preregulator base is a little bigger than the output voltage swing but the difference is small. Emitter swing is still bigger, because preregulator Ube increases during short. As you measured at the LM317 input, you included voltage drop along the emitter resistors R4..R7.Without short headroom of the LM317 seems to be 7.6 - 1.3 = 6.3 V, so you could even use a 5.1 V zener and still have more than 4 V headroom.Regards, Dieter

author: mike_mike
author_rank: Super Contributor
timestamp: December 13, 2020, 06:13:49 pm
content: One more question: does the attached screenshots look normal or not ?1. on the output of psu: 000, 001 - is that some kind of instability ?2. on the input of LM317: 0023. on the B of BD: 003The schematic used for this test is schematic_v3 (attached). I used Q3=MJE3055T, Q4=Q5=TIP3055 and R6=R7=0.22. These transistors are mounted on different heatsink than the previous and they are soldered on a different pcb than the regulator pcb and the transistors are connected to the pcb using 3 wires (C,B,E).The output voltage was set to minimum (1.25V).Please have a look and tell me what you think ?

author: dietert1
author_rank: Super Contributor
timestamp: December 13, 2020, 07:34:52 pm
content: It is easy to build an oscillator in a circuit with more than 3 or 4 transistors. Just use some long wires between them and it happens. You seem to get 33 MHz.Sometimes one can solve it by try-and-error. You could add a 50 Ohm resistor into the base connection of Q3. Or a 1 nF capacitor from its base to its collector.Also i think that transistor should not be a MJE3055 but something smaller and faster, maybe a BD139.The LM137 may be involved if the short is behind some length of cable. Don't know whether there are stability specs for the current limiting mode.Regards, Dieter

author: mike_mike
author_rank: Super Contributor
timestamp: December 13, 2020, 08:43:37 pm
content: I changed Q3 by a BD139, I added a 47R resistor into the base of Q3 and a 1nF between base and collector of Q3 (schematic). Q4=Q5=TIP3055.1. on the output of the psu: 000, 0012. on the input of LM317: 002, 0033. on the C of Q2: 004, 0054. on the B of BD139: 006.jpgI hope it is ok now.Please have a look and tell me what you think ?

author: mike_mike
author_rank: Super Contributor
timestamp: December 14, 2020, 09:19:08 am
content: Regarding my previous reply (#17) is it ok that I installed both resistor (47R into B of BD139) and capacitor (1nF C-B of BD139) ?Or should I use only the resistor or the capacitor ?Please also have a look at the screenshots from reply #17 and tell me what you think ?

author: dietert1
author_rank: Super Contributor
timestamp: December 14, 2020, 09:46:42 am
content: Your measurements look perfect. The capacitor and resistor work on time scales of 1 nF * 47 Ohm = 47 nsec. I would leave it like it is, except an engineer would probably check stability with different combinations like 680 pF and 68 Ohm and the like to make sure you are in the middle of a "stability region".One more thing i could imagine is testing dynamic behavior with normal loads. Your shorter tests are very good, but most users of a lab power supply would like to know how a power supply behaves under normal load changes. You could test that using your shorter with a power resistor in between. Give it 100 mA of continuous load and turn on and off an extra 1 A, You could repeat the test at different output voltages using different resistors.I think a professional engineer would want a document similar to the LM317 datasheet, including description of test setups and their results. Making such a circuit into a product can be a lot of work.Regards, Dieter

author: mike_mike
author_rank: Super Contributor
timestamp: December 16, 2020, 02:11:53 pm
content: Tested with 620pF (I did not found 680pF in my capacitor box) and 68 ohm resistor and I found that it works ok. The screenshots looks the same as previous.Also tested with different loads and found the following results:1. At 1.25V output and 1 ohm load and 1k continuous load have not used the 100mA continuous load, instead used 1k resistor as continuous load:a. on the output of psu: 024.jpgb. on the input of LM317: 025c. on C of Q2: 030d. on B of Q3: 0312. At 12V output, 10R load and 1k continuous load:a. on the output of psu: 036b. on the input of LM317: 033c. on C of Q2: 034d. on B of Q3: 035In some of the screenshots, I couldn't find the waveform.Please have a look at the screenshots and tell me what you think ?

author: mike_mike
author_rank: Super Contributor
timestamp: December 16, 2020, 02:14:17 pm
content: 3. At 26.87V output, 10R load and 1k continuous load:a. on the output of psu: 037b. on the input of LM317: 038, 039c. on C of Q2: 040d. on B of Q3: 041In some of the screenshots, I couldn't find the waveform. Probably I should go to lower voltage/div, but I think the scope has some limitations. Maybe using AC coupling and AC trigger instead of DC should be better ?If I will redesign a little bit the PCB by using thermal reliefs instead of direct connect, then is it possible to appear instability ?The schematic for reply #20 and reply #21 tests is from reply #17, with the modification that I used BD241B instead of BD139, because BD139 needs to be mounted with heatsink at 180* in comparison with BD241B which was fitting perfectly on the heatsink. Also, Q4=Q5=TIP3055.LE: added layout in Eagle.Please have a look at the screenshots and tell me what you think ?

author: dietert1
author_rank: Super Contributor
timestamp: December 16, 2020, 09:02:45 pm
content: For me it's surprising you get 2.7 A from the LM317 (25 V with 10 Ohm load resistor), but it appears to work well. The 0.8 V drop on the preregulator output is much less than the headroom.Concerning the trigger: If using the power supply shorter with a resistor, you can probe its output (mosfet drain) on the second scope channel to get the trigger and be sure you are not missing something.Your board seems to implement a different circuit than the previous schematic. Where is the second transistor of the current source?Regards, Dieter

author: mike_mike
author_rank: Super Contributor
timestamp: December 16, 2020, 09:36:43 pm
content: Quote from: dietert1 on December 16, 2020, 09:02:45 pmQ1 and Q2 are the transistors of the current source. They are located to the left side of C2 and above C1. (Screenshot with Q1 and Q2 marked in a red area).Please find attached the schematic and layout in Eagle. I modified the reference designators to be the same in both schematics (reply #17 and Eagle).C10 and R4 have footprints on the main pcb, but are not installed. They are installed only on the transistor pcb which is mounted on the heatsink. Q2 and Q8 are TO-220 on the layout, but I installed TO-126 (BD140) transistors.I hope it is correct now ... please have a look and tell me what you think.

author: mike_mike
author_rank: Super Contributor
timestamp: December 26, 2020, 11:28:00 pm
content: Can you please let me know if it's important to connect the 2k2 resistor (R8) between the base and the emitter of BD139 or it can also be connected between the other end of the 47R resistor (R5) and emitter of BD139 ?

author: dietert1
author_rank: Super Contributor
timestamp: December 27, 2020, 08:07:08 am
content: What is your idea using the resistor R8? I think the circuit can work very well without. It just takes a small, more or less constant 0.3 mA of the 15 mA constant current source away. That small current can as well go into the zener. Also it doesn't matter on which terminal of R5 it is connected.Regards, Dieter

author: mike_mike
author_rank: Super Contributor
timestamp: December 27, 2020, 10:41:30 pm
content: Quote from: dietert1 on December 27, 2020, 08:07:08 amR8 is for simulating an real Darlington transistor (for example MJ3001 schematic in attachment).If changing 6v8 with 5v1 or 5v6 Zener (as you previously said), does the power supply require testing with the switch load and scope again ?

author: dietert1
author_rank: Super Contributor
timestamp: December 27, 2020, 11:32:24 pm
content: You can put the 5.1 V Zener, without further testing.LM317 headroom will be 5.1 V + 0.7 V (Ube Q8) - 1.4 V (Ube Q3+Q4) - Imax * 0.11 Ohm (R6 R7). Short circuit current of your LM317 seemed to be 2.6 A, if we use that for Imax the result is 4.11 V. LM317 datasheet recommends 3 V < Vi - Vo , so 4 V is safe. But i would not go lower than that, because all parts have their tolerances including the calculation (more an estimate).Regards, Dieter

author: mike_mike
author_rank: Super Contributor
timestamp: December 28, 2020, 08:50:49 pm
content: Regarding the R2, Q1 and Q2, does Q1 needs a base resistor to limit the current which flows into Q1's base ?

author: dietert1
author_rank: Super Contributor
timestamp: December 28, 2020, 09:29:22 pm
content: No, it doesn't, the transistor Q1 can help itself. Q2 works as an emitter follower for the collector of Q1, so there will be negative feedback from the collector of Q1 to the base of Q1. The circuit is meant to sense the voltage over R2 and to keep it near constant, such as to generate a constant current out of the collector of Q2.In an ideal world this current source should have one or two volts of headroom above the main power input V1. In the real world it will take its headroom from V1, so V1 needs to be 1 V more and the heatsink of Q4 Q5 a little bigger.Regards, Dieter

author: mike_mike
author_rank: Super Contributor
timestamp: December 19, 2021, 02:39:20 pm
content: Hi @dietert1, I just added to my PSU a overload indicator, using the attached schematic.Please have a look at the schematic and tell me what you think.Are any other modifications needed ?1. DS0025, 0026 = with probe on the output (CH1) and CH2 on the PSU shorter pulse generator.2. DS0027 = CH1 on the output of the PSU and CH2 on the PSU shorter pulse generator.LE: I found the circuit on the internet, and I just connected it into my PSU.

author: mike_mike
author_rank: Super Contributor
timestamp: July 02, 2023, 12:02:22 pm
content: It is possible to add a overload indicator for this power supply using an led and a few additional components ?I added a schematic in my previous reply, is it a good starting point ?Is there any other possibility ?

author: dietert1
author_rank: Super Contributor
timestamp: July 02, 2023, 12:52:31 pm
content: T2 looks at the 1.25 V reference voltage of the second LM317 in order to know whether it is working normal or in current and/or temperature limited mode. This should give you a useful warning. It also works with a short.Probably the circuit won't indicate a slight overload with very small deviation of the output voltage. R7 tunes the sensitivity, but the sensitivity also depends on the optocoupler (temperature and age).Regards, Dieter