Questions on fundamentals of grounding

Hey all. Just have a few basic grounding questions, would appreciate some clarification. Here's a hypothetical situations. Let's say I would like to use the Arduino connected to my laptop via USB to control a robot. The robot would utilize beefy DC motors which would be powered via an external power supply. The DC motors are switched by an Arduino using a BJT and MOSFET pair (circuit for illustration: http://www.cq.cx/pics/int-switch-p-fet.png). Let's also assume the laptop and power supply are connected to the same mains receptacle.

Since the Arduino and external supply are using different grounds, what are the foreseeable issues? Or, are they actually on the same ground, since they are connected to the same mains? Would it be a wise choice to connect the ground of the Arduino to the ground of the power supply to common the two, or is that just a bad idea?

Now what if the Arduino was instead powered off a 9V cell instead of USB and the grounds were not common, any foreseeable issues? I'm curious whether the input of the BJT (where the digital out of the Arduino is fed into) would be 'seeing' a fluctuating voltage (since ground not the same) or if it would be a constant 5V.

Thanks!

Would it be a wise choice to connect the ground of the Arduino to the ground of the power supply to common the two,

Not only is it sensible but it won't work if you don't do it.
See:-
http://www.thebox.myzen.co.uk/Tutorial/Power_Supplies.html

With large currents you need to ensure a common ground point or a star connection to prevent problems from ground currents.

He must be another software guy like me. We are terrified of high voltage; even the ground side... ::slight_smile: ;D :smiley: ;D