Previously i have a project using arduino UNO and im connecting the dc power source from switching power supply to the 3 pin power jack on the lower side of the arduino UNO like on the picture below.
Now im trying to use arduino Mega 2560 Mini like this one
Whats the matter with the barrel jack? Or the USB? Or the +5 pin? Don't solder if a connector is available. If you ever have to service it, de/re-soldering is a major PITA and may cause damage.
What is the voltage of the switching power supply?
If you have a regulated 5V power supply, the 5V pin.
7 volts or more, use the Vin pin. Board is marked with a maximum of 18V, but the closer to 7V the better, the voltage regulator runs hotter with higher voltage.
because im also using 12v dc peristaltic pump and solenoid valve, i have to powered it by using switching power supply, im using the usb to upload the program, the main power is from switching power supply
The voltage regulator is a NCP 1117. It's a low dropout regulator having a maximum input according to the data sheet of 20 volts. I would never run it that high and remain in the 7 to 12 volt region. As mentioned you push it and it gets hot. The Vin pin is the cathode side of D1 in the schematic.
In a word No you can not solder to the Vin pin which is upstream of the 5.0 volt regulator. The Vin pin should be above the dropout voltage of the regulator (1.2 volts). You can run 5.0 volts into the 5 V pin. Which is VCC_5V in the attached schematic. So Yes you can power the board using the 5 V pin.
I have a couple of Mega 2560 Compact Pros that have been running constantly for over 3 years, without any problems.
Be sure to check that the 5V DC supply is very stable, precisely controlled, and reliable. You do not want it drifting away from 5V by much (+/- 0.2). Get a multi-meter on it!
I power all my projects via the 5V pin (except when programming and testing via the Usb port).
Yes. Solid power is essential. cell phone chargers are soft devices and will often sag to 4.7V or less depending on load. They'll also rise an equal amount under no load. Not the best for long term power.
Switching power supplies can get noisy under light loads. At least 5% load is usually needed to maintain regulation.
I use UL approved, medical grade, universal input, 5V at 3A, wall warts, with 5.5x2.1 barrel jacks from Jameco.com: