Arduino Mega voltage regulator overheats with RAMPS board This is my problem:
I'm assembling a 3D printer with the RAMPS 1.4 board and Arduino Mega. I have assembled the structure and the electronics (set drivers, placed the jumpers, connected stepper motors...) and have uploaded Marlin firmware (configuring: thermistor, endstops...) on the Arduino Mega.
I've tried to connect, via USB, to the computer and using the Repetier software I have commanded the printer which did do some movement. The printer worked perfectly. After a few tests, however, I've noticed that the Arduino was restarting several times and at one point I saw a component on the Arduino board burning. Searching the internet I saw that the burned component was the voltage regulator.
I heard also about unplugging the screen because it consumes a lot of current, that passes through the voltage regulator, thereby heating it up. I then proceeded to buy another Arduino Mega. I also checked the voltage of my 12V 360W power supply and it is correct. I always powered the Arduino with USB and RAMPS 1.4 was connected to the power supply from the two terminals.

When the new Arduino arrived, I connected the whole (without connecting the screen) and tried. The printer worked very well until it started giving the same problem as the first Arduino board. Someone can tell me if I have done something wrong, or is it the RAMPS board that does not work properly?
EDIT:
I read that the endstops can cause this problem. I have these endstops: 1 PZ di Alta Qualità Finecorsa Meccanico Per rampe Reprap 1.4 stampante 3D Con imballaggio indipendente kit fai da te and I connected the black wire to GND, red wire to 5V and the green wire to SIGNAL.
I've solved unsoldering the diode(D1) on RAMPS. This diode provides to power the arduino board with 12V. If you have a chinese arduino this will probably cause some problems.


I hope this will help someone.