This repository contains an Arduino program designed to monitor and analyze the performance of a DC motor using a current sensor module. The program measures the motor's current consumption and evaluates potential faults in the motor's geartrain based on peak current readings.
- Current Measurement: Utilizes a current sensor module to measure the DC motor's current consumption.
- RPM Calculation: Uses an encoder to calculate the motor's RPM (Revolutions Per Minute).
- Fault Detection: Analyzes current readings to detect irregularities that may indicate geartrain faults.
- Fitting Function: Predicts expected healthy RPM based on a fitted function and compares it to measured RPM.
The program continuously reads current data from the sensor, calculates RPM, and compares the measured RPM with the expected healthy RPM derived from a fitted function. If the deviation exceeds a set threshold, it flags the motor as potentially faulty.
To run this program:
- Set up your Arduino board with the appropriate connections.
- Upload the
main.inosketch to your Arduino IDE. - Ensure the current sensor and encoder are correctly wired.
- Monitor the serial output to observe motor RPM and fault detection status.
- Sensor Calibration: Adjust ADC readings to accurately represent current values for your sensor.
- Fitting Function Parameters: Tune parameters for the fitted function to match your motor's characteristics.
Feel free to contribute to this project by opening issues, suggesting enhancements, or submitting pull requests. Contributions of all kinds are welcome!
This project is licensed under the MIT License - see the LICENSE file for details.
Maintained with โค๏ธ by Your GitHub Username