In the main text, we will focus on giving a high-level overview of our approach and validation data; however, we provide detailed assembly instructions in the supplemental materials.
Key challenge and approach. Combining any optical method with electrophysiology will be difficult, yet photometry is a particularly challenging case. As noted above, both electrophysiology and photometry require connecting subjects to a tether that transmits neural data to an external recording system. As subjects move during an experiment, the tethers will become tangled, impeding natural behavior and risking more severe consequences. For some techniques, additional equipment can help avoid this problem. For example, during solo-electrophysiology recordings, tangling can be prevented using an electrical commutator–a device that rotates with the subject as it moves, while preserving electrical contact in the data-tether’s wires21,22. However, at present, no analogous solutions exist for photometry5, representing the primary obstacle toward combining these methods.
Figure 1. Overview. a) Standard photometry recording setup. Here and below, all illustrations are built to-scale using 3D CAD software (Blender), with the subject being roughly the size of a 250g rat. b) Problem of light-leak when using an optical swivel to allow for free-movement. c) Leakless data acquisition by passing photometry voltage signals through an electrical commutator and rotating all optical components with the subject during movement. d) Broad overview of final design with integrated electrophysiology.
Figure 1a helps clarify the problem, giving a simplified overview of how standard photometry systems operate. Briefly, LEDs send light to an optical filter. The filter passes the light to the brain and captures any that returns. The returning light—typically reflecting the neural signal of interests—is sent to a photocollector (also known as a photodetector or photoreceiver). The photocollector converts the light-intensity into a voltage signal, and the acquisition system records this data.
Critically, in standard setups, the patch-cord connection between the filter and the subject’s implant is continuous. As such, subjects can indeed become tangled during recordings. Many attempt to resolve this problem by placing an optical swivel (also known as an optical rotary-joint) between the filter and the subjects’ implant (Fig. 1b). Analogous to an electrophysiology commutator, optical swivels transmit light while allowing the optical tether to rotate freely. However, due to difficulties in optical transmission, a substantial amount of light will leak out of a swivel in the process, resulting in a marked reduction in signal-quality5. In virtually all cases, the light-leak is too severe for effective recordings to be taken—typically causing a 50% reduction in overall return-signal and an even greater reduction in the signal-to-noise ratio (i.e., any neural signals of interest will only deviate from baseline by a few percent). Therefore, experimenters typically opt for a continuous connection and engage in a variety of non-ideal strategies to offset this limitation, such as untangling subjects by-hand, using extra-long tethers, keeping recording sessions brief, among others. While these solutions can be generally effective for solo-photometry recordings, our goal is to conduct long-term recordings and add a second data-tether for electrophysiology, making them untenable here.
Our solution to this problem centers on the fact that input to the LEDs and output from the photocollector are fully electrical signals. Therefore, both can be routed through an electrical commutator, and if all photometry components are mounted to the commutator itself, the entire assembly can rotate with the subject as it moves. This keeps the connection between the filter and subject continuous, avoiding signal-loss seen with optical swivels. Figure 1c gives a more specific view of our application. The LEDs, filtercube, and photocollector are mounted on a 3D printed frame that fixes to the bottom of an electrical commutator. All of the components still interact as described above. However, they can now rotate with the subject, with the commutator maintaining electrical connections between the LEDs, photocollector, and recording system. Below, we show that this solution easily integrates with electrophysiology acquisition for simultaneous recordings (Fig. 1d).
Electrophysiology acquisition and orientation tracking. Small subjects would be too weak to rotate the commutator on their own, so we designed an automated system that tracks how subjects move and rotates the commutator accordingly. We integrated this process within the electrophysiology-side of our design, building upon a popular method proposed by Fee and Leonardo21 for solo-electrophysiology recordings.
The general approach is to attach a magnet to the electrophysiology data-cable and fix a Hall-effect sensor—a device that measures the strength of magnetic fields—to the commutator itself. As the subject moves, the magnet will rotate, and the Hall-effect sensor’s output will reflect the orientation-change, increasing/decreasing as the magnet turns toward/away from it, respectively. The sensor’s output feeds to an automated motor system that rotates the commutator as needed.
In our device, the motor-system consists of a stepper motor and pulley mounted to the commutator via 3D printed parts—all designed to rotate the frame at the bottom of the commutator (Fig. 2b). The electrophysiology data-cable runs through the center of the frame and is used to implement orientation-tracking (Fig. 2c). Specifically, a magnet appends to the cable via a 3D printed holder that sits vertically within a ball-bearing, allowing the magnet to rotate with the subject. We take two steps to ensure small subjects will be able to easily rotate the assembly. First, the cable runs through a torque-arm, which boosts force by horizontally offsetting the cable from the axis of rotation at the bearing (Fig. 2c). Second, note that, if were to plug the data-cable directly into the bottom of the commutator, any stiffness in the cable would place resistance on the subject as it moves. To resolve this, we bridge the connection between the cable and the bottom of the commutator with magnet wire, also known as ‘winding wire’ (Fig. 2d). Magnet wire is extremely durable, yet highly flexible, effectively eliminating any resistance that the cable itself would introduce. All wires send data to the electrophysiology system via a connector fixed to the top of the commutator (Fig. 2d).
To detect subject-rotation, two Hall-effect sensors track the orientation of the magnet’s face (Fig. 2c and Fig. 3). Note that the original design only incorporates one Hall-effect sensor21. However, a single sensor will only be able to track the magnet around 180 degrees. Therefore, it will miss rapid turns beyond this range, which can be common during behavioral tasks (e.g., when a subject must traverse between opposite sides of a conditioning chamber). Conceptually, when using two Hall-sensors that are offset by 90-degrees, their outputs can work together like the sine and cosine functions, allowing us to track the magnet’s orientation around a 360-degre axis (Fig. 3b,c). We have not observed missed-rotations with this improvement.
The process of translating the Hall-sensor inputs to a motor output is handled by a simple feedback circuit, composed of a microcontroller that implements a rotation-detection algorithm and turns the motor via a driver-circuit (Fig. 3). For convenience, we use a Teensy 4.0 (ARM Cortex-M7) microcontroller, which is cheap and fully compatible with the Arduino coding environment. Furthermore, as it is arguably the most powerful microcontroller currently available, it can readily accommodate more advanced equipment/algorithms for users hoping to extend our system’s functionality (see Discussion).
We have used/improved upon this system for solo-electrophysiology recordings over the past 6 years and find that it is virtually errorless, even for very long sessions (e.g., > 5 hours, without human-intervention). Nonetheless, we still implement two safety/convenience features. First, the algorithm contains an ‘auto-shutoff’ mode that pauses the motor if it makes 5 continuous rotations in one direction, usually indicating an error has occurred. Second, as shown Fig. 3c, the system’s circuit-board contains two buttons that allow users to manually override the motor, permitting them to correct errors without disturbing subjects.
Photometry. The next step is to mount all photometry components to the frame and route the LED/photocollector signals through the commutator (Fig. 4). When designing the device, we realized a key challenge would be allowing the frame to accommodate equipment from different recording systems. For example, the shape/size of LEDs varies across vendors, and we wanted our design to be compatible across models. To resolve this, we gave the frame a ‘breadboard-like’ design, containing three arms with a standardized grid of screw holes (Fig. 4b). Each photometry component (LEDs, filter, photocollector) fits within a 3D-printed attachment that screws into the grid. We provide attachments for common photometry components (Doric LEDs/minicube, Newport 2151 photocollector). However, if researchers hoping to use the device have different equipment, they only need to design an attachment for their given model. We encourage users to share their designs via the project’s GitHub page.
Input to the LEDs and output from the photocollector route through the commutator via a circuit board that screws into the frame (Fig. 4c). The wires connect to the circuit board at the top, providing access for the photometry system. The final construction step is to build a mount that can suspend the device above the subject, and we describe how we constructed ours in the supplemental materials (see Fig. S7; also Fig. 1d).
As detailed below, the device provides excellent neural and behavioral data for long-sessions (1.5-2 hours, in our projects). While we focus on single-sensor photometry recordings here (one LED for control-excitation and one LED for our signal of interest), the commutator is already equipped for a third LED, allowing users to record from two sensors simultaneously (Fig. 4c). Furthermore, despite the complexity of motion-tracking with two tethers, faults in the automated anti-tangling process are rare (without supervision, an average of 1 tangle every 2 hours). We find that checking subjects every 20–30 minutes and correcting any minor errors—using the push-buttons to prevent subject distraction—is more than sufficient to avoid tangling.
Data. Finally, we characterized the quality and utility of in vivo data collected with the commutator device. Specifically, we expressed a fluorescent dopamine-sensor23 (dLight-1.3b) in the nucleus accumbens of 6 mice, and recorded with an ‘optetrode’ implant, composed of 8 tetrodes surrounding an optic fiber (Fig. 5a,b). We offset the tetrode-tips to be 200um from the tip of the optic fiber (Fig. 5a), putting them within the recordable range of the photometry signal24. We first performed fundamental checks on data-quality. For example, Fig. 5c highlights that, relative to standard photometry recordings, optical swivels produce a severe signal-drop, due to light-leak (-50%; Fig. 5c). As intended, the commutator resolves this issue, with any differences being due to standard fluorophore-depletion within a session (Fig. 5c; -3% over this particular recording).
Next, we ensured that light from the photometry system would not interfere with the electrophysiology recordings. Specifically, light can scatter electrons at the tip of a recording electrode, producing a voltage-artifact called a ‘photoelectric effect.’ This is a substantial concern for combined optogenetics and electrophysiology, as these artifacts are often severe enough to obscure spike-detection without proper precautions (e.g., increased spacing between optic and electrodes)15,25. However, we observe no evidence of photoelectric effects in our recordings, even when explicitly pulsing the LEDs (Fig. 5d). This likely relates to the fact that light-power used for photometry is usually orders of magnitude lower than that used for optogenetics (microwatt vs milliwatt scale, respectively).
Finally, during early protypes of the device, we noted that running the motor would occasionally produce noise in both the photometry and electrophysiology data. The electrophysiology contamination was simply due to 60Hz noise and was easily resolvable with standard steps (i.e., common ground for recording and motor systems; Fig. 5e). The photometry contamination resulted from mild vibration on the photocollector during rotation. Fortunately, padding the photocollector holder with foam solved this issue (Fig. 5e; also see Fig. 4b).
Our final question was whether the device would provide useful data regarding brain-behavior relationships. After all, photometry typically measures ‘bulk’ neural signals, and some data question the degree to which they correlate with single-neuron activity26. Importantly, these critiques primarily apply to calcium indicators intended to measure net spike-activity in a given area (e.g., GCaMP), as they confound somatic activity and dendritic inputs. To our knowledge, no data have addressed how indicators that reflect neuromodulator-levels or intracellular signaling molecules map to neuronal firing rates in vivo. In our view, this is where the true value of combining the two methods lies, and most concerns surrounding spike-indicators do not readily generalize to these sensors.
To address this, we tracked striatal dopamine-levels, single-neuron firing rates, and behavior during a reward learning task, given the substantial theoretical and clinical interest in how these processes relate to one another. Specifically, we recorded while mice learned a task where a cue signaled reward could be earned for pressing a lever after variable time-intervals elapsed (see Methods). Despite the complexity of the equipment and number of tethers, mice were able to perform the task well, suggesting the automated-anti-tangling system permits free-movement (Fig. 6b,c). As a point of reference, we compared their behavior to a separate group of mice trained on the same task while tethered to a Doric dual-optical swivel (FRJ_1x2i_FC-2FC). Like the commutator, this swivel model also incorporates two tethers, yet as it rotates passively with remarkably low-torque, subjects can rotate it easily, without motor-based assistance. As shown in Fig. 6c, the two groups were indistinguishable.
Next, we evaluated trial-by-trial covariance between the dopamine signal and the firing of striatal neurons (Fig. 6d). We focused on how each signal varied around key task events—the onset of the cue, lever presses, and reward (Fig. 6e). Striatal neurons were modulated around all events. Consistent with prior reports, clear dopamine-peaks emerged at cue-onset and reward7,27, though some weak suppression can be noted around unrewarded lever-presses. More importantly, we note robust trial-by-trial correlations between dopamine-levels and striatal firing rates (Fig. 6f,g). While a full analysis is beyond the scope of this report, we ran a simple correlation analysis (see Methods) between dopamine peaks at reward-onset and single-unit firing (e.g., Fig. 6f). Reliable correlations were common among the population (39.8% of neurons; Fig. 6g). Notably, as expected by canonical direct/indirect pathway theorization, positive and negative correlations occurred at roughly equal frequency (Fig. 6g, χ2(1, N = 118) = 0.383, p = 0.536).