EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: cellularmitosis on April 20, 2014, 04:01:10 am

Title: First LM317 supply PCBs came in!
Post by: cellularmitosis on April 20, 2014, 04:01:10 am
So I took the Contextual Electronics course and learned KiCAD well enough to make a basic dual-LM317 linear supply.  I designed a basic PCB and ordered a few from seeedstudio.  I put the design up on github: https://github.com/pepaslabs/DualLM317BenchSupply

Its been a lot of fun as an exercise, but I'm not sure of its viability as a kit.  I was thinking about selling this on tindie, but the BOM costs are almost $30, so by the time I add any markup, I think people would be better off just buying a CSI1802X for $50.  So I'm not sure if I'm going to end up selling it or not.  Perhaps I'll sell just the bare boards.

I also ran into a manufacturing defect (one of the pads was directly connected to the ground plane), which required a bit of a bodge to get the board working.

Lessons learned so far:

Any feedback on the design is appreciated :)
Title: Re: First LM317 supply PCBs came in!
Post by: cellularmitosis on April 20, 2014, 04:04:38 am
Here's the board populated:

I used cheap voltmeters and ammeters found on ebay.  I was able to add an external trimmer pot to trim out the ammeter, but had to rely on the built-in trimmer for the voltmeter, and I wasn't able to get it bang on (about 40mV out).

Title: Re: First LM317 supply PCBs came in!
Post by: cellularmitosis on April 20, 2014, 04:05:10 am
Here's the schematic
Title: Re: First LM317 supply PCBs came in!
Post by: Vgkid on April 20, 2014, 07:49:11 am
What heatsink are you using?
Title: Re: First LM317 supply PCBs came in!
Post by: cellularmitosis on April 20, 2014, 08:11:41 am
Here's the schematic

Its a series of heatsinks from Aavid Thermalloy based on their 63130 extrusion (the one pictured is the 2.5" tall version).  I have some more detailed info about it on my TO-220 breakout board github page: https://github.com/pepaslabs/TO-220_breakout#heatsink

I also made a custom KiCAD footprint for it: https://github.com/pepaslabs/KiCADParts
Title: Re: First LM317 supply PCBs came in!
Post by: rollatorwieltje on April 20, 2014, 05:07:37 pm
Why do you power the volt and ampere meters from an 7805? Most of these meters I've seen accept up to 30V, so they can run directly from the power input.
Title: Re: First LM317 supply PCBs came in!
Post by: janoc on April 20, 2014, 11:21:15 pm
One tip - don't use a 7805/7905 type of regulator when you are going to feed it with more than about 9-12V on input. You have 19V voltage drop on the poor 7805, that thing is going to be really toasty - even when drawing some 100mA from it (and the meters likely take more), it has to dissipate almost 2W. That needs a decent heatsink and it is a completely wasted power (important if running from a battery, for ex.).

If you must use this type of regulator, either power it from a lower voltage to reduce the voltage drop (that's why commercial linear PSUs use multiple transformer taps switched by relays) or, better, use a switching regulator. If you don't want to design your own, there are plenty of cheapo modules on eBay which would do just fine for this type of job.

Also, in your particular case, it is possible that the meters could run directly from the input voltage, as pointed out by rollatorwieltje.
Title: Re: First LM317 supply PCBs came in!
Post by: cellularmitosis on April 21, 2014, 04:15:49 am
Why do you power the volt and ampere meters from an 7805? Most of these meters I've seen accept up to 30V, so they can run directly from the power input.

True, the manufacturer claims these can be powered from up to 32 volts, but I was concerned there would be heating on the meter board which would cause it to drift.  As a test I powered one of them from 24 volts and touched the parts on the back of its board, and some of the parts were really hot.  So I thought I'd drop down to 5V to keep the meter as cool as possible.
Title: Re: First LM317 supply PCBs came in!
Post by: cellularmitosis on April 21, 2014, 04:18:31 am
One tip - don't use a 7805/7905 type of regulator when you are going to feed it with more than about 9-12V on input. You have 19V voltage drop on the poor 7805, that thing is going to be really toasty - even when drawing some 100mA from it (and the meters likely take more), it has to dissipate almost 2W. That needs a decent heatsink and it is a completely wasted power (important if running from a battery, for ex.).

If you must use this type of regulator, either power it from a lower voltage to reduce the voltage drop (that's why commercial linear PSUs use multiple transformer taps switched by relays) or, better, use a switching regulator. If you don't want to design your own, there are plenty of cheapo modules on eBay which would do just fine for this type of job.

Also, in your particular case, it is possible that the meters could run directly from the input voltage, as pointed out by rollatorwieltje.

Thanks Janoc.  On the revision 2 of this board (which I just submitted a few minutes ago), rather than using a switcher (I wanted to avoid the noise spikes going back into the supply), or using a heatsink, I decided to throw a 7812 in front of the 7805, so the heat would be shared between them.  This decision was reached after spending half an hour looking at heatsinking options, and realizing that a 7812 was actually cheaper than any heatsink  :-//
Title: Re: First LM317 supply PCBs came in!
Post by: Zero999 on April 21, 2014, 09:53:50 am
Thanks Janoc.  On the revision 2 of this board (which I just submitted a few minutes ago), rather than using a switcher (I wanted to avoid the noise spikes going back into the supply), or using a heatsink, I decided to throw a 7812 in front of the 7805, so the heat would be shared between them.  This decision was reached after spending half an hour looking at heatsinking options, and realizing that a 7812 was actually cheaper than any heatsink  :-//
Why not just stick a resistor in series with the LM7805 rather than another regulator which is much more expensive?

Calculate the resistor value so at the maximum current, the LM7805's input voltage is 8V. Connect a 100nF capacitor across the 7805's input, as usual.
Title: Re: First LM317 supply PCBs came in!
Post by: cellularmitosis on April 22, 2014, 03:24:38 am
Thanks Janoc.  On the revision 2 of this board (which I just submitted a few minutes ago), rather than using a switcher (I wanted to avoid the noise spikes going back into the supply), or using a heatsink, I decided to throw a 7812 in front of the 7805, so the heat would be shared between them.  This decision was reached after spending half an hour looking at heatsinking options, and realizing that a 7812 was actually cheaper than any heatsink  :-//
Why not just stick a resistor in series with the LM7805 rather than another regulator which is much more expensive?

Calculate the resistor value so at the maximum current, the LM7805's input voltage is 8V. Connect a 100nF capacitor across the 7805's input, as usual.

Thanks, that's definitely a clever solution!, but I would lose the ability for someone to power the board with e.g. a 9v or 12v wall wart.  The heat sink can't actually dissipate (20*1.5) 35 watts, so if you need to run the LM317 near its current limit into a low resistance load, you'd have to switch to using a lower voltage wall wart.  With the 7812 scheme, even a 9v wall wart should allow the 7805 to maintain regulation.
Title: Re: First LM317 supply PCBs came in!
Post by: Zero999 on April 22, 2014, 09:36:28 am
Thanks, that's definitely a clever solution!, but I would lose the ability for someone to power the board with e.g. a 9v or 12v wall wart.  The heat sink can't actually dissipate (20*1.5) 35 watts, so if you need to run the LM317 near its current limit into a low resistance load, you'd have to switch to using a lower voltage wall wart.  With the 7812 scheme, even a 9v wall wart should allow the 7805 to maintain regulation.
I doubt it, possibly 12V but certainly not 9V. The LM7805 needs between 7V and 8V to regulate properly and you'll loose a few volts when the LM7812 goes into drop-out.

A better solution would be to use a separate connector for <12V and a diode to bypass the series resistor.
Title: Re: First LM317 supply PCBs came in!
Post by: old gregg on April 22, 2014, 12:43:16 pm
are these volmeters good ? are they clean ? (I mean no noise introduced ?)

I think you can get rid of the bypass limit current switch and incorporate the bypass with the current rotary switch. I'm not really fan myself of these switches by the way, they can break quickly and are not mechanically robust.
Title: Re: First LM317 supply PCBs came in!
Post by: cellularmitosis on April 22, 2014, 08:00:15 pm
are these volmeters good ? are they clean ? (I mean no noise introduced ?)

I think you can get rid of the bypass limit current switch and incorporate the bypass with the current rotary switch. I'm not really fan myself of these switches by the way, they can break quickly and are not mechanically robust.

I'm pretty happy with the ammeter (the sense resistors seem to be slightly too high in resistance, which means a 10 turn 10 ohm trimmer in parallel allows you to dial it in to be accurate to the mA).

But I'm not so happy with the volt meters. They are too dim and I had difficulty getting good results with it's built in trimmer.  This is complicated by the fact that the volt meter is thrown off by the voltage drop across the ammeter'a shunt, so you are never going to get it perfect.

Thanks for the bypass suggestion. The reason for the current limit bypass switch is that the rotary selector switch is only rated for 350 mA.  In fact, I ganged up both poles of the switch for the for the 250 and 500 mA positions.   

Which switches have you had bad luck with?  The rotary switches or the toggle switches?
Title: Re: First LM317 supply PCBs came in!
Post by: cellularmitosis on April 22, 2014, 08:11:24 pm
I doubt it, possibly 12V but certainly not 9V. The LM7805 needs between 7V and 8V to regulate properly and you'll loose a few volts when the LM7812 goes into drop-out.

A better solution would be to use a separate connector for <12V and a diode to bypass the series resistor.

Ah, good point.  I hadn't realized the dropout was that bad with the 78xx.  Luckily the meters' on-board regulators will still maintain regulation.

Thanks for the suggestion of multiple conncectors, but I wanted to include both a 2.1x5.5mm and a 2.5x5.5mm jack, so that most wall warts (and some laptop supplies) would be useable.  If I had multiple voltage inputs as well I'd be up to four connectors (and I'd also need the heatsink for the 7805).  It would also detract from the "universal input" notion which I was after.
Title: Re: First LM317 supply PCBs came in!
Post by: Dave Turner on April 26, 2014, 10:14:44 pm
I can see that you will develop a reasonable circuit How do you expect to case this for practical usage?

Title: Re: First LM317 supply PCBs came in!
Post by: old gregg on April 27, 2014, 03:48:41 pm
Quote
Which switches have you had bad luck with?  The rotary switches or the toggle switches?

it broke. The kind of ball which makes the connexion went off. I don't know if it's critical in your situation though.
Title: Re: First LM317 supply PCBs came in!
Post by: akis on April 27, 2014, 06:11:34 pm
If I remember correctly, those ebay ammeters need to be powered from a different supply because they short the sense resistor and the ground.  Or was I just the unlucky one? On my PSU I had to use a DC/DC isolator just for those damned ammeters.

And the voltmeters aren't too great either (I have bought the 4 digit ones on ebay that come with 3 leads) - they have a trimmer at the back which is the old style with the wiper exposed and any kind of handling will ruin it - I have already ruined one in exactly this way and now have to replace it.
Title: Re: First LM317 supply PCBs came in!
Post by: cellularmitosis on April 28, 2014, 05:38:57 am
Yeah akis I unfortunately discovered they were low side only as well.  Here's a thread about it:

https://www.eevblog.com/forum/testgear/turns-out-these- (https://www.eevblog.com/forum/testgear/turns-out-these-)$5-999ma-ammeters-are-low-side-only/15/
Title: Re: First LM317 supply PCBs came in!
Post by: cellularmitosis on April 28, 2014, 05:41:34 am
Argh, it turns out a dollar sign in the URL will break link detection on this forum.  Here's a bitly instead: http://bit.ly/PJP5ch (http://bit.ly/PJP5ch)
Title: Re: First LM317 supply PCBs came in!
Post by: akis on April 28, 2014, 08:54:11 am
I would have hoped/expected that they would have included their own DC/DC isolator on the ammeter to allow you to plug it almost anywhere, but no. I did not run the tests you did to check its accuracy and am worried now that you have found them to be so bad. Did you make sure to factor in the losses on the provided leads as well? They have a 50mOhm resistor as the sense resistor, but those wires they surely also have their own resistance as well.