Marlin keeps restarting when I push the LCD controller button I am new here and also new for the 3D printers world.  I have built a 3D printer myself. Everything seems okay, but, when I install Marlin firmware I can't use the printer.
While my printer is connected to my power supply (12 V; 30 A) and when I push the button on the screen for selecting the menu items, Marlin is restarting.
But, when I connect my computer with USB and power supply together, Its working fine
I am using RobotDyn Arduino Mega 2560, RobotDyn Graphic LCD controller, RobotDyn DRV8825
Any help will be highly appreciated.
If the trouble was just a short between 5 V and ground, the board probably would restart whenever you pushed the button, with all kind of power sources.
The fact that the Arduino restarts only when powered from RAMPS makes me wonder another cause for this problem.
It's well known that most of Arduino clones don't have a good voltage regulator onboard. This causes trouble when you power Arduino from RAMPS, because RAMPS sends 12 V to Arduino through Arduino's Vin pin, and this 12 V goes to Arduino's voltage regulator, which should reduce it to the 5 V used by ATMega MCU.
The question is, probably the Arduino's onboard voltage is running almost at its capacity and, when you press the button, the extra processing load or the redrawing of the display makes Arduino reset.
The solution would be disconnect diode D1 in RAMPS, and power Arduino from USB, or feeding 5V directly to Arduino's 5 V pin (not Vin).
A third option (more complex) would be feed about 7 V to Arduino barrel power-connector. This lower voltage would reduce the task of Arduino's onboard regulator. My 3D-printer uses an Arduino clone, but, as I discovered about this problem before building it, I've never powered it from RAMPS. I dessoldered D1 on RAMPS and, since the first day, Arduino was powered from USB, or from a DC-DC buck converter that reduces 12 V to 7.2 V.