mega 2560, question about common grounds

Hi. so i'm in the process of finishing up wiring up my power distribution box and drivers for my stepper motor project. I have everything neatly placed within a computer case and have multiple power supplies. There's a external 9v for the arduino using the Vin pin, and external 5v supply for my LCD display, rotary encoders and anything else needing 5v, a 12v for cooling fans/lighting/ect, and a 24v and 60v for my stepper drivers.

The arduino has 3 grounds and i assume they are separate, one side is for the power supply, the other side is for pins 2-13, and another ground for pins 22-58. so i've been careful to keep them separate as well.

But what i was unsure about was should i pull a ground from each power supply and ground it to the arduino's ground? I'm pretty sure that's the best thing to do. But i've reached a point where i'm about done and would hate to fry something, or have other problems once i fire up the arduino and put it too work.

All of the Ground pins on the Arduino Mega are connected together. There are just multiple ground pins for convenience. Run all grounds to a common point.

Thanks for the info. I was unsure about the grounds because i heard some questionable info about the grounds on the mega 2560. Here's a pic of my box i've put together for the power and motor drivers. the only thing i'm lacking is incorporating the lcd and keypad code into my program. Which i'm hoping it shouldn't be too big of a job figuring it out and getting it working. But i still have other work to do on my machine before i can even hook up the electronics.

Why do you use a 9V battery if you already have a 5V supply?

I'm not using a battery for it's power. I'm using a small isolated dc/dc converter that giving the board about 8v after it going through the diode to stop the parasitic drain when it's connected to the USB. I did debate about hooking it up to the existing 5v, but i wanted it separate since i'm gonna have many things running off the 5v and didn't want anything effecting the power going into the board, tho it probably wasn't necessary.

Running an Arduino from power on the "Vin" pin is asking for trouble! :astonished:

Paul__B:
Running an Arduino from power on the "Vin" pin is asking for trouble! :astonished:

So what kind of trouble am i asking for by powering it by the Vin pin? I thought the Vin pin was meant for a hardwired setup or battery power without using the USB or barrel jack for the power input, because the specs say it needs to be between 7-12v with 9v being best.

wildcat99s:
the specs say it needs to be between 7-12v with 9v being best.

9V has no advantage and some disadvantage over 7V. If you use a voltage over 7.66 you won't be able to draw the maximum current (1A) from the regulator without overheating it. That makes 7V or 7.5V a (slightly) better choice than 9V.

ok. I can see that since the excess voltage just generates a little extra heat. So i'll turn the voltage down a little. They probably say 9v is because the availability of 9v batteries which is smaller and easier than a battery pack = to 9v.

wildcat99s:
So what kind of trouble am i asking for by powering it by the Vin pin? I thought the Vin pin was meant for a hardwired setup or battery power without using the USB or barrel jack for the power input, because the specs say it needs to be between 7-12v with 9v being best.

The "Vin" pin or in fact the "barrel jack" which is the same with a diode, was provided to demonstrate the Arduino. Once you start connecting things that draw current, and that includes connecting things to draw current from the "5V" pin, you are playing with fire - or not! This is even worse for the Mega as it has more pins to connect things to! :astonished:

The on-board regulator - unless you use a variant such as the "RoboRed" (it has a proper switchmode regulator) - has no heatsink of significance. It may theoretically have a rating of 1 A, but only when bonded to a substantial heatsink. You can barely see it on the Arduino board. You will not get 1 A at 5 V from the board with any "Vin" voltage for more than a second or two before the regulator overheats - and hopefully shuts down peacefully. You may be lucky to get 150 mA. :roll_eyes:

It is thus extremely bad design to use "Vin" in a serious project. Even if it works at a start, any modification may later cause trouble.

The microprocessor and its peripherals operate from 5 V. If you have 5 V then you provide it to the "5V" terminal. You can fudge it by connecting something such as a USB charger to the USB connector but there is a 500 mA polyfuse on the UNO/ Mega and a diode on the Nano interposed. If you do not have 5 V, then you provide a switchmode regulator to produce regulated 5 V.

Paul__B:
The "Vin" pin or in fact the "barrel jack" which is the same with a diode, was provided to demonstrate the Arduino. Once you start connecting things that draw current, and that includes connecting things to draw current from the "5V" pin, you are playing with fire - or not! This is even worse for the Mega as it has more pins to connect things to! :astonished:

The on-board regulator - unless you use a variant such as the "RoboRed" (it has a proper switchmode regulator) - has no heatsink of significance. It may theoretically have a rating of 1 A, but only when bonded to a substantial heatsink. You can barely see it on the Arduino board. You will not get 1 A at 5 V from the board with any "Vin" voltage for more than a second or two before the regulator overheats - and hopefully shuts down peacefully. You may be lucky to get 150 mA. :roll_eyes:

It is thus extremely bad design to use "Vin" in a serious project. Even if it works at a start, any modification may later cause trouble.

The microprocessor and its peripherals operate from 5 V. If you have 5 V then you provide it to the "5V" terminal. You can fudge it by connecting something such as a USB charger to the USB connector but there is a 500 mA polyfuse on the UNO/ Mega and a diode on the Nano interposed. If you do not have 5 V, then you provide a switchmode regulator to produce regulated 5 V.

Thanks for the info and i understand what your saying. The arduino is very limited on power output and the regulator will overheat if it's overloaded. I've read about the weak regulator before I started which is why i decided to use a separate 5v for all the peripherals, and used an isolated power supply to feed the board. The only thing the on-board regulator is powering is the microprocessor for my digital output but there is nothing else drawing a current from the board, so i believe i'll be fine in this case. Tho i will be installing a mini heatsink on the regulator to dissipate any extra heat as a precaution since this will be in my garage/shop and the ambient temps can get up there in summer and may have to make some extra cooling modifications. But i'll remember the info for the future.

Another reason to avoid using separate 5 V power supplies is the risk of "back-powering" one part from the other if one of the supplies is shut down.