Electrical Current and Wiring
An electrical current runs through many components of the dishwasher, allowing the dishwasher to sense temperature, pump in water and spin its blades to spread the water through the dishes. The wiring that this current runs through can short out, especially with time and corrosion. If your dishwasher develops an internal leak that causes the short, it could cause sparks before the wiring fails.
Capacitors are basic circuit devices that your dishwasher uses to store electricity for specific tasks. A failing capacitor can also produce an electrical overload that can cause sparks and short out different parts of your dishwasher. Capacitors will carry a charge not only when your dishwasher is running but even when it is turned off and unplugged.
Dedicated Circuit Problems
Your dishwasher uses dedicated circuits to operate when it is running. An overload from an external source can move through these circuits, burning them out and creating sparks and smoke that indicate failed electronics. The wiring may still be working correctly, but the circuits themselves may not be able to deal with the charge, leading to failed control panels and other component problems. This will stop your dishwasher from working and may require full replacement of the circuit wiring to restore functionality.
Your dishwasher uses a simple motor system to turn its blade, allowing it to spray water up through the washing compartment. This motor uses coils to generate its electromagnetic force. Insulation problems and wear can cause these coils to burn out. This can create sparks and smoke while your dishwasher is working. You will need to replace the motor; once it has failed, you cannot repair it.