After tidying up the wiring I had a strange CPU overheating problem with my printer electronics. The problem turned out to be a general one that is not related to a specific CPU or electronics board. Since others might be having the same problem, I thought that I would share the solution here.
In a nutshell: If your CPU tends to overheat when printing, consider using thinner(!) wires for the endstops or add small resistors in series to the endstop connection.
The symptoms:
I am using my mega1284P-based Melzi-Version (Ulule-campaign still active, please see link in signature) on a Prusa Mendel i2 bootstrap. Everything was working fine, and the motors were moving smoothly. But right after starting a print the CPU suddenly got really hot (about 65°C) and never cooled down again. Even after stopping the print or pressing the reset button the CPU temperature stayed high.
I found that the overheating was linked to the mechanical endstops. Trigger one of the endstops briefly (even by hand) and the CPU responds immediately by starting to heat up. The only thing that cleared the problem and brought the CPU temperature back down to normal was a brief power disconnect.
Solution:
The endstop wires form a parasitic inductivity that generates a negative voltage spike on the endstop inputs when the NC switches are triggered. This pulse causes a latchup condition in the CPU which can only be cleared by a power disconnect. However, adding some additional series resistance dampens the parasitic oscillator formed by the wiring and avoids the voltage peak completely.
The parasitic oscillating circuit can be dampened by simply adding a small resistor in series with the switch (10 ohm to 1k is fine). In some cases even the increased wire resistance of a thinner wire for the endstop connection might be enough. My endstops are wired with 0.2mm² (or AWG24) wire, which is much thicker than necessary and has too low a resistance to dampen the oscillation.
In a nutshell: If your CPU tends to overheat when printing, consider using thinner(!) wires for the endstops or add small resistors in series to the endstop connection.
The symptoms:
I am using my mega1284P-based Melzi-Version (Ulule-campaign still active, please see link in signature) on a Prusa Mendel i2 bootstrap. Everything was working fine, and the motors were moving smoothly. But right after starting a print the CPU suddenly got really hot (about 65°C) and never cooled down again. Even after stopping the print or pressing the reset button the CPU temperature stayed high.
I found that the overheating was linked to the mechanical endstops. Trigger one of the endstops briefly (even by hand) and the CPU responds immediately by starting to heat up. The only thing that cleared the problem and brought the CPU temperature back down to normal was a brief power disconnect.
Solution:
The endstop wires form a parasitic inductivity that generates a negative voltage spike on the endstop inputs when the NC switches are triggered. This pulse causes a latchup condition in the CPU which can only be cleared by a power disconnect. However, adding some additional series resistance dampens the parasitic oscillator formed by the wiring and avoids the voltage peak completely.
The parasitic oscillating circuit can be dampened by simply adding a small resistor in series with the switch (10 ohm to 1k is fine). In some cases even the increased wire resistance of a thinner wire for the endstop connection might be enough. My endstops are wired with 0.2mm² (or AWG24) wire, which is much thicker than necessary and has too low a resistance to dampen the oscillation.