He created a simple electromagnet by taking a nail and a wire, wrapping about 100 loops of wire around the nail and connected it to a battery. With this he had a simple electromagnet with north and south pole. In the middle of the nail he had made a hole and put a spindle into the hole so that the nail could rotate. He then took a horseshoe-shaped magnet and placed the wire wrapped nail in the middle.