I've built a LED PWM controller according to the below schematic and the voltage regulator is getting extremely hot (I can't touch the heatsink).
I've measured input and output voltages and currents and these are:
Vin = ~24 V
Vout = ~4.85 V
Iin = 80-95 mA
Iout = 80-95 mA
If my regulator is indeed L78S05 (because the package says UL75S05, but can't find any datasheet for this) then it should handle up to 2A easily and up to 35 V on input. Also if I understand correctly, it reduces the voltage by dissipating excess power as heat, so how hot would it get if it would be supplied by 35 V and 2A?
Unless there is something wrong with my construction and it shouldn't get so hot right now. If so, could you help me find what is wrong?