Project Overview
This project uses a MeArm v1.6.1 joystick board. "Arm-Path" is an exploration into Industrial Motion Recording for low-cost educational robotics. While simple joystick control is intuitive, the ability to record, save, and loop complex 4-degree-of-freedom (4-DOF) movements transforms the MeArm into a functional pick-and-place simulator. By implementing a robust State-Machine Architecture, the system coordinates manual input, sensor-driven recording, and autonomous playback, all while managing mechatronic signal integrity.
Technical Deep-Dive
The system allows 4 distinct modes, managed by a state machine:
- Manual (Idle) Mode: Direct mapping of dual-axis joysticks to the base, shoulder, elbow, and claw servos.
- Record (Sampling) Mode: The system samples the current servo PWM values at precise temporal intervals. These coordinates are pushed into a buffer, capturing the spatial "path" of the end-effector. This is indicated by a permanent light of the LED diode.
- Play Mode: The MCU iterates through the recorded buffer, reconstituting the motion path for a single playback.
- Play Repeatedly Mode: Utilizes a logical loop with LED-strobe feedback (indicated by flashing of the LED diode), simulating an industrial assembly line cycle.
Motion Persistence Analysis:
- The EEPROM Bottleneck: To ensure movements survive a power cycle, Arm-Path utilizes the Arduino's EEPROM. Since EEPROM space is limited (1024 bytes), the project employs a high-efficiency sampling rate, balancing path "smoothness" against memory overhead (byte-level coordinate packing).
Kinetic Interpolation & Smoothing:
- PWM Step-Slicing: To prevent "Jerky" motion during playback, the firmware doesn't simply jump between recorded values. It performs Linear Interpolation, slicing the distance between recorded nodes into sub-degree increments, resulting in fluid, organic mechatronic movement.
Engineering & Implementation
- HMI Control Logic:
- Joystick 1 Button: Press to Start/Stop recording coordinates. This toggles the Recording State. A solid LED indicates active coordinate capture.
- Joystick 2 Button: Press to Start/Stop playing coordinates. This toggles Single Playback.
- Long-Press (2s) Logic: Press and hold the button on joystick 2 for 2 seconds to Start/Stop playing coordinates repeatedly. This engages the Autonomous Loop mode, verified by a flashing LED state.
- IR Command Bridge:
- As shown in the video, the KY-022 module adds a secondary control layer. By using an infrared remote, the user can trigger recording or playback states remotely, effectively separating the "Operator" from the "Machine" for safety and demonstration purposes.
- Power Forensics:
- Driving four SG90 servos concurrently can cause significant "Voltage Sag" on the 5V rail, potentially resetting the MCU. The MeArm v1.6.1 board is utilized as a dedicated power distribution hub, isolating the motor current from the logic-sensitive Arduino pins.
Conclusion
Arm-Path bridges the gap between toy robotics and Industrial Motion Control. By mastering State-Machine Forensics and Path Persistence, developers can create sophisticated mechatronic systems capable of repeatable, precise, and autonomous task execution.