Author Topic: LM317 power supply diagnostics  (Read 23256 times)

0 Members and 1 Guest are viewing this topic.

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: LM317 power supply diagnostics
« Reply #25 on: November 28, 2013, 06:13:40 pm »
Another question! I'm doing the current control stuff now. How do you work out the gain of ICB (differential amplifier)? Wikipedia only confused me further. A=Rf/R1 works in this case, but how do I know it will work in other applications?

Seriously, I would leave that until the voltage regulation is working. The golden rule of engineering is to break it down, thoroughly testing each part of the circuit before moving on.
OK - I am currently re-doing the schematic: should I continue with this and do multiple pcb revisions (copper clad board is cheap) or go back to breadboard (with the lm317 hanging off the board on a heatsink)? The schematic is quite different from the 'original' (first post) so modding the current pcb isn't really an option.

Answer to your LED question: Is it something to do with switching speed? The 1n4148 is a high-speed diode... It can't be that the 1n4148 is needed in series to make speed faster though...
Alternatively, maybe it's capacitance: 1n4148 diodes have about 4pf of capacitance at 1MHz and are fairly stable; LEDs' capacitances vary with frequency and at 1MHz can be 60pf.
TBH, I don't know.

That circuit looks interesting, but it's a little squashed. I can't make sense of the schematic like that: I'll try to find a copy / redraw it.
 

Offline Mark Hennessy

  • Frequent Contributor
  • **
  • Posts: 305
  • Country: gb
    • My electronics and audio website
Re: LM317 power supply diagnostics
« Reply #26 on: November 28, 2013, 06:31:02 pm »
Ah - the thing about LEDs is that they have a lousy reverse-voltage breakdown - typically about 6 volts or thereabouts... So the additional 1N4148 takes care of that...

When I build a project, I don't commit to a PCB until the thing is 100% debugged and designed. I start with plug-in bread-board, and move to Veroboard or copper-clad "dead bug" construction style if required. Often, for a one-of, Veroboard done neatly is perfectly adequate for final construction - I've got projects that are over 20 years old and still working well on Veroboard.

That NS schematic is reasonably subtle. but does most of what you want, and is worth the effort in understanding. Basically, the current is turned into a voltage by R3, and the op-amp is comparing that with the voltage set up by R2 and R5. The reference for the current setting is the LM317 itself. The I-sense resistor is inside the feedback loop, unlike your circuit. This one won't go down to 0V or 0mA, of course, but you now know how to fix the 0V issue  :)
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: LM317 power supply diagnostics
« Reply #27 on: November 28, 2013, 06:42:43 pm »
OK - I was thinking too much!
The reason I used a pcb was because my breadboard was too small - I should have known better but this is my first 'real' analog project so I have an excuse ;) . At least I won't make that mistake again. I will get a bigger breadboard (this one seems to look good) and go back to that. I will (eventually) want to use a pcb, because as you (or was it Kevin.D) suggested, I have 2 isolated outputs from my transformer and it'd be a waste not to use both. I'll finish the new schematic first though (while I'm waiting for the breadboard to arrive!). Obviously the new schematic won't be final, but I will need something to work from on the breadboard and I can't be bothered trying to do it all from memory.
You now know how to fix the 0V issue.
Which issue?
« Last Edit: November 28, 2013, 06:45:42 pm by microbug »
 

Offline Mark Hennessy

  • Frequent Contributor
  • **
  • Posts: 305
  • Country: gb
    • My electronics and audio website
Re: LM317 power supply diagnostics
« Reply #28 on: November 28, 2013, 07:23:03 pm »
You now know how to fix the 0V issue.
Which issue?

The not getting down to 0V issue. Which the -1.25V rail fixes :)

I must dash now, but good luck with it. Breadboard looks good at a glance - much bigger that the one I had when I started out.

Cheers,

Mark
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: LM317 power supply diagnostics
« Reply #29 on: November 28, 2013, 09:52:16 pm »
Thanks for your help Mark!
I have finished the revised schematic now (attached). I'm still not sure about the current limit, but it should be adjustable from 0-2A (I know the LM317 can't do 2A continuously) and the amplifiers work with 0.1V=1A to cut down on oscillation. This will also make the 3mv input offset of the lm358 more manageable as it gets amplified to 30mv not 300mv. I put a 10k resistor between the output of the current amplifier and input of current limit comparator to make the input higher impedance so the 100pf cap can do its business.
I don't think it will make any difference, but I replaced the BC548 in Mark's schematic with a BC547 because I have those.
This is very much a work in progress and I'll revise it as I debug. I've ordered 2x830-point breadboards and some jumpers (solid core and flexible) for experimentation on eBay (a grand total of £10.28). It might be a few days before they arrive (shipping from uk so not too long) and I can get started.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
LM317 power supply diagnostics
« Reply #30 on: November 29, 2013, 07:13:46 am »

i think In other words, as soon as 200ma is drawn from the circuit through the 10mOhm sense resistor, then that opamp will multiply that by 100-> 200mV, add that to the input offset x 100 = 200mV+300mV = 500mV and that matches your setpoint.
So you will seem to set it for 500mA but it trips at way less than that because of the sense opamp's input offset.
=========================
Learn | Worksheet
That now shouldn't be the case though as it is only multiplied by 10, making for a 30mv offset.
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: LM317 power supply diagnostics
« Reply #31 on: November 29, 2013, 10:40:32 am »
This person Alicelewis is actually spamming the board, copying other persons text from the start of threads on the board and posting with links to their website.

That text above you quoted from Alicelewis is actually the text of my own first post in the thread here.

 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: LM317 power supply diagnostics
« Reply #32 on: November 29, 2013, 03:35:39 pm »
I thought that looked familiar! I'll send a PM to Simon (although I imagine Alicelewis has already been reported).
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: LM317 power supply diagnostics
« Reply #33 on: December 06, 2013, 07:37:15 pm »
I received my breadboard (2x830 point) and jumpers, and I'm putting in an order for some components for the power supply. I intend to get at least 2 of each so I can make another one when I'm done debugging the first.
I'm a bit confused about Mark's circuit which taps off a low current negative rail from the AC input. Here's my understanding:
- When the tap (bottom AC input) is positive compared to 0v, current flows through the capacitor connected directly to the tap, through a diode and then to 0v. This first cap is charged. From the previous cycle, the second cap is charged and the load runs off the charge.
- When the tap is negative compared to 0v, current flows through the second cap (charging it) and the load, then through another diode (which prevents positive voltage from the tap getting into the negative rail) and to the first capacitor.
By doing this is the first capacitor not reverse biased when current is flowing from 0v to -20v (the tap)?
 

Offline Mark Hennessy

  • Frequent Contributor
  • **
  • Posts: 305
  • Country: gb
    • My electronics and audio website
Re: LM317 power supply diagnostics
« Reply #34 on: December 07, 2013, 05:20:57 pm »
Yes, that's nearly it. The key thing is that, with respect to ground, the AC signal moves between the rails (well, the rails plus a diode drop). So yes, when the AC input is at its most positive, the first capacitor is indeed charged via the first diode. When the AC input is at its most negative, the negative end of the first capacitor is taken negative, and the second/bottom diode is able to conduct, and this charges the smoothing capacitor (the second one).

This circuit is a classic arrangement - I didn't invent it, sadly. It's fine for the small currents we're using here...

As an aside, one point that isn't always appreciated at first is that the smoothing capacitors supply energy to the load for most of the time. The current from the transformer (via the rectifier diodes) only flows for a brief time. Therefore, the peak current that flows during this time is actually much greater than the average DC current that is supplied to the load - perhaps 4 or 5 times! That's why the wiring between transformer, rectifier and smoothing capacitor must be short and heavy. It's also why you should take the output from the smoothing capacitor, not the rectifier...

All the best,

Mark
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: LM317 power supply diagnostics
« Reply #35 on: December 07, 2013, 05:24:33 pm »
OK, thanks. I will use caps rated at 35v+ for this circuit to be on the safe side (rectified dc is about 19v).
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: LM317 power supply diagnostics
« Reply #36 on: December 10, 2013, 09:05:16 pm »
I've got my parts + breadboard etc. and am at the prototyping stage. The bridge rectifier works as expected with the smoothing cap, but the tap for a low current negative rail starts at 0v (capacitor discharged?) and very slowly creeps down. I got bored watching it when it got to about -7v. With a 10k load it barely goes negative at all. I'm using 2 100uf 35v caps here - it seems that 100uf may be too much (?).
Suggestions?
 

Offline Mark Hennessy

  • Frequent Contributor
  • **
  • Posts: 305
  • Country: gb
    • My electronics and audio website
Re: LM317 power supply diagnostics
« Reply #37 on: December 10, 2013, 10:44:18 pm »
Suggestions?

Check everything very carefully - there is a mistake or faulty component somewhere.

In case you're thinking that's not a very helpful response, I have just taken the time to prototype it, and it works completely as expected.

By "it", I'm talking about the rectifiers. I haven't built anything downstream of them. I loaded them up with 1k resistors.

Good luck,

Mark
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: LM317 power supply diagnostics
« Reply #38 on: December 11, 2013, 08:18:26 pm »
OK, I looked over the layout again and there was a link missing in the rectifier. I rebuilt the negative rail and now both rails work fine. However, when I added the -1.25 vbe multiplier, the main 2200uf smoothing cap started smoking and getting hot. I turned off the power, but not before causing irreversible damage (swelling - see pictures). I have two 4700uf power supply caps - could I use those instead or would the filtering capability be reduced? I'm not too keen on buying a new 2200uf cap because I just got a component order delivered and there are P&P costs of £4 on farnell (which I use) for orders under £20 - hardly worth it for a £1 cap.

EDIT: I investigated further: there does not seem to be a short between the +unreg rail and 0v; the resistance between the two rails is about 12k. I did short tests with the damaged cap measuring the ripple on the +unreg rail and it was about 7v with just the vbe multiplier as a load. The cap heated up fairly fast and I turned off the power again. I don't know whether the ripple is due to the damaged cap having decreased capacitance or something else (I'm guessing the first). If the ripple is causing the problem then maybe the capacitor has too high ESR - the link to the cap is here.
« Last Edit: December 11, 2013, 10:02:23 pm by microbug »
 

Offline Mark Hennessy

  • Frequent Contributor
  • **
  • Posts: 305
  • Country: gb
    • My electronics and audio website
Re: LM317 power supply diagnostics
« Reply #39 on: December 12, 2013, 01:18:20 am »
There is no reason why the VBE multiplier should cause this. Again, there is a construction error somewhere.

The VBE multiplier is not connected to the +UNREG rail, and shouldn't load it in any way.

With no load connected to the +UNREG rail (I assume, as you've not mentioned the presence of the LM317 yet), there should be minimal ripple - well less than a volt, if at all.

Capacitor ESR is not the issue.

Your question about larger smoothing capacitors somehow reducing the "filtering capacity" suggests to me that a little further reading might be beneficial. Rectifiers might seem simple, but they are quite subtle in operation. And as you've discovered, they are not without their dangers. At the risk of saying something that you might already know, capacitors can and do explode when abused!

To minimise any further risk, I'd suggest that you temporarily connect a light bulb between the transformer and the rectifier. Something like 24V at 2 watts. Or a couple of identical 12V bulbs in series if they are easier to source locally. These act like fuses, only instead of blowing, they light up to indicate that your circuit is drawing too much current. When working correctly, the complete PSU should only take 10-20mA with no load connected, and such a small current won't cause much voltage drop across the bulb(s).

Google "lamp limiter". This idea is used a lot in service and restoration work. I recommend it  :)
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: LM317 power supply diagnostics
« Reply #40 on: December 12, 2013, 09:49:13 pm »
Ok, I rebuilt the rectifier (using a 4700uf smoothing cap) and it, the negative supply and the -1.25v vbe multiplier work fine. What I meant with 'filtering capacity' was that by increasing the value of the capacitor I was decreasing the frequency response, but I since realised that's not the case!
I have some 500ma glass fuses which I'll use in the immediate future and will get some incandescent bulbs when next possible. I also now have a used Fluke 83 so I can measure current.
I'll continue building up the project and post if (when) I have problems. I will also try to be more careful with construction, I noticed several things which could have caused the cap to swell. I think the source of the heat was actually in the diodes and the heat transferred through the metal breadboard contacts and into the cap - the diodes were even hotter than the cap (by crude finger measurement) and it was them that I first noticed smoking, not the cap swelling.
Thanks for all your help!
Microbug
 

Offline Mark Hennessy

  • Frequent Contributor
  • **
  • Posts: 305
  • Country: gb
    • My electronics and audio website
Re: LM317 power supply diagnostics
« Reply #41 on: December 12, 2013, 10:18:36 pm »
Excellent news - good, solid progress. And it's great that you're finding the answers yourself with almost no help from me - it really is the best way to learn :)

It's very easy to make mistakes with this sort of thing - I confess that I made a couple when initially prototyping the rectifiers a few days back because I was in a hurry. But that's where the lamp limiter (or some other equivalent) is a superb plan - you get instant visual feedback long before anything bad happens.

Just a minor caution with your Fluke - those current range fuses are very expensive :-DMM

While waiting for light bulbs, you might consider a 50 to 100 ohm series resistor instead of fuses. Of course, it will affect the circuit if you try to draw current from it, but it'll save blowing all your fuses. Just a thought :)
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: LM317 power supply diagnostics
« Reply #42 on: December 14, 2013, 04:43:00 pm »
In adding the LM317 I realised there was a problem with the vbe multiplier. When the LM317 is attached, the -1.25v rail is pulled up to 2-3v, meaning the minimum output voltage of the LM317 is far above 0v. When I connect the adj pin of the LM317 directly to ground or to ground through the voltage adjust pot, the minimum output is about 1v which is about right. Furthermore, I also realised that the -unreg rail is being pulled high by the vbe multiplier, even when the LM317 is not attached. When there is no load, it steadily falls to -20v, but with the vbe multiplier hooked up (the resistor marked as 'should pass about 10ma' is 2k2), it is pulled up to -3.3v (varies). I measured the current going from that resistor and it doesn't exceed 10ma.
I'm using the BC547 instead of the suggested BC548, but I can't see that it will make much difference - the nominal base-emitter voltage only differs by 1v and they are even both in the same datasheet (here). The issue happens with and without the 47uf cap (not that the cap should make much difference).
I'm stumped. I have rebuilt and checked the vbe multiplier and negative rail, so while it's possible that there is a construction error, it seems unlikely (I'll check again just to be sure). Suggestions?
 

Offline Mark Hennessy

  • Frequent Contributor
  • **
  • Posts: 305
  • Country: gb
    • My electronics and audio website
Re: LM317 power supply diagnostics
« Reply #43 on: December 14, 2013, 05:55:10 pm »
If the -1.25V rail is being pulled up, then that means the LM317 "adjust" current is higher than the current being supplied from the -UNREG rail. The adjust current should be close to 5mA with a 240 ohm resistor installed between ADJ and OUT, and that's why I suggested that the VBE multiplier should be supplied with around 10mA.

From what you say, the -UNREG rail is unable to supply enough current, so increasing the value of the two capacitors from 100uF to 470uF or thereabouts might fix it.

I've still got my prototype built, so if I get a chance later, I'll add the LM317 and the VBE multiplier...

Oh, and when I drew the schematic, I did think about adding a diode across the VBE multiplier - arranged to go forward-biased should the -1.25 rail ever get pulled positive. I was thinking about a different scenario than this, but this is another good reason to add it. It will protect the VBE multiplier transistor and the 47u capacitor in parallel with it.

The transistor type is unimportant.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: LM317 power supply diagnostics
« Reply #44 on: December 14, 2013, 06:06:54 pm »
OK, I thought that -UNREG might not be able to supply enough current. The only 470uf capacitors I have are 16v which is not high enough if I don't want bits of cap in my eye, but I ordered 10 100uf 35v caps for this project last week (that was the minimum on Farnell) so I'll put a few in parallel until the problem is solved. I imagine that slightly more current will also be needed to drive the opamps (what is the correct term: op amps; op-amps; opamps?) as well if they're pulling the LM317 low during current limiting so there would be no harm in adding a bit of extra capacitance on top of that.
I'll put a diode across the Vbe (correct term according to datasheet) multiplier - as it's on a low current rail I think a 1n4148 would be enough.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: LM317 power supply diagnostics
« Reply #45 on: December 14, 2013, 09:02:06 pm »
I tested with larger capacitances (4x100uf in parallel and 5x100uf in parallel). With 400uf (for each capacitor), -UNREG stabilised at about -2v. With 500uf, it stabilised at about -2.2v. I'll check with 100uf later, but to my memory -UNREG reached close to 0. Is this correlation (-UNREG compared to capacitance) likely to be linear - if so, I'll need pretty big capacitors!
I forgot to add that when I was testing with the LM317, I put first a 330 ohm resistor between ADJ and OUT and then a 220 ohm (I don't have any 240 ohm resistors).
It would be very nice to have two outputs on my power supply, but not absolutely necessary - I could just use the second secondary transformer winding.

EDIT:
After a Google search I found this page which should help give me some pointers.
Quote
Larger power losses are due mainly to the CSERIES capacitor(s).
I'll try making Cseries alone larger (maybe around 1000uf - I'll need to see what caps I've got).
« Last Edit: December 15, 2013, 10:42:28 am by microbug »
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: LM317 power supply diagnostics
« Reply #46 on: December 15, 2013, 11:31:21 am »
I found an old board that had several 35v 470uf capacitors, so I used them. I tried a variety of combinations of sizes, but -UNREG always seems to fall down to -3 or -4 volts under less than 10ma load. I even tried using a 4700uf cap for CSeries but it didn't help much.
 

Offline Mark Hennessy

  • Frequent Contributor
  • **
  • Posts: 305
  • Country: gb
    • My electronics and audio website
Re: LM317 power supply diagnostics
« Reply #47 on: December 15, 2013, 02:07:35 pm »
You'll learn nothing if I tell you outright, but if you want a clue, observe what happens to +UNREG when -UNREG falls, and ask yourself why...
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: LM317 power supply diagnostics
« Reply #48 on: December 15, 2013, 03:37:19 pm »
When the Vbe amplifier is connected, -UNREG rises (from -20 to -4) and so does +UNREG - up to around 40v from 20v. Is this because 0v is being pulled negative by -UNREG? That would mean that with respect to '0v', +UNREG would seem further from '0v' (higher) and -UNREG would seem closer to '0v' (also higher). When a low current is going back to the rectifier from 0v, the Vbe amplifier with parallel smoothing capacitor, diode and series capacitor function like the last diode of the rectifier and take some of the current. The parallel smoothing capacitor takes most of the current as opposed to the Vbe amplifier, and as the current is low it is not completely charged.
However, when there is a load between +UNREG and 0v, more current needs to flow back through the rectifier to the AC input. Some goes through the parallel smoothing cap until it is fully charged, some trickles through the Vbe amplifier but most goes to the rectifier, so -UNREG remains comparatively low.
Am I correct :blah:?
 

Offline Mark Hennessy

  • Frequent Contributor
  • **
  • Posts: 305
  • Country: gb
    • My electronics and audio website
Re: LM317 power supply diagnostics
« Reply #49 on: December 15, 2013, 09:02:29 pm »
Suffice to say, when the +UNREG rail is unloaded, a load on the -UNREG rail will do strange things. That's because (a) the bridge rectifier for the +UNREG rail is no longer a simple rectifier, thanks to the presence of the bits that are producing the -UNREG rail, and (b) the -UNREG circuit relies on the +UNREG rectifier being just that.

A simple 1k resistor across the +UNREG supply will fix it. Of course, it'll waste a little energy, so put it to good use - add an LED to indicate the presence of power :)

My prototype is working well. I've got the VBE multiplier working, along with the current controller. I won't claim that it's fully debugged by any means, but I'll upload a schematic in the next few days. It's happily using 100uF for -UNREG.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf