I bought new power supply recently for my p4 computer but when i going to plug in the power cable on it,sometimes it sparking. Me also changed the power cable but sometimes still have same problem,Sometimes it work good but sometimes it spark.
Where does the spark come from? Do you see the spark from the plug as you plug it into the AC wall outlet? If you do, then that is normal since your PC draws current immediately upon being plugged in hence, the sparks. If you want to lessen the sparks, I suggest turning off everything such as the monitor so that it doesn't draw power immediately upon plugging it in. If the spark is coming from the AC plug connector in the power supply unit itself, then try cleaning the contacts.
Sparks usually appear when there is poor electrical contact between metal surfaces caused by accumulated dirt, dead insects, cobwebs or, rust. Clean the contacts using sandpaper or contact cleaners that are available in electronic shops.
According to your details, Fault in your PSU and Don't Use it when Sparking. That is a huge risk for your Motherboard and other devices. Check your PSU basically and I recommend New PSU. Don't Burn your valuable devices.
If you are referring to the AVR or the automatic voltage regulator, you shouldn’t get scared because that’s normal when plugging the power cable to the power. The main job of the power supply is to maintain or keep a steady voltage and avoid power fluctuation that can damage the computer. This is important during power outage.
When the power goes back, the power supply can prevent power surge from damaging the computer because it limits the output to a certain voltage only. When you plug the power cable of the computer to the power supply, you should see a spark because the internal power supply of the CPU begins to work.
It begins to absorb and receive power from the external power supply unit then distributing it to the different electronic components of the motherboard.