Electrical fault detection in a 3- \(\phi \) generator requires specialized knowledge, experience, and proper equipment and safety procedures due to high voltages and currents. Previous current–voltage variations were used to detect faults in these machines, but high voltage and current values made data collection difficult. Thus, we propose a machine learning based stator fault detection method achieving 99.9% accuracy using vibration data. The proposed method extracts time-domain and frequency-domain features, selects the most relevant ones, and uses a Random Forest classifier to identify faults and predict severity. Testing the model with noisy data yields 99.7% accuracy, proving its robustness. Explainable AI (XAI) interprets prediction results to improve model transparency and show that vibration data is better than current signals. The proposed method efficiently and reliably detects electrical problems in 3- \(\phi \) generators, improving power system reliability. The edge computing prototype, incorporating a Raspberry Pi, is utilized to assess the capabilities of the model at the edge.