This project implements an automated control system using a microcontroller, featuring PWM modulation, EEPROM data storage, and various sensor integrations. The system is designed to manage motor control, safety mechanisms, and dynamic adjustments based on real-time sensor readings.
- PWM Control: Dynamically adjusts motor power based on system states and sensor feedback.
- EEPROM Storage: Saves and retrieves operational data to ensure continuity across power cycles.
- Hall effect sensor for positional feedback.
- Photoresistor for light-based system interruption.
- Emergency stop sensor for safety.
- Voltage sensor for power monitoring.
- Supports automatic operation based on pre-configured parameters.
- Manual override for user intervention.
- Outputs system status and operational logs via serial communication.
Pin | Function |
---|---|
D2 | Execute Button |
D4 | Status LED |
D5 | Photoresistor Switch |
D6 | PWM Output |
D7 | PWM Switch |
D8 | Save Settings Switch |
D9 | Motor 2 Control |
D10 | Motor 1 Control |
D11 | Hall Sensor |
D12 | 24V Power Control |
A1 | Stop Sensor |
A2 | Photoresistor |
A3 | Receiver ch2 |
A4 | Receiver ch1 |
A5 | Voltage Sensor |
- Setup Phase: Initializes pins, reads EEPROM data, and sets default states.
- PWM Control: Manages motor speed and direction based on sensor data.
- Emergency Handling: Stops the system when safety conditions are met.
- Data Logging: Provides real-time feedback via serial communication.
- EEPROM Updates: Ensures operational data persistence.
- Initial Setup: Connect components according to the hardware pin mapping.
- Calibration: Use the manual mode to configure and save system parameters.
- Operation: Choose between automatic or manual modes to control the system.
- Monitoring: View real-time logs via the serial monitor for debugging and system insights.
This code can be adapted for various applications, including automated gates, conveyor systems, or other motorized setups requiring precise control and safety mechanisms.