A sorting device to sort granules within a bulk of granules, where the
granules differ in quality includes a positioning means giving a
well-separated position for each granule. At least one detector is
arranged to receive electromagnetic radiation or sonic waves sent by an
energy source via the granules. Furthermore, ejecting means are arranged
to eject the granules into receiving means based on the detected quality.