Unsettling to contemplate, the flow of electrons that constitutes electric current also creates a magnetic field. An onboard magnetic field that is strong enough may deflect your compass and cause deviation. DC circuits are the primary culprit; AC circuits are comparatively insignificant. The strength of the field is proportional to current flow; 8 amps produce twice the deflection of 4. Twisting the leads before installing wire so that positive and negative produce opposing fields has been the traditional defense. Leading separate positive and negative wires from the same circuit on opposite sides of the binnacle only doubles the error. The better you isolate your compass from electric circuits, the less the force will be with you.
For more than 1,000 tips, suggestions, evaluations, and nuggets of hard-won advice from more than 300 seasoned veterans, purchase “Sailors’ Secrets: Advice from the Masters” from Practical Sailor.