Hans Christian Oersted was the first to proclaim, in 1820, that a magnetic field is created around a wire that has a current running through it. In 1830, English physicist Michael Faraday ...
He built upon the work of Alessandro Volta who in 1800 invented the original battery and Hans Christian Oersted who in 1821 observed that a battery connected to wire moved the needle of a compass.