A spice grinder is simply a fancy name for a repurposed coffee grinder. A simple one is just fine.
I like to have a separate spice grinder and coffee grinder. Otherwise, you run the risk of having curry-flavored coffee. Ewwww.
If you don’t have a separate coffee grinder, use rice to clean out your coffee grinder. Just grind the rice super-fine and dump it out to get rid of the coffee smell. Then grind your spices and repeat the rice grinding before grinding any more coffee!