LM317 "Labratory" power supply. - Page 1
Forum section: electronics / projects

author: Unordung
author_rank: Contributor
timestamp: September 02, 2017, 12:48:39 pm
content: Hey guys,I am going to build a basic benchtop adjustable power supply for low power applications under 1amp and instantly thought of the LM317, as I specifically want a linear regulator over a switchmode.I downloaded the datasheet for the reg and discovered the datasheet already had a circuit in it fitting the purpose.http://docs-asia.electrocomponents.com/webdocs/14e1/0900766b814e17d7.pdfDatasheet page 8Q1 and Q2 seem like obsolete parts but I think they can easily be substituted.My question is, is the circuit actually practical? If you have the 35v on the input and wind the output to lets say 5V whilst drawing a current of 1A you need to dissipate 30W of heat in a To-220 package.That will require a fairly significant heatsink and decent airflow wouldn't it? Does anyone have any suggestions as to what heatsink would be suitable?Another question would be whats an acceptable way to get the -10v?My input would be a transformer stepping mains down, going into FWB rectifier and smoothing cap etc. Would I just make the - from the FWB a digital ground and tap the neg halfwave into a lm7909 voltage reg?***EDIT****I'm an idiot of course you can't make the ground a digital ground and then try and make the same potential - voltages.......What is the best way to get neg voltages from this system? Would I need another winding on my transformer or is their some tricky circuit which would save the day? Given the low current I guess I could just use 2 half waves and smooth the positive and negative rails.......I like the idea of having the bench supply going down to 0v as it would seem more polished...Thanks in advance.

author: Ian.M
author_rank: Super Contributor
timestamp: September 02, 2017, 01:05:13 pm
content: You don't need much negative bias current so a charge pump driven by a capacitor from one of the bridge rectifier's AC terminals, and feeding a 7909 regulator will do. You can use BJT current sinks in place of the obscure MOSFETs.However its still a really crappy circuit with two LM317 dropout voltage drops + the drop across Rsc limiting the maximum output voltage and wasting power and isn't in any sense 'Lab Grade'. You'd do better to look at LM723 based PSUs, though any linear 'Lab' supply is going to need a *BIG* heatsink and possibly fan cooling.

author: Unordung
author_rank: Contributor
timestamp: September 02, 2017, 01:13:55 pm
content: This is more a learning experience than it is something which will receive regular use. I have had a few successful attempts using the LM2576 and want to try my hand at the supposedly "Easier" linear style.Quote from: Ian.M on September 02, 2017, 01:05:13 pmThanking you for the advise, I will do some research on the charge pump and see what I can come up with. I will also look into the LM723 I was kind of wanting to use the LM317 becuase I have them. However I'm always happy to get shiny new things to play with.=D

author: fcb
author_rank: Super Contributor
timestamp: September 02, 2017, 01:28:01 pm
content: Most variable linear power-supplies will have a relay that kicks in to rearrange the windings on the transformer. I've a couple of 0-30v linears that do this around 15v. This will lower your dissipation somewhat, although will increase your complexity.Q1/2 are essentially constant current sinks, necessary if you want to operate down to 0V. You can replace these easily with transistor based constant current sources. The D1/2 and D3/4 pairs limit the Adj pins to approx -1.2V, keeping your output's lowest point to approx 0V. You could even use resistor to the -10V rail.If you haven't got a -10V lying around then you could make something like it with a 555 timer or an ICL7660 charge pump. It needs to be low-noise, so i'd post-regulate it with a 337 or even a 7905. It also doesn't have to be -10V, just needs to be negative enough for your CCS or bias arrangment.You can work out a close approximation for the current needed:Ignoring the Iadj current from LM317(1), D1/D2 limit the voltage across the 1K to 1.2mA, so you'll need a drop more than that, perhaps run it at 2mA.Again, ignoring Iadj current from LM317(2), the 240R will have 5mA flowing through it, so perhaps run it at 6mA. Both together might mean you need at least a 10mA negative rail. I'd probably just build this with a 555 timer running off a 7812 (or 317) on the main DC bus, then smooth it with a 7905 (or 337).

author: Ian.M
author_rank: Super Contributor
timestamp: September 02, 2017, 01:41:24 pm
content: No need for a charge pump chip or 555 if you are feeding it from an ordinary transformer and bridge rectifier. The -10V rail sinks under 30mA. (seehttps://www.eevblog.com/forum/beginners/lm317-variable-power-supply-question/msg687356/#msg687356/where I discussed replacing those FETs and their typical Idss).Assuming 32V peak AC @50Hz, 30mA is 6 milliCoulombs per cycle. You need 12V for the 7909, so can tolerate a 20V max drop across the coupling capacitor from the bridge AC terminal to the charge pump diode junction. That gives you a capacitor value of 30uF. Due to the coarse tolerance of electrolytics, 47uF or even 68uF would be safer.

author: cellularmitosis
author_rank: Unknown
timestamp: September 02, 2017, 03:39:38 pm
content: Hello Unordung,I built an LM317 supply which was a bit more crude: it can't go below +1.25V, and the current limit is one of 6 selectable discrete steps (see page 2 of the schematic). The circuit might interest you as a point of comparison.Still, these things are cheap and handy. I ordered some boards years ago, found a deal on some discontinued 17V 1A wall-warts from Jameco, assembled three of the boards, and I use them all the time now.https://github.com/pepaslabs/DualLM317BenchSupplyhttps://github.com/pepaslabs/DualLM317BenchSupply/blob/master/DualLM317BenchSupply_schematic.pdfSince you are going with a linear regulator, I'm assuming you'll want the negative rail to be low noise as well (the LM317 doesn't have the switching noise of switch-mode regulators). I had a go at using an ICL7660 with filters to create a low-noise negative rail:https://www.eevblog.com/forum/projects/an-evening-with-the-icl7660I also built a little board for it:https://www.eevblog.com/forum/projects/an-evening-with-the-icl7660/msg1213367/#msg1213367https://github.com/pepaslabs/NegativeRailHowever, the easiest negative rail would definitely be a second winding on the transformer, or just using a second wall-wart.

author: cellularmitosis
author_rank: Unknown
timestamp: September 02, 2017, 03:51:19 pm
content: Ha! They still have those same "clearance" wall-warts in stock, like 5 years later$7 for 17V @ 0.9A, not bad.http://www.jameco.com/z/DV-1790-Dee-Van-Enterprise-Usa-Power-Supply-Wall-Adapter-Transformer-Unregulated-Linear-15-3-Watt-17VDC-900Ma-2-5mmx5-5mmf2-6-Black-UL-CSA_2081713.htmlBeware that the plug is a 2.5x5.55m, rather than the more common 2.1x5.5mm.

author: Zero999
author_rank: Super Contributor
timestamp: September 02, 2017, 03:57:41 pm
content: A few circuits I've posted elsewhere which might be helpful:Generating a negative voltage, using a charge pump on the rectifier.Getting exactly 0V from the LM317, using an op-amp differential amplifier to subtract the LM317's 1.25V reference from its output.https://www.eevblog.com/forum/beginners/zero-volts-from-a-lm-317/msg110760/#msg110760Using a transistor to switch to a higher voltage tap on a transformer, when the output voltage exceeds a certain voltage. R1 is probably a bit on the low side. Tr1 could be a MOSFET with a clamping zener on the gate and D2 and the unlabelled transistor could be replaced with the TL431 for greater accuracy.https://www.eevblog.com/forum/chat/liniar-adjustable-power-supply/msg129099/#msg129099

author: b_force
author_rank: Super Contributor
timestamp: September 02, 2017, 04:05:33 pm
content: You also see that in professional linear supplies.They simply wind a custom transformer with multiple outputs.That way you don't piss away so much heat (which also means the efficiency is a bit higher).Btw, it's not so expensive to order a bunch of custom transformers.In some cases they already are happy to deliver around 50pcs or so.(with much lower prices than you would see in an online shop)Maybe a good idea for a group buy one day?

author: cellularmitosis
author_rank: Unknown
timestamp: September 02, 2017, 04:13:00 pm
content: Quote from: b_force on September 02, 2017, 04:05:33 pmI've seen that done on the CSI1802x, as an example:https://www.circuitspecialists.com/bench-power-supply-csi1802x.htmlNot a bad supply if you hack some 10-turn pots into it:http://bit.ly/2wwCCQzQuoteVery interesting! Where would you order these? Alibaba?

author: b_force
author_rank: Super Contributor
timestamp: September 02, 2017, 04:17:02 pm
content: Quote from: cellularmitosis on September 02, 2017, 04:13:00 pmDepends where you live.If in EU, I would suggest companies in Poland (for some reason they can produce very decent transformers for cheap).Otherwise I personally still have some contact information from some manufactures in China.Another option is to use a variac (which is wise to have anyway) in combination with another transformer.Simply track to voltage from the variac.This works great for high power supplies (for audio amplifiers or so).

author: David Hess
author_rank: Super Contributor
timestamp: September 02, 2017, 06:49:07 pm
content: Quote from: Unordung on September 02, 2017, 12:48:39 pmQ1 and Q2 serve as constant current sinks and could be replaced with newer JFETs or depletion mode MOSFETs. Another solution might be to replace them with LM317LZs configured as current sinks using one resistor. The voltage across Q2 is relatively constant so it could be replaced with a resistor.One change I might make is to replace each diode pair, D1/D2 and D3/D4, with 1.25 volt shunt regulators like the LMV431 or LM385-1.2 for less current and voltage drift. If Q1 is replaced with a precision current sink like an LM317LZ, then diode reference D1/D2 can be omitted if the potentiometer value is adjusted.Note that replacing Q1 with an LM317LZ might cause stability problems so this would need to be checked.I would probably add an input decoupling capacitor to LM318 number 2.QuoteThe LM317s have thermal and safe operating area protection built in so the circuit is very practical despite their relatively low power rating. Power will be limited by heat sink size and junction to case thermal resistance. The later may be lowered by using LM350s or LM338s in place of the LM317s.With that in mind, a heat sink with a thermal resistance below 5 C/W should be used with an LM317 and even lower with the LM350 or LM338 to take advantage of their lower junction to case thermal resistance. Below 3 C/W is feasible with natural circulation and below 1 C/W with forced air flow. I prefer to mount the parts to the metal enclosure with a heat sink mounted to the back or directly to the exposed heat sink.QuoteThe current drawn to the negative supply is low so I would use a charge pump driven by the transformer secondary.

author: bd139
author_rank: Super Contributor
timestamp: September 02, 2017, 07:12:40 pm
content: Watch out for these supplies. There are some common assumptions that tend to end up in explosions. If you think you can get 3.3v at 1.5A out of them for example then things are going to be interesting. If your input voltage is say 30v DC then you're dropping 26.5 volts at 1.5A which means 40W needs to be dumped out somewhere. The ST parts also usually explode before the SOA is exceeded.I'd always head towards an LM723 solution with external pass transistor (ubiquitous 2N3055 for example). That has a current sense and foldback implementation (see data sheet) which can stop you toasting your regulator and transformer. The LM723 is an early IC (1969 ish) but it just won't die because it works ridiculously well.

author: David Hess
author_rank: Super Contributor
timestamp: September 03, 2017, 01:53:59 am
content: Quote from: bd139 on September 02, 2017, 07:12:40 pmOne solution for this is to use an external pass transistor with the 317s (1) but the added complexity makes an alternative design more desirable.I have grown to like using dual tracking supplies so each side only has to support up to 20 volts of output and when combined can produce up to 40 volts. This neatly divides the power dissipation between two devices but also more than doubles the complexity.QuoteThe 723 has current limiting but requires help to implement a precision adjustable current limit. Once you do that, then you end up with the complexity of a non-723 solution although two 723s could be linked by their transconductance outputs to make a precision constant current and constant voltage power supply but I have yet to see anybody try it.(1) I have done this before just to get a higher power rating at a given temperature but it extends the built in 317 current limit as well which may not be desirable. See the example below from the 1980 National Semiconductor Voltage Regulator Handbook.

author: Unordung
author_rank: Contributor
timestamp: September 03, 2017, 03:37:05 am
content: Quote from: Hero999 on September 02, 2017, 03:57:41 pmI tried to recreate that charge pump circuit in multisim with a 450and 500load to simulate the 20mA estimated draw of the circuit and the voltage breaks down.As shown here.I'm not sure what is going on here is it just simulating error?I wouldn't normally put a whole lot of faith in Multisim as I often find calculating with "ideal" components often provides odd results. However not knowingmuchanything about charge pumpsI want to simulate and understand the circuit before continuing with it.Also since Q1 and Q2 are essentially just current sinks I can easily substitute them with any fet with a similar RDS and current capabilities yes?Thanks again everyone for the replies and taking the time to help me out with this.

author: Ian.M
author_rank: Super Contributor
timestamp: September 03, 2017, 06:56:25 am
content: The key parameters for substituting the FETs are Idss and Vds_max. Rds and Id_max don't eve come into it. You can use one with a slightly higher Idss by adding a resistor in series with the source to increase the negative gate bias. Unfortunately JFET Idss is not a closely specified parameter, so you'll have to 'select on test'. A BJT current source is a lot more predictable - a simple base bias rail (shared by both) and an emitter resistor would do the job.I don't know what you are doing wrong in your sim, but a capacitively couple bridge 30mA negative rail (effectively two charge pumps, one off each AC terminal of the main bridge) simulates with no problems in LTspice. Its using 22uF coupling caps, and a 100uF reservoir, folllowed by a Zener + emitter follower, with another 100uF on the base to get the stabilised bias rail the LM317 based design needs.You may want to take a look at a LM723 thread from earlier this year:https://www.eevblog.com/forum/projects/how-do-make-a-current-limiting-knob-using-lm723-for-linear-reg-power-supplies/. It includes schematics of a few Philips LM723 based PSUs and I contributed a LTspice simulation of the Philips PE 1535-00 0V - 40V, 0A - 0.5A. single output PSU in reply#29 (which doesn't need any auxiliary supply rails and could be beefed up to 1A or even 2A out at the expense of some beefier transistors, a *big* heatsink and a few bucks on your air-conditioning bil)l.

author: nugglix
author_rank: Regular Contributor
timestamp: September 03, 2017, 08:36:14 am
content: Quote from: Unordung on September 03, 2017, 03:37:05 amInitially the same here.I added a load to the positive side and now it works.An explanation would be nice.

author: Ian.M
author_rank: Super Contributor
timestamp: September 03, 2017, 08:57:29 am
content: If you ever have questions about a LTspice sim, post it (or a link to it if its 3rd party) as a .asc file, or a zipped folder if it has custom models or symbols (but strip all generated and result files before zipping). . .The single charge pump is unbalanced. It alternately pulls charge from its reservoir cap and pushes it into the 0V rail. However if the main bridge is unloaded, the other end of the transformer wiring is effectively floating, so the drive to the charge pump coupling cap isn't stiff enough to move significant charge. The double charge pump / capacitively coupled bridge circuit is balanced so it pulls charge from the reservoir cap while simultaneously pushing charge into the 0V rail via the upper diode in the other arm of the bridge, which means it doesn't need either lower diode in the 0V rail forward biassed.Edit: s/sanctimoniously/simultaneously/ as I ****ed up with the spellchucker.

author: nugglix
author_rank: Regular Contributor
timestamp: September 03, 2017, 09:19:56 am
content: Quote from: Ian.M on September 03, 2017, 08:57:29 amWrong reflex here.I referred to the circuits above and just showed the modification and the result.So award yourself aQuote from: Ian.M on September 03, 2017, 08:57:29 amThanks.

author: Zero999
author_rank: Super Contributor
timestamp: September 03, 2017, 09:25:24 am
content: Quote from: Ian.M on September 03, 2017, 08:57:29 amYes, that's true, with the negative charge pump circuit I posted, the load on the positive supply always needs to equal to or greater than the current on the negative rail. This is a non-issue here. The circuit was not intended to be used without a load on the positive rail. It was designed to give an op-amp a negative supply, to allow it to pull the adjustment pin of the LM317 down to Vref (about 1.25V) below 0V. With no load connected to the regulator, (assuming electron flow, as it's easier to visualise with negative rails) any electrons coming from the negative rail, go through the op-amp and regulator to the positive rail.

author: Unordung
author_rank: Contributor
timestamp: September 03, 2017, 09:44:14 am
content: Quote from: Hero999 on September 03, 2017, 09:25:24 amThanks for the circuit and the assistance with troubleshooting Hero999.So would it be fair to surmise that by - putting a slightly higher mA dram on the +rail this issue would be corrected?It certainly seems to have a positive effect on the simulation.With that said the output on the 9.1V rail seems very unstable with quite a bit of ripple. Would this have any real world issue in this application? If I were to use a LM7909 or the like my current draw would increase. How do I calculate how much current this circuit is capable of, or should I just trial and error it in multisim?

author: Zero999
author_rank: Super Contributor
timestamp: September 03, 2017, 10:06:45 am
content: Quote from: Unordung on September 03, 2017, 09:44:14 amA slightly higher load on the positive rail may help to ensure the minimum current through the zener diode is high enough to maintain some regulator. It could be as simple as an LED and suitable series resistor, which could double as a power on indicator.The negative supply voltage is non-critical. A regulator could be used, but it shouldn't be necessary. The op-amp's supply rejection should reduce the effect of the ripple enough.Anyway, other than what's on the schematic attached to your original post, you've not actually stated what output voltage and current you need? Presumably the 25V & 1.5A on the schematic is sufficient?

author: Ian.M
author_rank: Super Contributor
timestamp: September 03, 2017, 10:43:22 am
content: Quote from: Hero999 on September 03, 2017, 10:06:45 amIn many cases it needs a regulator anyway, as, due to typical OPAMP maximum supply voltage limitations, to get a large positive swing to e.g. +30V, you cant afford to let the negative rail become more than a few volts negative of ground, e.g. if you are using a 32V positive supply for a full output of 30V with a little headroom and a typical OPAMP rated for +/-18V max supply, you've only got 6V to play with for the negative rail, and probably want at least 2V for a safety margin.An extra coupling cap and two more diodes to make it a double charge pump, doubles the power delivery and also the ripple frequency which will halve its amplitude for the same load current. Although the OPAMP isnt particularly sensitive to supply ripple it will have *some* effect so unless you are building PSUs in volume, why Muntz it?

author: David Hess
author_rank: Super Contributor
timestamp: September 03, 2017, 01:25:50 pm
content: Quote from: Unordung on September 03, 2017, 03:37:05 amThey may be replaced with depletion mode FETs which includes JFETs and depletion mode MOSFETs. They are operating at very low current, 2 to 10 milliamps for Q1 and 5 to 25 milliamps for Q2, so Rds and maximum drain current are not important. The variation in Idss shows how poorly FET threshold voltage is controlled. Q1 has some constraints because it sees the full input voltage so the Q3822 was selected for its 50 volt Vds and it has to operate at higher power. Q2 was selected for a higher minimum Idss or drain current with the gate shorted which is required to sink the 5.2 milliamp external divider current from the second LM317.For modern parts, I would use a cheap JFET like the 40 volt PF5102 for both with a source resistor added for Q1 to lower the current. Or the DN2530N3 depletion mode MOSFET with a source resistor added for both to control the current.Ian.M mentioned using bipolar transistor current sinks so he can cover that.Below shows what is likely an application note for an earlier version of this circuit that happens to include the alternate configuration for the current regulator part which I suggested where an LM317 is used in place of Q1. I ran across this accidentally yesterday while looking for something else. The only reason this circuit makes any economic sense is that LM317s are so inexpensive even compared to a single discrete transistor.

author: Ian.M
author_rank: Super Contributor
timestamp: September 03, 2017, 02:24:07 pm
content: The crudest bipolar current sink that could replace those Jfets is this one. It isn't the most temperature stable as it uses 2x silicon diode drop to set the base voltage, without any temperature compensation, but it should hold the collector currents within a few percent while the main supply varies from 0 to 30V. I've attached the simulation ground to what would be the -10V bias supply in the actual circuit because it makes it easier to follow what's going on.

author: David Hess
author_rank: Super Contributor
timestamp: September 03, 2017, 04:43:26 pm
content: Quote from: Ian.M on September 03, 2017, 02:24:07 pmReplace the two diodes in series with a cheap 635nm GaAsP red LED. Now the circuit is simpler, better temperature compensated, and has a free power on indicator.

author: Zero999
author_rank: Super Contributor
timestamp: September 03, 2017, 05:43:41 pm
content: Quote from: Ian.M on September 03, 2017, 10:43:22 amThe zener provides crude voltage regulation. You have a point though that 9V may be too high, for some applications, but the original design was only for 12.5V out, so it was more than adequate.

author: b_force
author_rank: Super Contributor
timestamp: September 03, 2017, 06:12:00 pm
content: Why not just use a simple voltage regulator (maybe with a series resistor to eat away some voltage)?These things are cheap as well.

author: Kalvin
author_rank: Super Contributor
timestamp: September 03, 2017, 06:13:46 pm
content: With a PNP transistor and zener the power dissipation will be less compared to the zener-only shunt regulator:http://modeltrainadvisors.com/voltage-regulators.htmlAdding a capacitor parallel with the zener one can get a zener regulated capacitance multiplier which will improve the noise properties.

author: Zero999
author_rank: Super Contributor
timestamp: September 03, 2017, 10:01:32 pm
content: Use an LM79L09 or an emitter follower with the zener, if you like. It won't make much difference to the performance. The simulation says the ripple on the zener is under 2.5mV, which will be further reduced by the op-amp's power supply rejection to almost nothing. Even if the real life results are ten times as bad as the simulation says, the ripple on the output will be still tiny. The ripple on the main filter capacitor will contribute more to the output voltage ripple, than that on the negative supply. It's a distraction.Anyway, the negative voltage bias is really a minor detail. Once we've established that it's low enough and that the ripple on the input won't be a problem, lots of the simulation can be performed at DC. One advantage of the op-amp circuit, using a unity gain differential amplifier, is it can be powered from a lower voltage, than the input to the LM317, because both the op-amp's inputs sit at half the output voltage.

author: David Hess
author_rank: Super Contributor
timestamp: September 03, 2017, 11:09:27 pm
content: I agree with Hero999; improving the negative bias supply has little to no effect on the output so a zener shunt regulator is sufficient.One part of this is because the Q1 and Q2 current sinks produce a high impedance output which attenuates ripple and noise from the bias supply. The shunt regulators driven by the current sinks further attenuate ripple and noise.The other part is that the LM317 regulators by themselves do not provide the kind of precision where errors from the bias supply would become dominant. Combining the references, error amplifiers, and output stage in each IC produces all kinds of thermal errors. The lack of remote sense adds further errors.If external operational amplifiers were being used for the current and voltage error amplifiers, then their power supply rejection would also attenuate the effects of ripple and noise from the bias supply.I also agree with b_force; a 79L12 or similar negative regulator is cheap so what not use it instead? Just do not expect any improvement in performance or reliability.

author: Unordung
author_rank: Contributor
timestamp: September 04, 2017, 10:54:43 am
content: Thank you everyone for your generous input and for the info re: Charge pump circuit.I am going to sit down and create a list of must have and desired attributes for this system.IE do I need 30v max output? Would 12v be sufficient etc......?After first making a few design choices I return with a much clearer idea of what it is "outside of a learning experience" that I want to achieve.Again many thanks to all for contributing.

author: Ian.M
author_rank: Super Contributor
timestamp: September 04, 2017, 11:34:17 am
content: Building a reasonably good variable output PSU from scratch can get rather expensive. You should also make a list of what transformers, bridge rectifiers, large reservoir caps, large heatsinks and high current NPN power transistors you have handy or can easily get as deeply discounted surplus, as that may drive your evential decision.If you don't have a lot of experience, take a look athttps://www.eevblog.com/forum/beginners/how-many-power-supplies/which may help you firm up your requirements.

author: Unordung
author_rank: Contributor
timestamp: September 04, 2017, 11:53:06 am
content: I actually have a bunch of different supplies, A couple of purchased and a few I made either using kits, modules or converting ATX supplies.So it isn't so much a desire to build a device I "need" but rather to build something which will test my abilities to plan and accomplish a medium project.I want to start from the beginning, design and simulate the circuit. Prototype, design PCB, case etc and produce a finished product.It will be my little celebration for finishing the first half of my studies in the field.I figure a decent "usable" linear lab supply isn't a bad thing to make given my love for test equipment. =D

author: b_force
author_rank: Super Contributor
timestamp: September 04, 2017, 02:07:36 pm
content: Quote from: Ian.M on September 04, 2017, 11:34:17 amThat all depends what your requirements are.Most expensive are the case, heatsink and the transformer.A lot of times you can get these 2nd hand for cheap (or even for free).Just a matter of being creative, you can also use an old amplifier chassis for example.Another option is to buy the cheapest bench power supply (second hand) and modify it.This is also what I do a lot. In most cases the chassis, heatsink and transformers are totally fine. Only the circuit could be better.Cheap way to get an excellent perform power supply for cheap (if you know what you're doing)

author: Unordung
author_rank: Contributor
timestamp: September 05, 2017, 01:36:18 am
content: Quote from: b_force on September 04, 2017, 02:07:36 pmI already have a few cases so that isn't an issue. I would most likely need to purchase a heatsink and a transformer neither of which will be a significant issue.I like the idea of modifying an existing unit, however it distracts from my end goal of designing and producing an entire device.

author: b_force
author_rank: Super Contributor
timestamp: September 05, 2017, 01:43:40 am
content: Quote from: Unordung on September 05, 2017, 01:36:18 amWith modifying I also meant, ripping out the guts and replace it with your own

author: Unordung
author_rank: Contributor
timestamp: September 05, 2017, 12:05:41 pm
content: One more question to assist my pondering guys.Given the relative inexpensive dual winding xformers. I think I would like to go with a dual supply option.That is have an xformer with 2 x 15v (give or take) secondaries. This isolates both supplies yes?Meaning I can can easily link the two circuits in series or in parallel to increase voltage and or current as required?Thus reducing the power loss in stepping higher voltages down etc.....I did a simple experiment today (using two 18 Xmas tree light xformers and two 317's) and it seemed to work fine so I am fairly confident here.However I envisage a system which uses a ATtiny 85 or the like to display voltage, current and power output etc and control a load switch etc.......Is this still possible if using two different supplies?Is it possible / practical to create a ground reference to the micro while keeping the the circuit potential isolated from eachother?I'm thinking it isn't as the micro needs to share common ground with the circuit to read analog pins etc........Im thinking I would need a relay which switches the ground plane but have no idea how this would look or even if it's possible etc.Anyway thanks again to everyone for the assistance. Sorry for the constant barrage of most likely silly questions. =D

author: David Hess
author_rank: Super Contributor
timestamp: September 06, 2017, 04:33:53 am
content: Quote from: Unordung on September 05, 2017, 12:05:41 pmIt is possible to do but can be tricky. Either the microcontroller needs to be galvanically isolated from the supply circuits or if there is one common, then it can use that and signals can be level shifted.Bench digital multimeters have the same problem and solve it with isolation. For them, the common input is separate from ground and not the same as the common for the digital circuits.

author: Ian.M
author_rank: Super Contributor
timestamp: September 06, 2017, 08:58:55 am
content: 8 bit microcontrollers are relatively cheap. Use one slave MCU per isolated supply and an isolated asynchronous serial bus between them. That means you only need to isolate two logic level signals for each MCU. The master MCU needs to run your U.I. so may need to be something more powerful. For simplicity, its probably worth giving it its own slave rather than rewriting the individual PSU channel control code to emulate a slave, running on the master

author: Unordung
author_rank: Contributor
timestamp: September 07, 2017, 08:25:43 am
content: Wow,It seems to be ever increasing in complexity! I'm thinking if I have the 2 supplies I should use two Micros and keep the system completely isolated from each other.That way I could use it to easily get positive and negative rails for op-amp circuits etc.It will be a little more clunky but each supply will have a voltage and current readout along with it's own load switch and binding posts.......It seems a little amateurish however. Despite actually being an amateur I kinda wanted to build something I could be proud of.....Quote from: Ian.M on September 06, 2017, 08:58:55 amThis system wouldn't allow me to connect the two supplies together for positive and negative rails would it?

author: Zero999
author_rank: Super Contributor
timestamp: September 07, 2017, 10:05:58 am
content: It appears feature creep is starting to set in. I'm sure it doesn't have to be that complex.With one channel, all that's needed is a current error amplifier, which starts to pull the LM317's adjustment pin down to a minimum of -Vref (around -1.25V), when the current limit is exceeded. A microcontroller could be added later, to measure the set, vs actual current and voltage.If the two channels are powered off separate transformers or windings, then they could easily be connected in series. A reverse parallel diode on each output would be required, to protect against reverse voltages. Parallel operation could be a little more tricky, as the output voltages won't be exactly the same and won't current share. It may not be critical, as long as the regulator is stable, with its output pulled slightly above its voltage setting. A diode connected between the output and input will protect it against damage from this.

author: Unordung
author_rank: Contributor
timestamp: September 07, 2017, 11:40:13 am
content: Quote from: Hero999 on September 07, 2017, 10:05:58 amI love it!I need to step back with pen to paper and clearly define what the project must have and ...... would be nice to have if not difficult and wont blow the budget...

author: Ian.M
author_rank: Super Contributor
timestamp: September 07, 2017, 02:27:30 pm
content: Yes, beware of feeping creaturitis. I don't even *want* to know about the pathological process by which you went from a simple '70s style 0-30V 1A supply to a multi-channel one with a MCU. From the questions you've been asking I would set a 'brick wall' feature cutoff point at analog metering, coarse and fine voltage adjustment knobs and a switch that puts the transformer secondaries in parallel or series to support a choice between e.g 0-15V,1A/0-30V,0.5A. Due to the meter supply requirements, digital metering is probably a step too far for you (at least until you understand isolation and floating supplies).However, if you are going to put a lot more research and personal development into this project so you can support a richer feature list, you need to know that the whole point of isolation is it removes the need for a common 0V rail between two devices. Within the limits of the isolator's isolation rating, and of the insulation from ground, it doesn't matter how big a voltage differential there is between the two sides. As an extreme case, if for the isolation, you used fibre optic transmitters and receivers coupled by long enough fiber-optic cables with non-conductive jacket and reinforcement it wouldn't matter if one of the MCUs was in a unit with 0V connected to chassis and the chassis clipped to one of the wires of a 765KV EHV transmission line. More typically, optoisolators in DIL or SMD packages typically have a peak insulation withstand voltage of a few KV, and working voltage differentials of hundreds of volts, so using them to let you stack digitally controlled or monitored PSU sections in any configuration isn't particularly challenging.I will however throw a wild idea out there: If you go digitally controlled (and for %DEITY%'s sake ditch the LM317 first), it really isn't much extra work to implement the hardware for an isolated RS485 control interface. Then its just a matter of writing firmware for your chosen MCU to accept commands and read back data over a serial interface (preferably using an existing protocol) and writing software to control N such units, to run on *whatever*, as long as you can provide a RS485 port.

author: Neomys Sapiens
author_rank: Super Contributor
timestamp: September 07, 2017, 09:14:55 pm
content: While I completely concur with anyone telling you that the LM317 isn't suitable as a bench PS or those pointing out the limitations of the design, I have to admit: once, in my youth, I built one myself. It had some strange special features, like the ability to connect the isolated outputs to L or N by switch, which would make the safety concious go ape.It worked, anthough seldomly used, for over 20 years until I ripped it apart in order to re-use the enclosure.

author: Zero999
author_rank: Super Contributor
timestamp: September 07, 2017, 10:47:31 pm
content: This will probably need frequency compensation, but here's the basic idea I was talking about earlier. The voltage reference can be the TL431 with a potentiometer and potential divider to give a more sensible voltage, than 2.5V.