Possibly, the inductive spikes from the stepper motor switching blew the v.reg or
other circuitry. This is why it's always good to use a separate power supply for such
loads. Another likely possibility is accidentally touching 12V to a pin on a 5V part
- easy to do.
Also, for best results, on the power input to the stepper motors, you will want to add
both bypass [0.1 uF] and reservoir [100 uF or more] capacitors at the point where the
external supply connects to the motor driver board, in order to filter motor noise, etc.
You want his whether you're using steppers, regular motors, or servos. They all
generate a lot of electrical noise.
A silly question (sorry but not an electronics expert). My understanding is that
the SMD voltage regulator within Arduino Mega ( NCP1117ST50T3G) drives up to 1A.
Everything the other guys said about overheating the tiny smt v.regs is true. With 12V
for Vin, you can only realistically provide 100-200 mA of load current at 5V without
heating problems.
The question is not silly at all, because the overheating issue is not to be part of the general
info provided in adverts, so it comes up on this forum a couple of times every week, and
has to be explained again and again.