The compass is an instrument which is affected by the magnetic field of the earth. The compass needle indicates the north. The compass can be affected by things such as metal objects or magnets etc. in the nearby area
Another way to influence the indication of the compass is to the place it near a circuit from which electric current is passing.
According to the law of induction, as electric current passes through a conductor (e.g. electrical wire) there is always a magnetic field created around the conductor
This field, however, is extremely weak and cannot be used directly.
Though in this principle is based the operation of all power plants.
The phenomenon has been first observed by the Danish scientist Hans Christian Oersted in 1819
You need:
1 battery of 9 Volt
2 cables with crocodile clips at the end
1 compass
1 coil