A mouse that turns without moving its head
When I arrived in Cambridge, I had about a week to learn PCB design and then I was going to design an actual board for a neuroscience experiment. I hadn’t designed a PCB before. This was an interesting way to begin eight weeks in the Tripodi Lab, especially because the final boards would have to be manufactured before I left, and the parts themselves had their own ideas about how long an order should take.
Stefan already had a very clear idea of what the experiment needed. That helped enormously: I could get lost in the engineering problems without having to simultaneously invent the behavioural paradigm. He also told me from the beginning that the scope was substantial and it would be fine if we didn’t finish every last thing, which was good because I have an unfortunate tendency to find one more feature I could spend two days on. At one point I repurposed the Fairy boards with a different communication protocol to stream 24-bit audio. We did, thankfully, remember that mice were the reason we were building this.

The proposed arena and reward ports.
Making the arena do the turning
The superior colliculus is involved in orienting, taking sensory information about somewhere in space and organizing eye, head and body movements toward it. If you want to record neurons with Neuropixels probes or image them with two-photon microscopy, head fixation is enormously useful. It also makes it rather difficult to study the natural act of turning the head and body toward something.
The platform’s idea is lovely in its simplicity: the mouse remains head-fixed and turns a low-friction, air-supported arena with its body. Five reward ports around the arena present cues—light or sound—and provide a target for orienting. Each port can detect snout entry with a light gate and deliver liquid reward, while the recording system needs to know what happened and when.
The floating arena shouldn’t drag a tangle of cables around behind it. The mobile electronics communicate wirelessly with the stationary host, while the reward ports on the platform are locally controlled and linked together. That local control is also important for measurement: when the mouse crosses the light gate I’d like to know when the sensor detected it, down at the hardware, before the event starts making its way through multiple communication links and an operating system.
Fairy, Korora and Galapagos
The first serious board I designed was Fairy, the reward-port controller. I spent the first week learning KiCad, pin assignments, footprints, power electronics, where an audio amplifier wants to live, how not to paint myself into a routing corner, and then started building a board that combined a fairly absurd range of jobs in a small space.

One Fairy handles the LED, audio output, the solenoid valve and the snout-detection light gate, with an STM32 responsible for the local timing and control. The ports communicate over a wired UART/RS-485 connection with Korora, the nRF52840-based mobile hub, which talks to the host over BLE. Galapagos, on the stationary side, provides the timing interface for the lab equipment. There are several clocks, several kinds of links and several places where a message can be delayed. I worked across the board designs, firmware, message protocols, time alignment and the Python-side integration, which made it really nice when something finally worked across more than one board.
Stefan was supervising the work while juggling an astonishing number of other things, and whenever I got stuck I could almost always walk into his office and ask him something. I think there were maybe two occasions all summer when he was in a meeting and couldn’t. His intuition about the experiment was much better than mine, naturally; he’d been dealing with the limitations of these behavioural setups for years, so he could tell when an engineering detail was going to matter to the person actually using the platform. It was a genuinely good collaboration to learn in.
A timestamp should survive the journey
Say the mouse enters a port at time . The local controller detects it, sends a message to Korora, Korora sends it over BLE, and the host sees the message at . There are multiple delays between those events, and they’re not constant. If you timestamp at the host, all that transport and scheduling variation becomes part of the experimental data, which is exactly the sort of thing that can quietly ruin an otherwise beautiful measurement.
We recorded the event at the hardware clock and sent that timestamp through the system. Then the clocks need to be related to a reference clock, which is its own problem because separate oscillators drift. Over short intervals we can estimate the relation with an affine model,
so the fit accounts for offset and clock-rate mismatch. Shared hardware events supplied timing pairs, and for the wired devices we used a rolling 16-point fit to keep the estimate current. I spent an enormous amount of time thinking about what the time attached to an event meant, and which parts of an apparent delay were coming from the animal, the microcontroller, the transport or the host.

We tested common electrical pulses, scheduled hardware outputs and long-running synchronization. One configuration gave approximately 28 µs RMS alignment error; across the recordings summarized on the poster the observed errors stayed below roughly 300 µs. These measurements made the whole architecture feel much more real, because there was finally a way to ask whether all the distributed pieces agreed about the same event.
I eventually needed that oscilloscope
At the start Stefan offered me an oscilloscope and I declined. On the breadboards the multimeter and debugger were enough for most things, and if a wire was wrong you could move it. I was getting quite attached to my multimeter.
Last week in the lab: the manufactured boards arrived. I flashed the firmware, started checking voltages, saw the drops where I’d expected them, and got absolutely nothing useful on UART. Half an hour of that feeling where the board is obviously alive in some respects and completely silent in the one respect you currently need. I went to get the oscilloscope. Following the signal by hand made the problem rather less mysterious: I’d configured the wrong MCU pins.
Oops.
There was also the RGB LED incident. We designed for common anode, which was what the DigiKey title and description advertised. The actual datasheet said common cathode, and the LEDs which arrived were of course common cathode, so suddenly the driver arrangement was doing the wrong thing. I have since become much more interested in the datasheet than the product title.
Most of the build was less dramatic. We’d wire one part, get it communicating, connect the next part, find another little problem, sort it out. After a while the bench had become an enormous spread of controllers and wires and power leads, in a state that made perfect sense when you had assembled it one connection at a time and looked quite insane if you entered the room for the first time. Dan, who uses the platforms to run behavioural experiments, saw how far it had come after hearing about it at lunch for weeks and said it looked so much better. That felt wonderful. I had mainly been looking at all the little things still on my list.
What was on the bench when I left

At the end of the placement we had working reward-port prototypes, wired and wireless communication, local event capture, a tested clock-alignment system, host-side control and the manufactured boards for the intended integrated hardware. There was still final-board bring-up, integration of all five ports, reward-volume calibration and in-vivo validation ahead. That was the handover point, and it was a good one to leave at without opening several new weeks of work just as I was supposed to fly home.

The project website has models, more validation material and prototype videos; the source is public too. Stefan’s project page follows the later work on the platform. There’s also a tiny wearable IMU I made during an ordering lull and a Cambridge summer post about the people and places, which are probably what I miss the most now that I’m back.