A very real danger is that the obsolete tutorials on the Arduino site and others misleadingly imply that the largely ornamental "barrel jack" and "Vin" connections to the on-board regulator allow a usable source of 5 V power. This is absolutely not the case. It is essentially only for demonstration use of the bare board back in the very beginning of the Arduino project when "9V" transformer-rectifier-capacitor power packs were common and this was a practical way to power a lone Arduino board for initial demonstration purposes. And even then it was limited because an unloaded 9 V transformer-rectifier-capacitor supply would generally provide over 12 V which the regulator could barely handle.If you are asking this question, it is highly likely that you will wish to connect something else. In which case, the answer is regulated 5 V.This is because the on-board regulator is essentially capable of powering only the microcontroller itself and no more than a couple of indicator LEDs. The on-board regulator might be able to power a few other things if it had a heatsink, but on the (older) Arduinos, it does not.Powering via the "barrel jack" or "Vin" connections is asking for trouble. The "5V" pin is not by any means an output pin, if anything a "reference" pin but most certainly the preferred pin to which to supply a regulated 5 V.
Thank you for your reply; I apologise if I did not clarify in the original post: I intend to use a DC-DC 12v to 5v converter that outputs USB to connect a 12v adapter to the USB input of the mega.
I saw that. But still a very clumsy way to do it. The UNO and Mega use a 500 mA "polyswitch" to protect the USB input. If you draw 900 mA, it will - after some time - shut the system down. I suspect that is not what you want. The "5V" pin is the proper point to feed regulated 5 V. The Arduino itself will not draw much power (it can't really - there are limits to how much each port can drive and the supply pins can take) so there will not be too much going into that pin and your 5 V supply will connect to that pin and all the other 5 V devices.
On a different note, if I feed the Mega regulate 5V at the '5V' pin, how much current can I pull from each of the available 5V pins?
Curious question!Do you refer to distributing power from one 5 V pin on the Mega to another? Presumably in order to group wiring together. Not critical, a couple of hundred mA would be no great problem. You may need decoupling capacitors across 5 V and ground of sensors.
How do you power the EMR1/2 relay coils.Not straight from Mega pins I hope.Leo..
The relay coils are rated for 3V.
Yes, but what is the current draw of the coils.Absolute max pin current of a Mega is 40mA, and should normally not be higher than 20mA.Common 3volt relays draw 100-200mA.If you have 12volt available, then use 12volt relays.With a 2N2222 or similar transistor (with 1k base resistor) driving the coils.Leo..
Please let me know if I need to provide anything else. I've attached PDFs of my schematic (EAGLE) in case it would be useful.
The 12V to 5VUSB is a great solution. The particular one you linked to is rated for 3A, plenty for a Mega with 2.5A to spare for other loads.Use a ULN2803 or similar to sink current for the 12V relay coils.