This project demonstrates the design and implementation of a real-time embedded control system that coordinates multiple hardware peripherals through an interrupt-driven architecture and precise timing control. The system integrates motor control, servo actuation, human-machine interface components, and sensor processing to create a responsive mechatronic platform with simultaneous multi-tasking capabilities.
Technical Approach:
The system uses a Texas Instruments MSP430FR5994 microcontroller as the central processor, coordinating a 16x2 LCD display, a DC motor with PWM speed control, an MG996R servo motor, a piezo buzzer, and an analog joystick input. The hardware architecture employs memory-mapped I/O for direct peripheral control and implements multiple timer modules (Timer B0 for system timing, Timer A2 for tone generation) to achieve deterministic real-time operation. A custom PCB interface connects the microcontroller to the BH EDU Kit, with carefully routed GPIO pins for data (P3), control signals (P8), motor drive (P4.7, P1.2, P1.3), and ADC inputs (P4.1, P4.2).
Control Implementation:
The software architecture employs interrupt-driven event handling rather than polling, ensuring responsive system behavior and efficient processor utilization. Push-button inputs trigger state changes for a programmable countdown timer (initialized to 1:15), melody playback, and system control modes. The joystick's analog X-Y coordinates are continuously sampled through the onboard ADC, with normalized values driving proportional DC motor speed/direction and servo angular position. Timer interrupts at 1 Hz manage the countdown functionality while maintaining non-blocking operation of all other peripherals.
Software & Hardware Integration:
The 578-line C/C++ program implements modular peripheral drivers with hardware abstraction, enabling clean separation between application logic and low-level control. PWM signals generated through timer compare registers provide smooth motor speed control and precise servo positioning, with pulse widths mapped directly to joystick deflection. The system includes integral wind-up protection for the countdown timer and implements proper debouncing for mechanical button inputs. Real-time system state (joystick position, timer values, motor parameters) is transmitted via UART to LabVIEW for external visualization and data logging, demonstrating effective serial communication protocols for embedded debugging and telemetry.
This project showcases practical application of embedded systems architecture, real-time operating principles, interrupt-driven programming, peripheral interfacing, and hardware-software co-design—skills directly applicable to industrial automation, consumer electronics, and IoT device development.