Author Topic: A question about power supplies based on LM317.  (Read 8980 times)

0 Members and 1 Guest are viewing this topic.

Offline AsimTopic starter

  • Regular Contributor
  • *
  • Posts: 171
A question about power supplies based on LM317.
« on: June 15, 2013, 04:43:43 pm »
Hi everyone  :)

I am planning on building a power supply based on LM317. I will use a standard Laptop Adapter that its output is 19V , 4.74A as
the input of the circuit and the output of the circuit should be 5V -15V. I will use this power supply to power up my other small projects.
 my concern is:
1- Is it fine to use this adapter ?
2- Is it safe ?

This is the circuit i am going to build.



thanks.


 
 

Offline Jebnor

  • Regular Contributor
  • *
  • Posts: 170
  • Country: ca
  • Absolutely! Yes, kind of, sort of, not really, no.
Re: A question about power supplies based on LM317.
« Reply #1 on: June 15, 2013, 04:52:58 pm »
Yup this will work.  The only thing I would warn about watching the input current.  With near 5A available you can easily release the magic blue smoke from your LM317.

I'm still a rookie, but that is the first thing that comes to mind.
Before this, there was a typo.
 

Offline Mr Smiley

  • Frequent Contributor
  • **
  • Posts: 324
  • Country: gb
Re: A question about power supplies based on LM317.
« Reply #2 on: June 15, 2013, 06:42:05 pm »
5v 1Amp output = 14 watts dissipated in 317 = magic smoke without a decent heatsink  :-DD

 :)
There is enough on this planet to sustain mans needs. There will never be enough on this planet to sustain mans greed.
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5024
  • Country: ro
  • .
Re: A question about power supplies based on LM317.
« Reply #3 on: June 15, 2013, 07:02:08 pm »
The only problem you have is that with linear regulators, the difference in voltage gets dissipated as heat.

Therefore, if you feed 19v and you want 5v at 1A, then you're wasting (19v - 5v ) x 1A = 14 watts as heat.

The LM317 and most linear regulators have a maximum power dissipation of about 15 watts so you'd need a very big heatsink to keep the linear regulator cool.

You want to keep the voltage difference as low as possible, but at the same time it has to be at least 2v difference due to how the linear regulator is made.

My advice is to forget about the laptop adapter and search for an old computer power supply that gives 12v, or look for a 12v monitor power supply - a lot of new monitors have an outside power brick rated for 12v 3-5a and you can find lots of these on eBay or Amazon, for example : http://www.amazon.co.uk/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=12v+monitor+power+supply&rh=i%3Aaps%2Ck%3A12v+monitor+power+supply

Alternatively, get one of those adjustable power supplies, like this one: http://www.amazon.co.uk/1000ma-Regulated-Ac-Multivoltage-Adaptor/dp/B003IUW7O6/ref=pd_sim_ce_2
and set the voltage to at least 2v above what your linear regulator needs to output ... if you want 5v out, set the adapter to 7.5v - you're limited with something like this to about 10v.

There are also 7.5v and 9v power adapters, if you search eBay or some hardware shops in your country you may find these with super cheap old switches and network hubs. They usually are rated for at least 1A compared to the above adjustable adapters (which usually can only do 0.3-0.5A) and they might be actually cheaper. But these fixed 7.5v and 9v would obviously limit your output to 5-7v.

 

Offline Muhammad Nasar

  • Contributor
  • Posts: 22
Re: A question about power supplies based on LM317.
« Reply #4 on: June 15, 2013, 07:35:07 pm »
One thing to also watch out for are mains non-isolated (Grounded) laptop adapters, it would be great that the power supply you built should be mains isolated, which would result in safe probing of your test circuit powered by that power supply.
So using a mains isolated laptop adapter (having its input ground pin not connected to common of DC out)  would be an important thing that you should consider.
« Last Edit: June 15, 2013, 07:42:54 pm by Muhammad Nasar »
 

Offline AsimTopic starter

  • Regular Contributor
  • *
  • Posts: 171
Re: A question about power supplies based on LM317.
« Reply #5 on: June 15, 2013, 07:52:07 pm »
@mariush: yea, i am going to use a large heat sink to keep the voltage regulator cool in worst cases . I need the 19V adapter because I want my power supply to go up to 15 V.

@ Muhammad Nasar: I will consider that.

thanks guys. :)
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5024
  • Country: ro
  • .
Re: A question about power supplies based on LM317.
« Reply #6 on: June 15, 2013, 08:25:54 pm »
 14 watts of heat is not easy to dissipate even with a large heatsink. You may need to add a fan to blow over the heatsink making it noisy.

Consider going for a regular transformer then, with two secondary windings or with a center tap.

For example, get a 18v AC 30-50VA transformer with center tap, so you'll have 9V AC and 18v AC... should be about 10-15$ plus shipping.

By switching between 9v AC and 18v AC, you will have after the bridge rectifier  about 10-20v   (9v AC x1.41 = 12.5v, -2v loss in bridge rectifier = 10v).
This way, at 5v output you'll only waste 5w as heat and you'll only need a smaller heatsink.

 
 

Offline KarlMonster

  • Contributor
  • Posts: 13
  • Country: us
  • Don't harsh on my reckless idealism, man!
Re: A question about power supplies based on LM317.
« Reply #7 on: June 15, 2013, 08:37:26 pm »
Alternatively, it would be a small issue to add a resistor at the Vin. For example, a potentiometer of appropriate wattage to start with, which could be replaced with specific value resistors later.

The idea behind this addition is to dissipate some of the excess wattage outside of the LM 317.
At least, I don't see why all 14 volts needs to be dissipated at the Reg.
Experience gained is proportional to value of equipment ruined.
I'm ready for a new learning experience.
 

vlf3

  • Guest
Re: A question about power supplies based on LM317.
« Reply #8 on: June 15, 2013, 09:28:51 pm »
My concern would also be, the AC non-isolation from the switched output; return mains wiring between equipments might be an issue ? depending on the PSU design.  :o
 

Offline AsimTopic starter

  • Regular Contributor
  • *
  • Posts: 171
Re: A question about power supplies based on LM317.
« Reply #9 on: June 15, 2013, 10:06:05 pm »
mariush, I will use a transformer and a bridge rectifier in another project related to my university, i want to use adapters to keep the circuit as small as possible.  your idea opened my mind on using two adapters, the 19V adapter will be used for the 15-12V output. and another 12V adapter for the 9-5V. my final concern is about the dissipation, how large should the heat sink be if the regulator is dissipating 10 Watts.
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: A question about power supplies based on LM317.
« Reply #10 on: June 15, 2013, 11:04:59 pm »
If you just want to plug it in and go, i.e. want to power your PSU from an unmodified laptop PSU, then as others have said you will have a lot of trouble with dissipating all that wasted power.

If you are willing to tear up that laptop PSU and put it all together inside a new enclosure (I did it this way once before) then you have more options.

In the past I've hacked up the output side of a similar 19V 5A laptop PSU. I modified the feedback resistors with a FET and a different resistor string being switched in, to lower the output voltage. So it became a pre-regulator capable of two output voltages. 19V and approx 9V. A comparator on the output of the PSU with hysteresis switched the pre-regulator to one or the other voltage. At 7V output and below it would switch to the 9V output of the laptop PSU. Above 7V it would switch to the 19V mode.  Not all switchmode regulators will work outside their design specs, so this may not work for everyone.

see attached schematic, sortof like this.. this is not the exact circuit I used, I don't have that anymore because I just scribbled the hack on a scrap paper at the time.  I did this schematic today to show the concept.


 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5024
  • Country: ro
  • .
Re: A question about power supplies based on LM317.
« Reply #11 on: June 15, 2013, 11:22:56 pm »
Quote
my final concern is about the dissipation, how large should the heat sink be if the regulator is dissipating 10 Watts.

You'll have to look in the datasheets for that.

Ex for LM317 made by TI  (datasheet is for both LM117 and LM317): http://www.ti.com/lit/ds/symlink/lm117.pdf

Going to assume you're going to use TO-220 or something similar because that's easiest to heatsink:

Page 2: LM317A, LM317-N NDE TO-220 1.5A

Page 5:  LM317A and LM317-N Electrical Characteristics(1)

Footprint :

IMAX = 1.5A for the NDS (TO-3), NDE (TO-220), and KTT (TO-263) packages.

Device power dissipation (PD) is limited by ambient temperature (TA), device maximum junction temperature (TJ), and package thermal resistance (?JA).
The maximum allowable power dissipation at any temperature is : PD(MAX) = ((TJ(MAX) - TA)/?JA). All Min. and Max. limits are ensured to TI's Average Outgoing Quality Level (AOQL).

On next page, you have :

Thermal Resistance, ?JC KTT (TO-263) Package -  Junction-to-Case :  NDE (TO-220) Package =  4°C/W

Thermal Resistance, ?JA KTT Junction-to-Ambient (No Heat Sink) : NDE (TO-220) Package = 50°C/W


Page 5 has a Heatsink Requirements section, read that.

Basically, the maximum temperature inside the chip can be 125 degrees C.  So you have to make sure that with the heatsink keeps the internal temperature of the chip below 125c. 
So you have to determine how big of a heatsink you have to use so that the temperature difference.

At 12v @ 1A, your linear regulator will dissipate

PD = ((VIN ? VOUT) × IL) + (VIN × IG)

VIN x IG can be ignored... so PD =  (19v-12v) x 1A = 7 watts.

the maximum allowable temperature rise, TR(MAX): = TJ(MAX) - TA(MAX)
where TJ(MAX) is the maximum allowable junction temperature (125°C for the LM317A/LM317-N), and TA(MAX) is the maximum ambient temperature which will be encountered in the
application... let's say 30°C.

So  TR(MAX): = TJ(MAX) - TA(MAX)   ->  TR (max) = 125°C - 30°C = 95°C

Now you have to determine the maximum value for junction to ambient resistance :  ?JA = (TR(MAX) / PD)

In your case,  Pd is 7 watts,  TR max is 95c  so your ?JA = 95°C/7W = 13.57 °C/W

If you go back at the top, you notice this :

?JA KTT Junction-to-Ambient (No Heat Sink) : NDE (TO-220) Package 50 C/W

Your 13.57 °C/W value is smaller than 50C/w so that means you need to use a heatsink, and the heatsink "size" can be determined with the formula :

?HA <= (?JA - (?CH + ?JC))

where
?CH is the thermal resistance of the contact area between the device case and the heatsink surface - usually 0.1-0.5 C/w if you use thermal grease/silicon pads
?JC is thermal resistance from the junction of the die to surface of the package case -  which is the 4C/w mentioned all the way at the beginning

This means your heatsink must have at most : 13.57 - (4+0.5) = 13.57 - 4.5 = 9 C/W

So now you can go on sites like Digikey or Newark/Farnell and look at heatsinks that are rated for less than 9C/W and for TO-220 or something compatible

http://www.digikey.com/product-search/en/fans-thermal-management/thermal-heat-sinks/1179752
http://uk.farnell.com/natural-convection

On digikey site, you have to look at the "Thermal Resistance @ Natural" column to see the heatsink's rating - natural refers to natural convection, which means heatsink is not cooled in turn by using a fan, it cools just by cold air moving through the fins and over the heatsink surface.
The Farnell link is straight for natural convection heatsinks

and you get to something like this:

http://www.digikey.com/product-detail/en/V2006B/A10761-ND/3476155
http://www.digikey.com/product-detail/en/V5629W220/AE10872-ND/3511533
http://www.digikey.com/product-detail/en/V7477YC/AE10847-ND/3511479
http://www.digikey.com/product-detail/en/V7477ZC/AE10846-ND/3511483

http://uk.farnell.com/multicomp/mc33278/heatsink-to220-x-2-7-6-c-w/dp/1710623
http://uk.farnell.com/wakefield-solutions/637-10abp/heat-sink-pcb-alum-to-220/dp/1651792
http://uk.farnell.com/aavid-thermalloy/6100bg/heat-sink-to-220-202-9-c-w/dp/1213466

You can get an idea of how big of a heatsink you need even for just these 7 watts of heat, by looking at length, width, height, how big the fins are (but especially on the Farnell site, check the datasheets because the pictures for each heatsink don't always match the product)

You can repeat the math for the 12v down to 5v but basically it's the same heat dissipation of 7 watts so the math above should apply just the same.

And again, keep in mind all the above is for 7 watts, not 10 watts like you asked.  For 10 watts, you're going to need a better heatsink, with maybe 6-7C/W instead of 9C/W... so that's even larger in size.

edit: sigh, this forum hates the O with line in the middle and replaces it with ? ...
« Last Edit: June 15, 2013, 11:31:23 pm by mariush »
 

Offline AsimTopic starter

  • Regular Contributor
  • *
  • Posts: 171
Re: A question about power supplies based on LM317.
« Reply #12 on: June 15, 2013, 11:48:31 pm »
Alright,  :)
Thank you so much for your help. Now I have the information I need to build this.
Thanks again
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9946
  • Country: nz
Re: A question about power supplies based on LM317.
« Reply #13 on: June 16, 2013, 12:11:45 am »
This is unlikely to be an issue, but some laptop adapters have more than two wires and "talk" to the laptop. A few of them don't output anything unless instructed to do so over this communications channel, or just behave weird.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Mr Smiley

  • Frequent Contributor
  • **
  • Posts: 324
  • Country: gb
Re: A question about power supplies based on LM317.
« Reply #14 on: June 16, 2013, 06:47:35 pm »
On lappy psu's i've found that the outer metal contact is 0V, the inner outside metal contact is +Vcc and the centre pin ( which you would think was +Vcc ) is actually a feedback pin from the lappy to the supply  :wtf:

I know for sure, if this centre pin wire is broken, Dell lappys tell you your not using an official power supply and either shut down or limit what the lappy can do  :wtf: :wtf:

 :)
There is enough on this planet to sustain mans needs. There will never be enough on this planet to sustain mans greed.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: A question about power supplies based on LM317.
« Reply #15 on: June 16, 2013, 06:52:20 pm »
I know for sure, if this centre pin wire is broken, Dell lappys tell you your not using an official power supply and either shut down or limit what the lappy can do  :wtf: :wtf:

I see Dell has gotten significantly shittier since I decided it was too shitty to bother with.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline niflheimer

  • Contributor
  • Posts: 49
  • Country: ro
Re: A question about power supplies based on LM317.
« Reply #16 on: June 16, 2013, 07:03:42 pm »
Most of them use a resistor of a given value to identify the proper charger - though I did encounter one that was using a VOLATILE memory to store the product id and code. Once the backup battery was out , so was the charger :)

It's the same with laptop battery bricks these days - and now they even encrypt the EEPROMs in addition to deleting them on power loss :(
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5024
  • Country: ro
  • .
Re: A question about power supplies based on LM317.
« Reply #17 on: June 16, 2013, 07:24:51 pm »
They use either an eeprom sort of IC or a resistance, to differentiate between 65w and 95-110w adapters. 

If the laptop is one that normally comes with a 90w+ adapter,  then with the 65w adapter, the laptop will run but may not charge (because there's not enough current to guarantee charging at same time with normal operation) or may throttle down the cpu speed to keep the overall usage under 65w.

So it's not really the laptop "talking" to the adapter, it's just the laptop "reading" a sort of identification for the adapter to see what kind of adapter it is.

Either way, you'd still have around 60 watts to work with.
 

Offline Paul Price

  • Super Contributor
  • ***
  • Posts: 1419
Re: A question about power supplies based on LM317.
« Reply #18 on: June 18, 2013, 12:30:09 pm »
Just replace the power supply connector, just solder on another of your liking and use this excellent power supply.
 

Offline Strada916

  • Frequent Contributor
  • **
  • Posts: 252
  • Country: au
Re: A question about power supplies based on LM317.
« Reply #19 on: June 18, 2013, 02:27:29 pm »
Also remember LM317 has a over temp shut down. Its in the data sheet.
The Bone, the Off-White, the Ivory or the Beige?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf