Reducing linear regulator dissipation when a USB supply is provided from a higher voltage source:
In Majenko's LM317 supply which is operated from 12V, you can more than halve the power dissipation in the LM317 under wort case conditions by adding a cheap air cooled wire mounted series input resistor.
The LM317 needs 2 to 2.5V headroom at lower currents or say 2.75V under extreme load and temperature conditions. (See Fig 3 in the datasheet, - copied below).
LM317 headroom or dropout voltage
Rin has to be sized such that it does not drop excessive voltage when V_12V is at its. minimum, Vdropout is worst case for the conditions and the series diode drop and output voltage are allowed for.
Voltage across resistor must always be less than =
So Rin <= (v_12 - Vd - 2.75 - 5)/Imax.
For 12V minimum Vin, and say 0.8V diode drop and say 1 amp out that's
(12-0.8-2.75-5)/1
= 3.45/1
= 3R45
= say 3R3.
Power in R = I^2R = 3.3W so a 5W part would be marginally acceptable and 10W would be better.
Dissipation in the LM317 falls from > 6 Watt to < 3 Watt.
An excellent example of a suitable wire lead mounted aircooled resistor would be a member of this nicely specified Yageo family of wirewound resistors with members rated from 2W to 40W air cooled. A 10 Watt units is in stock at Digikey at $US0.63/1.
Resistor ambient temperature ratings and temperature rise:
Nice to have are these two graphs from the datasheet above which allow real world results to be estimated.
The left hand graph shows that a 10 Watt resistor operated at 3W3 = 33% of its rate Wattage has an allowable ambient temperature of upto 150 C (actually about 180C if you plot the operating point in the graph but the manufacturer says 150 C max is allowed.
The second graph shows that temperature rise for a 10W resistor operated at 3W3 will be about 100C above ambient. A 5W resistor from the same family would be operating at 66% of rating and have a temperature rise of 140C above ambient. (A 40W would have about 75C rise but 2 x 10W = under 50C and 10 x 2W only about 25C !!!.
The decreasing temperature rise with an increasing number of resistors with the same combined Wattage rating in each case is presumably related to "Square cubed law" action as there is less cooling surface area per volume as size increases.
http://www.yageo.com/documents/recent/Leaded-R_SQP-NSP_2011.pdf