I am utilizing an Arduino Uno to control a stepper motor with a holding torque of 8.5 Nm, paired with a DM860T stepper driver designed for a rated current of 6 amps. The driver is powered by a 48V supply voltage. Meanwhile, the Arduino Uno receives its power from a 12V source via IC7812 on VIN. All components, including the drivers and PCB, are housed within a flameproof panel mounted on a 300 x 200 mm aluminum plate to efficiently dissipate heat. It's important to note that this Arduino is dedicated solely to operating the stepper motor and is not utilized for any other functions such as illuminating LEDs.
However, during operation, the MCU (Microcontroller Unit) heats up and the program malfunctions. Interestingly, once the panel is opened, it starts working fine again.
Is it the 328P heating up? I'd be very surprised by that.
Or is it the 5V linear regulator on the Uno? Possible; you're asking it dissipate 7 * whatever amperage the Uno is consuming.
Or is it the 12V linear regulator (assuming it's in the panel too)? If you're feeding this regulator from that 48V supply you mentioned, without looking it up, I think the maximum voltage it's guaranteed for is something like 35V.
Try replacing the Uno. In these conditions it should get slightly warm, nothing more.
The Uno may draw approximately 30mA for itself, plus maybe another 15mA for driving the opto-isolators in the stepper controller. With a 12V supply it should be dissipating (12-5)*(0.030+0.015) = 0.3W
The 48V to 12V regulator will be dissipating (48-12)*(0.030+0.015) = 1.6W. could this be where the heat is really coming from?
I suggest using a DC-DC "buck" regulator, to cover 48V directly into 5V to supply the Uno through it's 5V pin. This type of regulator is more efficient, so generates less heat.
Changing the voltage will only affect the regulator; the microcontroller itself operates from 5V in both cases. And in any case, the controller should not get hot at all. You have something assembled incorrectly or you fried the microcontroller earlier when you tried other projects on it
If you post an annotated schematic you should get an accurate answer rapidly without a what if guess. Be sure to show all connections, power, ground and note any leads over 25cm/10" in length. What is the internal case temperature? Be sure to show all components.