Arduino Due noise protection

Hello everyone, I've got my Arduino Due connected to two load cells, one inductive sensor and some solid state relays to control a machine. The thing is, sometimes when the machine is operating, my laptop returns me "device not found on COM6" so it wont upload the sketch. This stops when i turn off the machine motor.

The arduino is power supplied by a switching power supply and protected with a grounded metal sheet box. All io voltages and currents are within spec.

Do you have any advice for protecting it more?

Regards, Bruce

Add inductors on all the input and output wires, just where they come into the box. You may have seen USB cables or other cables with a cylindrical blob over the cable? That's an inductor to reduce the amount of radio frequency noise emitted or accepted by the cable.