I have a circuit that takes two analog inputs and positions a stepper motor accordingly. The problem I have ran into is the ground has a lot of noise and in turn makes my a/d inputs noisy and then the motor starts to get shaky and all kinds of strange stuff. I have tried isolating the grounds and also a star ground. I am sure the noise is coming from the stepper motor driver and the high speed switching. The board has both 12V(for motor) and 5V(for microcontroller and a/d's) regulated supplies and the noise is also coming through on them. The only thing that I have found to eliminate this is when I attach the ground lead from the oscilloscope to the ground on the board and it goes away. Why is this? What can I do to try and solve this problem. I am completely out of ideas TIA.
The actual topology of your ground system is important in cases like this. Currents don't just go away when they reach a ground node, they return to their source. What you want to do is to minimize the amount of conductor that the motor return currents share with the return current for the A/D section. For instance, the 12V return wire should go quite near the stepper driver, and for the 0V reference you can tie the logic ground and stepper-driver ground (12V return) together at just that point.
Just try a few decently sized shunt capacitors from the 5V to gnd and/or 12V to gnd. Make sure of the polarity and voltage rating.
Sounds as if its grounding through the O'scope back to earth ground. Can you connect your pcb ground to the line cord ground?