Scrap iron is separated from a heap of waste materials in factories by using large electromagnets fitted to a crane. The electromagnet fitted crane is moved up and away from the waste to drop these scrap iron objects at a separate place. Electromagnets are used for this purpose because one can switch on and off the supply of magnetism during the process of lifting and dropping of the iron pieces.