The answer to 'why is my generator sparking' is that it is likely due to a problem with the generator's electrical system. Sparking can be caused by loose connections, worn or damaged parts, or issues with the generator's voltage regulator or other components. This can lead to dangerous situations, so it's important to address the problem promptly.
Some common symptoms of a sparking generator include flickering or inconsistent power output, unusual noises, and a strong smell of burning or ozone. To troubleshoot the issue, you'll want to inspect the generator's electrical connections, check for any signs of wear or damage, and ensure that the voltage regulator is functioning properly. If you're not comfortable working with electrical systems, it's best to call a professional electrician to diagnose and repair the problem.