Stromkreis, Erdleiter, Elektromagnet