Should an LM317 (specifically a TI LM317MQDCYR) rated for 500ma output current really be getting hot to touch when only pulling 170ma at 5V?
Package is SOT-223, input is 9V.
Is this normal?
Dissipation is (9-5)V*170mA, or 680 mW. SOT223 thermal resistance is 62.5°C/W maximum. So the junction temperature is 62.5 * 0.680, or 42.5 degrees above ambient. And the thermal resistance to the case is about 15 °C/W, so the case will be 42.5-(15*0.680) or 32.3 degrees above ambient. If ambient is 25°C, the case is at 57°C. Does this sound right?
(You should look up and substitute your own thermal values, I just grabbed some from the Zetex datasheet. But I expect all SOT223 will have similar thermal characteristics.)
Notice that the 500 mA rating has nothing at all to do with it. Temperature is determined by the power dissipated, which is set by the input-output difference and the output current, and the thermal characteristics of the package and surroundings.
markrages is right, it is normal this kind of regulators burn the energy of as heat. If the heat is a problem there is two ways to solve it.