Grinding spices yourself can be extremely rewarding, especially if you do so with a mortar and pestle so the aromas waft up as you crush the contents. Spices vary so much in size, hardness, texture and oil content that it is almost impossible to find a domestic grinder, other than a mortar and pestle, that will handle them all.
Seed spices, such as pepper, can be ground in a normal pepper mill. You can also use a coffee grinder, but electric grinders can generate excessive heat that can destroy some of the lighter volatiles, so don’t over-grind. Don’t try and grind hard spices like star anise, cinnamon, cassia and dried ginger slices in a coffee grinder, as they will damage the blades. Just think of how friable a coffee bean is, and remember that anything harder may cause a problem.
When it comes to all other spices, use the trusty mortar and pestle that has been one of the cook’s most useful implements for thousands of years. Believe it or not, the basic design of a mortar and pestle has not changed over millennia!