projects/ janelia/

Janelia project archive

Mouse Joystick Rig

Two motorised joysticks for a head-fixed mouse, built for the Dudman lab at Janelia Research Campus in 2026: the mechanics, the two circuit boards, the firmware and the pyControl protocol, archived from the four repositories at the revisions of the v1.0 rig manual.

The two-joystick assembly, rendered from the model
The two-joystick assembly, rendered from the model.

The rig

Each joystick station is a stepper motor driving a lever through a spur gear pair, with an encoder on the lever axis, a limit switch, a magnetic particle brake and a reaction torque sensor in the drive train. The station sits on a linear stage and a rotation plate with a lock, so each joystick can be placed for the mouse. Two mirrored stations share one base plate, their levers pointing up and toward each other. The mechanical design is Sam Jager's (Janelia Research Campus), modelled in Autodesk Inventor 2025 and exported to STEP on 2026-07-22; the atlas renders it part by part and the model page says how to open it.

Each joystick is driven by its own controller board, mouse-joystick-pcb. An RP2040 microcontroller runs a TMC5130A stepper driver, reads the encoder, the limit switch and the torque bridge, sets the brake current, puts the lever angle on an analog output for a Neuropixels OneBox, and speaks a line protocol to pyControl over one UART on a behaviour-port RJ45. Thirty-two internal signals come out on a 50-pin InstrumentPort-Digital-50 for a logic analyser. Power is a protected 36 V input with 12 V and 5 V regulators on the board.

The camera-gpio-interface-pcb connects the rig's three FLIR Blackfly S cameras: screw-terminal camera GPIO connectors, two BNC inputs from the pyControl breakout, four 3.3 V BNC outputs to the OneBox, the same InstrumentPort-Digital-50 with every camera line tapped, and USB power. It has no microcontroller and no firmware.

The firmware, mouse-joystick-firm, runs on the controller board's RP2040. Its delivery build carries the pyControl protocol on QP/C++ state machines; the repository also holds the staged bring-up examples that proved each subsystem in turn, the pyControl device class and hardware definitions for the host, and the summary of how the boards were verified.

When the archive was made (October 2026), board v1.0 was the fabricated revision: four assembled controller boards, two installed in the lab's Rig 1 on 2026-10-09 and two on a verification rig since 2026-10-12; five camera boards fabricated, one installed; the firmware's delivered state tagged v1.0.0 on 2026-10-13. The experiment code and the operating guide live in the lab's joystick-rig repository (sourishmukh/joystick-rig on GitHub), which this archive does not include.

The repositories

Repository What it holds Archived revision License Here
Rig atlas
mouse-joysticks-mech
The mechanical model of the two-joystick assembly: renders, a registry of every part, and pages that say what each part is and which board circuit and firmware it meets. 22aa7544fd10
tag v1.0
2026-10-15
CC-BY-SA-4.0 site
sources
Joystick controller board
mouse-joystick-pcb
The single-axis joystick controller board: an RP2040 and a TMC5130A stepper driver with the joystick's encoder, limit switch, magnetic-particle brake and torque sensor, a native pyControl peripheral. 7752b3d62997
2026-10-15
CC-BY-SA-4.0 for the hardware and documentation, BSD-3-Clause for the automation site
sources
Camera interface board
camera-gpio-interface-pcb
The interface board for the rig's three FLIR Blackfly S cameras: camera GPIO terminals, pyControl BNC inputs, OneBox BNC outputs, an InstrumentPort-Digital-50 and USB power. dacb5f5f9f90
2026-10-15
CC-BY-SA-4.0 for the hardware and documentation, BSD-3-Clause for the automation site
sources
Firmware
mouse-joystick-firm
The controller board's firmware: an RP2040 driving one TMC5130A, exposed to a pyControl host over one UART, with its staged bring-up, the pyControl device class and the delivery build. a5edf787e825
2026-10-15
BSD-3-Clause site
sources

The revisions are the ones the v1.0 rig manual pins, so the manual and these pages agree. Copyright 2026 Howard Hughes Medical Institute. Mechanical design and model by Sam Jager; boards, firmware and documentation by Peter Polidoro.

About this archive

The pages under rig/, pcb/ and camera/ are the repositories' own documentation sites, rebuilt from the archived revisions on 2026-10-15; firmware/ is built the same way from the firmware repository's README and docs, which had no site of their own. The sites are rebuilt without web fonts or scripts from other servers. The 3D viewer on the atlas and board front pages runs from a local copy of the model-viewer script and falls back to a still render where WebGL is missing. Links between the four repositories go to the archive's copies; links elsewhere on the web, to GitHub, to part vendors and to datasheets, are plain text with a dotted underline and keep the address they had in their title attribute, shown on hover. The source trees under files/ are what git archive exported, without each repository's docs/ directory, rendered as the sites, and without the firmware's evidence/ directory of session logs and captures.