We are using an Arduino Mega for a commercial / industrial application
It is connected to 7 stepper motor drivers, a temperature shield, digital potentiometers, and a couple of RS485 adapters
The steppers have their own separate power supply (Switched)
The Mega is powered by a 12V switching power supply, connected to VIN and to GND
There is annother control unit on the equipment with its own electrical connection to the main, on the signal side it is connected to the digital potentiometer
We encounter some interesting problems: The USB connection to the computer is not stable.
When mounted in the electric cabinet together with all other equipment, the only way to get connection for programming is to remove both GND and VIN between the board and the power supply. Also, it makes a difference if the computer is connected to the mains, or if it runs on battery only.
If we take out the board from the cabinet and connect it to the same power supply, and to the computer (USB), the conection to the computer works fine.
Good practice for ground
How to wire this equipment, shall we connect everything to earth ground, or shall we work with a common ground ?
On the other control unit, there is earth ground on the incomming main, but there is also GND on the low voltage signal side. How to treat those in this system?
Even though we connect all components to a common ground, or to earth ground, still the USB seem to live its own life. Is there no physical connection between the USB gnd and the board gnd available on pins
How to power the Mega in a a robust and durable way
While trying to understand our issue, I came across an article/statment where is was argued that any professional application will power the Mega with a separate 5V suupply. It was argued that the VIN was just created for educational purposes and not a very robust system.
If we get a 5V switched power supply and connect that to the 5V pin, then there is no protection to the board, but that may not be a problem ?
A good advice would be appreciated