Rotating-Coil Digital Compass for a Spinning Top

A self-contained rotating-coil digital compass for a spinning-top platform. By sensing the Earth’s magnetic field with an induction coil and ferrite core, processing the signal in real time on an ESP32, and synchronizing RGB LEDs during rotation, the system demonstrated a visual compass indication on a freely spinning platform.

This project centers on the development of a remote-controlled spinning top, integrating mechanical engineering with real-time mobile software. The main objective was to design a durable and functional spinning top that could be wirelessly controlled via an Android application, while simultaneously collecting and visualizing sensor data. The initiative was driven by the desire to merge multiple previous projects into a cohesive system with improved functionality, usability, and interactivity. A key goal was to ensure the top could spin reliably for at least 30 seconds, with directional control enabled by a hammer mechanism actuated through electromagnets.

Mechanically, the spinning top was engineered to meet several constraints: maintaining balance for stable rotation, accommodating a fixed-size PCB and battery, lowering the center of mass, and safeguarding sensitive components from impact during falls. A modular design was developed, featuring a 3D-printed cone and interchangeable tips. Fifteen different tip designs were created and tested to optimize performance. Balance was fine-tuned using strategically placed plasteline inside the structure. An internal cavity was included to allow additional mass near the tip, effectively lowering the center of gravity and enhancing rotational stability.

The Android application serves as the user interface for interacting with the spinning top. It connects to the device via Wi-Fi using the WebSocket protocol, allowing users to send commands and view real-time sensor data. The application includes multiple activity screens dedicated to controlling the hammer, initiating top movement, and visualizing graphs from integrated sensors such as a gyroscope, LiDAR, and distance sensors. The codebase was designed modularly, with activity components implementing a listener interface for dynamic WebSocket message handling, ensuring seamless user interaction across screens.

The project successfully met most of its objectives. The top is capable of spinning stably for extended durations—up to about one minute—while being controlled and monitored through the Android application. However, the hammer mechanism, although functional under static or low-speed conditions, was unable to alter the top’s direction effectively during high-speed spinning, due to the magnetic force being insufficient relative to the centripetal force involved.