First of, I'm sorry if I'm using the wrong terms or if I'm pointing out something that is obvious to most, this is not my profession, it's only a hobby.
I have an input voltage of 12V 5A which is needed for a water pump. I'm trying to use the same source too drive a Raspberry PI Zero W together with a bunch of sensors. To lower the voltage to 5V I'm using a voltage regulator, L78S05CV, which I had lying around. It should be able to give me 2A but currently I'm only needing about 0.27A.
The voltage regulator has a heatsink with a thermal resistance of 29 °C/W and the regulator has a thermal resistance from junction to case of 5 °C/W (Rthj-a of 50 °C/W). The regulator dissipate around 1.89W ((12 - 5) * 0.27), which would mean around 64 °C ((29 + 5) * 1.89). Assuming an air temperature of 25 °C it should end up at around 90 °C. The regulator should have a operating junction temperature of up to 150 °C. Still I do belive that the regulator gets overheated after some time, I can see a drop in voltage to about 2.5V.
I am trying to understand the math here, to see if I need another heatsink with a better thermal resistance or if I should just look at other alternatives.
I have read several other responses to similar threads, but too be honest, the answers is a bit out of my league.