Worn carbon motor brushes typically cause motor sparking when you're running the mixer.
Unplug the stand mixer and examine the motor brushes for wear. To remove a motor brush, use a screwdriver to unscrew the motor brush cap. Pull the cap and the carbon brush out. Measure the length of the carbon motor brush to determine its level of wear. Replace the carbon motor brushes if either brush is shorter than 5/16-inch because a carbon brush can cause sparks when it wears down below that length. Replace both carbon brushes at the same time to keep the motor running smoothly and efficiently.