Introduction: : Head-mounted imaging platforms such as the UCLA Miniscope have revolutionized the study of neural activity in freely moving animals. However, deploying these systems in the large arenas required for naturalistic open-field behavioral studies introduces major engineering constraints: manual handling disrupts behavior, pulley-based cable management is incompatible with coaxial commutators, and excessive tension often leads to cable failure. Here, we present an open-source, vision-based, fully mechanical leash system that dynamically manages cable tension while preserving animal mobility. This system enables extended 1P calcium imaging sessions in unconstrained spaces without human supervision. Existing commercial solutions are expensive, and do not adjust the cable length as the animal moves around the arena.
Materials and
Methods: : The leash length is controlled via a vertically mounted rack-and-pinion mechanism, and cable rotation is managed by a motorized commutator. Both are driven by stepper motors to achieve precise distance and velocity control. The active commutator was developed by converting an existing passive unit into a belt pulley driven system. All mechanical components were CAD-modeled in Fusion360, with various components such as gearing, dovetail rails, etc.
For mouse tracking, we trained a YOLOv11 model to detect and follow animals in real time. Intrinsic camera calibration is loaded and a calibration stage using an HSV color mask is used for coordinate transformation. Pixel displacements from the arena’s center are mapped into stepper-motor steps by a dedicated microcontroller, which also queues movements and sends acknowledgments to ensure reliable operation. As the mouse moves towards the edge of the table, the cable length increases, and vice-versa. Head-orientation data from the Miniscope’s BNO IMU is processed to drive the active commutator, preventing tether tangling during rotations.
Results, Conclusions, and Discussions:: The system robustly supports extended 1P calcium imaging without human supervision or cable failure (tangles, excessive stretching, etc.). Real-time leash adjustment maintains appropriate tension, even during high-movement behaviors, e.g., the animal running from one end of the arena to the other, and social interactions, where two animals interact closely and intricately. Across solo and social sessions, cable length adapts continuously to animal position without disrupting commutator function. Unlike pulley-based systems, this design preserves coaxial cable integrity and eliminates the need for counterweights or manual intervention. The YOLOv11 tracking module (weights and code will be made available upon acceptance) reliably detects tether position, with minimal false positives, even in complex backgrounds. The use of YOLOv11 allows for the system to be adapted to other tracking targets, like the various tethers used for implanting electrophysiological and optical probes for neural stimulation and recording, e.g., optogenetic stimulation apparatus. Furthermore, our active commutator—driven by slip rings and real-time head‐orientation data from the Miniscope’s BNO sensor—reliably prevents tether tangling even during prolonged rotations. The system is low-cost and compatible with large arenas—limited only by camera coverage. It supports multi-animal recording and integration with CV tracking and neural imaging pipelines. All design files are open-source to encourage adoption and further innovation in behavioral neuroscience infrastructure.