I built a small “ride-style” motion controller using an Arduino and an SG90 servo. The goal was to make motion that feels smooth and intentional (not jerky), while also adding real safety behavior like an E-STOP and a sensor-based interlock. I designed and 3D printed an enclosure and arm so the project looks and behaves like a complete little system, not just a breadboard demo.
Features
SG90 servo motion with a smooth ramped profile (no sudden jumps)
State machine control: IDLE, ARMED, RUN, STOPPING, FAULT
Physical buttons: START / RESET / E-STOP (INPUT_PULLUP wiring)
Ultrasonic safety interlock: blocks running when unsafe and trips to FAULT if someone enters the zone
FAULT behavior freezes motion immediately; RESET returns slowly to horizontal (“end of ride” feel)
CSV data logging and MATLAB plots for motion + fault timing analysis
GitHub Gist:
This project helped me understand state machines, safety logic, and how motion “feel” is heavily influenced by acceleration/ramps. I also learned how to log data from embedded systems and use MATLAB to validate behavior instead of relying only on how it looks.
AI Assistance disclosure:
I used AI tools (ChatGPT) during development as a support resource, mainly to brainstorm system architecture, sanity-check state machine logic, and help troubleshoot issues (wiring/debugging, serial logging, and MATLAB plotting). I implemented the hardware build, performed testing, tuned parameters, and validated the final behavior myself.