Feb 03, 2023

Public workspaceFreely moving recording: Chronic recoverable Neuropixels in mice V.5

Freely moving recording: Chronic recoverable Neuropixels in mice
  • 1Stanford University
Open access
Protocol CitationEmily A Aery Jones 2023. Freely moving recording: Chronic recoverable Neuropixels in mice. protocols.io https://dx.doi.org/10.17504/protocols.io.n92ldzz2ov5b/v5Version created by Emily A Aery Jones
License: This is an open access protocol distributed under the terms of the Creative Commons Attribution License,  which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited
Protocol status: Working
We use this protocol and it's working
Created: February 03, 2023
Last Modified: February 03, 2023
Protocol Integer ID: 76319
Keywords: electrophysiology, silicon probe, behavior, position tracking, linear track, H-maze, Arduino, headfixed, spatial navigation
Funders Acknowledgement:
Simons Collaboration on the Global Brain
Grant ID: 542987SPI
Stanford School of Medicine Dean's Postdoctoral Fellowship
A.P. Giannini Foundation Postdoctoral Fellowship
Abstract
This protocol collection explains how to build a low-cost, lightweight system to implant 1 Neuropixels 1.0 probe or 2 Neuropixels 2.0 probes into mice, record during freely moving behavior, then recover the probes for future use. This protocol enables recording from mice after following the Assembly and Implant surgery protocols, or after any chronic electrode implantation. This protocol first explains how to build enclosures for spatial tasks, construct a frame to mount the enclosures and related hardware, and wire and code an Arduino to operate poke detectors, pinch valves to dispense reward, and floor-mounted doors. Second, it explains how these procedures can be used specifically to build an X-maze for mice. Third, it explains how to integrate recording by building a headfixation apparatus for easy headstage attachment and a pulley-operated counterweight to counteract the headstage weight and enable easier running. The X-maze is derived from the H maze, originally published in Seigle & Wilson, 2014 (https://elifesciences.org/articles/03061) with a detailed protocol published in Wirtshafter, Quan, & Wilson, 2021 (https://bio-protocol.org/e3947). See full collection for more details.
Guidelines
X-maze based off of H-maze from (Wirtshafter, Quan, & Wilson, 2021) https://bio-protocol.org/e3947
Materials

Tools and equipment:
  • Hex wrench set (for assembling 80/20 frame)
  • Screwdriver set (for mounting components to track)
  • Computer with CAD software (e.g. Fusion360, free with .edu address)
  • Laser cutter (for cutting enclosures)
  • Machining service (for manufacturing headfork)
  • Soldering iron, heat gun, and related accessories (wire cutters, soldering clamp, solder, light)

For nosepokes:
  • 3D printer
  • Clamp
  • Drill with 4/40 bit
  • Lab marker
  • Metal file
  • Dremmel with metal cutting bit
Design the enclosure
Design the enclosure
Consider what acrylic to use (e.g. 1/4" P95 matte black acrylic).
  • Use black if you're planning to track LEDs in the dark or white if you're planning to track a Black6 mouse based on center of mass.
  • Use matte finish to reduce reflections from LEDs and overhead lights.
  • Thicker material makes for more robust joints, but can be too heavy to lift if enclosures need to be swapped regularly.
Decide on the dimensions of the enclosure (e.g. 1.5m linear track, 50 x 30cm X-maze, 75cm open field, 15cm rest box)
  • For linear mazes, longer means more distinct neural sequences but also fewer trials.
  • For 2D boxes, larger means easier to detect grid coding and large place fields but also takes longer for the mouse to cover.
  • Higher walls means the mouse is less likely to escape, but also makes it harder to retrieve the mouse and might occlude visualization if you have interior walls (i.e. not just a box). On motivated tracks, where mice aren't likely to escape, 20cm walls are enough. In unmotivated boxes, where mice will look to escape (perhaps to get back to the motivated track), 30cm walls are enough.

Note
Consider adding an object to your open field. Mice naturally thigmotax (walk along the walls), so adding a central object will encourage them to explore the center of the field more. Secure the object to the floor with Scotch fasteners.


Add holes to mount nosepokes, servo motors, or other components. In the instructions below, nosepokes are mounted to the walls and servo motors are mounted through the floor to operate doors. These pieces can be mounted using the holes described in the poke_walls and maze_floor files at https://github.com/emilyasterjones/X_maze/tree/main/Build.
Note
To model the size and location of holes for mounting, try designing the enclosure in CAD software and placing an stl file of the accessory at its destination. Stl files of most pieces can be found on the thingverse, and McMaster has stl files for all their items.

Draw your enclosure in CAD software (e.g. Fusion360) or Illustrator. Make a list of the dimensions of all the rectangular parts and send to your local plastics supplier (e.g. Tap Plastics) for them to cut to size.

Note
For enclosures that will endure some wear and tear, consider designing the pieces to be interlocking using https://www.makercase.com/#/. This will give a much larger surface area for the acrylic weld to join, but leads to joints that are wider and less tidy. For example: https://github.com/emilyasterjones/X_maze/blob/main/Build/Interlocking_open_field.pdf
Example laser cut design for a 75cm open field with 30cm walls and interlocking jonits.
Example laser cut design for a 75cm open field with 30cm walls and interlocking jonits.

For pieces that aren't rectangular or have specifically sized holes, use a laser cutter. Create an Illustrator or CAD canvas the same size as what your local laser cutter can use and draw your enclosure in thin red lines.
Build the enclosure
Build the enclosure
Spray pieces with anti-ESD spray.

Note
Mice generate a lot of static when running on a plastic enclosure. Prevent static buildup from discharging into your behavior or neural acquisition systems by treating enclosures with anti-static spray. Do not ground the enclosure, as this will short the signal when the animal is inside.

Safety information
Anti-ESD spray is flammable. Spray outdoors and keep stored in a flammables cabinet.

Assemble the enclosure and secure the outsides of all joints with matte black duct tape.
Weld the joints with Weld-on. Fill the squeeze bottle with Weld-On using the funnel, attach the needle, then run a thin line of Weld-On into the joint. Let rest for 30 minutes.
Note
Acrylic welding works by breaking down the acrylic so it can reform as a matrix that connects the 2 pieces. Be sure the other side of the joint is covered with tape or otherwise not touching anything, as the Weld-on will leak through and weld the enclosure to anything it touches.

Further secure larger joints (e.g. wall to floor) with Epoxy. Be sure to seal any gaps with Epoxy to prevent mouse toes from getting stuck. Note that this is not matte.
Fill joints that aren't at 90 degrees with Sil-Pruf.
Secure the outsides of joints by welding or supergluing them to joint support pieces: https://github.com/emilyasterjones/X_maze/blob/main/Build/Joint_supports.pdf
Design the 80/20 frame
Design the 80/20 frame
Use this software to design your frame: https://www.framexpert.com/products/framedesigner/download/. Design a box tall enough for your camera and pulley mount and wide enough for your enclosures.
Note
1.5" is the most common T-slot framing width and fits all accessories

Design considerations:
  • What are the dimensions of the room and your enclosures?
  • Where and how will the camera and counterweight pulley be mounted? Aim to put these as high as possible.
  • At what height can the enclosure sit such that the camera can capture it entirely but you can still comfortably pick up animals from it?
  • Do you need storage underneath the enclosure? Or for the enclosure level to be high enough that you can reach the camera mount by standing on it?
  • Do you need additional mounts (e.g. for a side camera or headfixation)?

An example frame design. Top bar for camera and pulley mount, grid for holding enclosures while allowing for wiring and servo motors to run underneath the floor of the enclosures, side bar for mounting headfixation apparatus.
An example frame design. Top bar for camera and pulley mount, grid for holding enclosures while allowing for wiring and servo motors to run underneath the floor of the enclosures, side bar for mounting headfixation apparatus.

Bracket considerations:
  • Standard L brackets are cheapest, but larger brackets may be needed for securing important exterior joints and heavier items.
  • Standard brackets come with end-feed nuts, meaning you have to pre-load each t-slot piece with all the bracket you need before attaching the ends to anything. Drop-in nuts are extra but allow addition of accessories to existing builds.
Note
McMaster has CAD files for all their items. To make sure you can affix your camera, pulley, or other pieces to the framing, download CAD files for each and put them together in CAD software.
Example mount designed in Fusion360 using a camera STL from Thingverse and parts STLs from McMaster.
Example mount designed in Fusion360 using a camera STL from Thingverse and parts STLs from McMaster.

Consider other useful accessories: cable holders, grounding terminals, leveling feet, and trays.
Build the 80/20 frame
Build the 80/20 frame
Plan your build before you start, since end-feed nuts need to be placed inside the T-slot before assembly. Hold them in place with putty until you need them. Otherwise, use drop-in nuts.
Each piece needs to be secured either with larger brackets (i.e. that have 2 screws on each side) or at 2 locations on each end, otherwise they will rotate.
Optional: Add curtains to cover any sides not facing a wall. This prevents the mouse from using changing stimuli (e.g. you, your computer screen, the door to the room) as cues. Add distal visual cues like posters to tether the mouse's representation of its orientation.
Optional
Optional: Add storage. Build shelves to store mouse cages and bins of building supplies, enrichment, rewards, and other supplies.
Optional
Optional: Add diffused lighting pointed at the ceiling with a dimmer switch. This will prevent glare on the track (problematic for position tracking) and will allow you to darken the room to encourage activity in your nocturnal subjects.
Optional
Wire LEDs for nosepokes
Wire LEDs for nosepokes
Cut and arrange the following wires:
  1. Cut: yellow 6.5cm, black 4cm + 2x5cm, red 3x4cm. Strip 1/2" off the end of each side of the wire.
  2. Yellow dot (LED emitter): short pin (on top) goes to black 5cm wire, long pin (on bottom) goes to 330 Ohm resistor (orange band towards LED, black band towards wire) which goes to red wire
  3. Red dot (LED detector): short pin (on bottom) goes to black 5cm wire, long pin (on top) goes to 10k Ohm resistor (black band towards LED, orange band towards wire) which goes to red wire AND goes to yellow wire (before resistor)

image.png

Best way to connect is to fold both wire ends into hooks, pinch hooks closed, then solder over so that connection is physically secured.
image.png

Safety information
Lead solder creates toxic fumes. Have a ventilation fan or downdraft table pulling melted solder fumes away from the user.

Heatshrink to cover completely
Hook red wires together with red 4cm wire and black wires together with black 4cm wire
Add female pin connectors to ends of yellow wire + red/black extension wires. Be sure to test that the wire isn't inserted too far into the female connector, or else you will not be able to plug the male connector fully in. Heatshrink to cover completely, including the full body of the female pin.
image.png


Assemble nosepokes
Assemble nosepokes
Print the face mount and the electronics mount, one each per poke: https://github.com/emilyasterjones/X_maze/tree/main/Build. Low resolution is sufficient.
Tap screw holes by clamping and drilling them clear with a 4/40 drill bit.
Cut 4cm segments of stainless steel tube. Mark with a lab marker, clamp, and cut with dremmel.

Safety information
This produces sparks. Be sure to wear a nonflammable lab coat and safety glasses.

File edges smooth with a metal file. File around the outside rim to soften the spout, and thread a small drill bit into the inside to clear any metal shavings.
Thread the spout so it just barely enters the poke, about 0.5cm. Epoxy around the back to secure it to the poke.
Thread the LED detector & emitter through and align them with the cutouts near the front of the poke. Check that you can see the detector & emitter bubbles from inside the poke. Secure with tape.
Place a very small amount of epoxy along the edges of the detector/emitter and over the wires, bleeding into the valley that runs along the back of the poke. Check that the detector/emitter is lying completely flush with the edges of the poke and that you can still see the detector/emitter bubbles from inside the poke. Allow to cure, checking that no large globs of epoxy are drying anywhere.
Apply epoxy to where the wires exit the back of the poke to provide additional security.
Once the epoxy is completely cured, thread the front plate over the back plate. Some epoxy may chip off in the process. If too much epoxy was applied, use a flathead screwdriver to detach the detector/emitter from the poke, remove all dried epoxy, and try again. Alternatively, you can try to secure the detector/emitter with electrical tape, but this may move around unexpectedly.
Secure the front plate with a screw.
Nosepoke from the front
Nosepoke from the front
Nosepoke from the back
Nosepoke from the back

Solder MOSFETs for solenoids
Solder MOSFETs for solenoids
Build MOSFET: 2-prong tab on 2-holed edge with female pin receivers facing outwards, 3-prong tab on 3-holed edge with female pin receivers facing outwards, resistor between 2 most spaced apart holes, "brain" tab with 3 thick prongs in 3 holes in center with bare metal piece facing resistor & 2-prong tab; top face is the one with C/+/- on it while bottom face is the one with 2 symbols on it

Note
The MOSFET takes input signal into 3-pronged pin receiver, does computation in big metal piece with hole, then either opens (receives 1) or closes (receives 0) power from 3-pronged pin receiver to send it to 2-pronged pin receiver (power + ground).

Insert all but "brain" chip, then rest upside-down on table to solder. Grip with clip to solder the "brain" chip last.
image.png

image.png

Assembled and wired MOSFET
Assembled and wired MOSFET

Clip all wires as close as possible and epoxy or cover with electrical tape to prevent shorting. Cover ends with epoxy.

Wire components to power and Arduino
Wire components to power and Arduino
Build long doublet wires from green/white twisted wire to connect the components to the Arduino. End one side with soldered male pin connectors (for solenoids and pokes) or male jumper wires (for servo motors). End the other side with male jumper wires. Green wire is ground, white wire is I/O.

Note
Make sure green/white twisted wire is long enough to cover the distance between the Arduino or power source and the component, with some extra.

Note
Keep a color scheme to your heatshrinking and jumper wire selection so that it's clear which ends are ground (e.g. black, green), power (e.g. red, white), or I/O (e.g. blue, yellow). For instance, for the twisted wire, make green always be ground. Label both ends of the wires with what it should connect to (e.g. "top left poke").


Split the ground by building a forked wire: 1 end with a male pin/jumper, 2 ends with female pins/jumpers, and in the center all 3 wires hooked together, soldered, and then all covered with black heat-shrink tubing. The male end will plug into the component ground and the female ends will plug into the Arduino and power supply grounds.
image.png

Note
All components should be grounded to both the Arduino and to the power supply. If you power your component from the Arduino (e.g. the 5V pokes and servo motors can be powered by the Arduino), you do not need ground splitters.


Build a power octopus: Take a long section of as many twisted pairs as you will need power to (eg 4 for X-maze solenoids). Twist all green wires together, then hook around a short section of black wire, solder, and heatshrink. Repeat with white wires and a section of red wire. Hook the black wire around the center loop of a power barrel and the red wire around the back loop of a power barrel, solder, and heatshrink. Plug the power supply into the in-line switch and then into this octopus.
Note
12V power uses 2.1mm barrel and 5V power uses 2.5mm barrel. Solenoids need 12V power while pokes and servo motors need 5V power.
PXL_20220212_215513141.MP.jpg


Note
Solenoids can fry if left connected to power for too long, even if they are not active. Use the switches to turn off power to components whenever they are not in use.

Connect wires to components. Each component will have 2 twisted pairs: 1 from I/O and the ground splitter and 1 from power and the ground splitter.
Diagram of wiring for a single poke, solenoid, and servo motor.
Diagram of wiring for a single poke, solenoid, and servo motor.

Mount pokes and motors to track
Mount pokes and motors to track
Poke should fit snugly into cutout in enclosure. Mount so that flat surface of back plate is facing up. Secure with 2 screws.
image.png

Using zip ties, attach the solenoid to the flat surface of the back plate so that the tubing can flow straight down through the pinch valve into the back of the spout.
image.png


Note
Test solenoid function every day. After attaching the tubing, you should hear a click when the solenoid opens and closes. If no click is present or solenoid is not dispensing liquid, replace.

Attach each 10mL syringe to a 3-way stopcock. Plug the end pointing sideways with a stopper and attach the luer to 1/16" piece to the end pointing away from the syringe.
Mount the syringes to the 80/20 above the enclosure using velcro. Connect the syringe to the poke spout with a length of tubing, keeping it short to allow gravity to efficiently pull down reward but not too short as to put tension on the tubing.
PXL_20220212_011311918.MP.jpg


Load the wash bottles with reward, tap water, and 70% ethanol. Keep the reward bottle refrigerated. At the end of each day of use, release all the remaining reward, then flush the syringe and tubing with tap water and push air through with the syringe plunger to dry. At least once a week, fill the line with ethanol and leave overnight to prevent mold growth. Replace lines between recording cohorts also for this reason.
Mount the servo motor beneath the floor by threading the plastic screws through the top of the floor into the 4 servo motor holes and securing with the nut pieces included with the servo motor kit.
Holes in floor for servo motor (large hole) and 4 screws (smaller holes).
Holes in floor for servo motor (large hole) and 4 screws (smaller holes).
Note
This step takes a while, as the screws and nuts are very fiddly. If possible, mount the motors before building the enclosures, so you can flip the floor upside down and affix the nuts from above.

Attach the arm to the servo motor. Superglue the rudders to the servo motor arms so that the screw is not covered. Superglue or acrylic weld the rudder to the base of the door so that the door is centered in the arm. For example dimensions, see "Tap Plastics" tab of parts list.
Arm, rudder, and door attached to the servo motor. Arm spray painted black to match enclosure.
Arm, rudder, and door attached to the servo motor. Arm spray painted black to match enclosure.

Secure wires to the underside of the 80/20 using the cable ties.
Note
The power supplies in the parts list are low noise, but they and their cables still generate 60Hz noise. Keep these cables as far from the mouse as you can when mounting wires to the 80/20.

Wire and code Arduino
Wire and code Arduino
Solder the BNC to bare ends connection to a length of twisted wire, then to jumper wires. This will allow the Arduino to send TTL pulses to the BNC breakout board for synchronizing with neural data. Skip this step if you are only acquiring behavioral data; modify the output (BNC) depending on what your system uses if not using NIDAQ system.
Plug jumper wire ends into screw terminal breakout. Plug TTL output into A0. Plug inputs and outputs into any digital pin. All inputs and outputs must be grounded to their power source and grounded to the Arduino. For an example pinout, see https://github.com/GiocomoLab/Yggdrasil/blob/main/Yggdrasil/Capture/Arduino/linear_track/linear_track_pinout.txt
Jumper wires plugged into screw terminal breakout board for a linear track. Top row is analog  (TTL pulse), other rows are digital. Rightmost column is ground. Note color coding: green/black for ground, red for power, blue/yellow for I/O (yellow for solenoids, blue for nosepokes).
Jumper wires plugged into screw terminal breakout board for a linear track. Top row is analog (TTL pulse), other rows are digital. Rightmost column is ground. Note color coding: green/black for ground, red for power, blue/yellow for I/O (yellow for solenoids, blue for nosepokes).

Install Arduino IDE and PuTTy on your computer. Connect the computer to the Arduino via the USB cable.
Write a script to operate the track. See pseudocode below and example script at https://github.com/GiocomoLab/Yggdrasil/blob/main/Yggdrasil/Capture/Arduino/linear_track/linear_track.ino

Setup:
initialize output stream
set pin modes as input or output
set initial configurations of components (e.g. solenoids closed)
send start TTL
print column titles of output stream

Loop:
if criterion detected:
send TTL pulse
print trial number, timestamp, and any relevant status information to the output stream
change configurations of components (e.g. open then close the solenoids)
change internal variables (e.g. trial count, ID of last poke)

Send script to Arduino, which will run indefinitely. Restart the script by sending it again, pressing the reset button, or opening the Serial Monitor. Test to confirm it works.
Note what port your Arduino is on (e.g. COM3). If you have multiple Arduinos, they will use different ports, even if the use the same USB cable swapped between them.
Open PuTTy. Set:
  • Serial line = this port
  • Speed = the speed you set your Serial as (see Serial.begin() line in your code, this value is usually 9600)
  • Connection type = Serial
Save this setting so you can load it later.
Open Logging (left menu). Click Browse to create a new file. Click Open to start the session. This will restart the Arduino script and store the Serial output to a file while displaying it on your screen. Close the screen to end the session. Note that this just ends saving to a file; the Arduino is still running the script indefinitely.
If dispensing reward, calibrate the duration required to dispense the volume needed. Run a simple script which opens and closes solenoids by a certain duration in the setup() (e.g. see calibration scripts at https://github.com/emilyasterjones/X_maze/tree/main/Capture/Arduino), measure how much reward was dispensed, and adjust the amount of time each solenoid is open accordingly. Several short durations will dispense less than one long duration of the same total length, so repeat opening and closing solenoids for a short duration many times (e.g. 10us x 50 times). Run this every time you change syringe height, tubing length, track position, solenoids, pokes, or anything else that might affect how the reward flows from the syringe to the poke.
Building an X-maze
Building an X-maze
Following the instructions above, the parts list, and the build files, build the enclosures for a 130cm X-maze, 150cm linear track, a 75cm open field, and a 15cm rest box.

X-maze floor laser cut plans, included in the Github directory of build files
X-maze floor laser cut plans, included in the Github directory of build files
Wire 2 pokes and 2 solenoids and mount on the linear track. Wire the solenoids to a single power source and switch and the pokes to a single power source and switch. Connect to an Arduino. Repeat for X-maze, making 4 pokes, 4 solenoids, and 4 servo motors, again wiring each type of component all to a single power source and switch and connecting to a second Arduino.
Add local cues. Print ~15cm tall visually distinct cues (e.g. blue circle, red heart). Laminate and mount with Scotch extreme fasteners to the outside of the ends each arm of the X-maze, above the poke.
Test the linear track and X-maze scripts at https://github.com/emilyasterjones/X_maze/tree/main/Capture/Arduino.
In the X-maze, the mouse learns to run from the open arm on the left to the correct choice on the right. There are 3 X-maze configurations:
  1. training: 1 left door and 1 right door closed, switching between top and bottom trajectories, so mouse effectively runs 2 alternating linear tracks
  2. probe: 1 left door closed, switching between top and bottom trajectories, both right doors open, mouse must choose the same arm as they sampled on the left (top or bottom, eg top left->top right)
  3. reversal: same as probe, except the mouse must choose the opposite arm from what they sampled (e.g. top left->bottom right)
Fig7_update_square.png


Train and record mice according to the protocol at https://github.com/emilyasterjones/X_maze/blob/main/Capture/protocol.md.
Note
Tips for working with mice:
  • Mice are nocturnal prey animals whose drive to avoid predation can cause them to not be able to acquire tasks, instead focusing their energy on fleeing and hiding. Encourage learning by keeping the room dimly lit and handling the mice extensively.
  • Mice are very neophobic. Allow mice to explore arenas and new foods with their cagemates to help them overcome this fear. Introduce novel foods and fresh cages when they have time to adapt (e.g. not right before surgery or right before recording).
  • Acclimate them to everything: the room (let them sit in cages inside the room for a while), the rig (let them explore an arena before starting behaviors), your scent (sit with your hands in their cage or the arena, let them crawl on your lab coat, toss in a used glove), and handling (do every handling step, like weighing and plugging in, multiple times over a few days before recording).
  • Form strong associations with the food rewards by introducing it when they are hungry, then restricting it to only be available on the track, then delaying feeding them so that they learn they cannot just wait out the recording to be returned to chow in their cage.
  • Mice don't get the opportunity to run in their cages. Encourage running by placing a wheel in their cage and housing in a reverse light/dark cycle so recordings are during their night (active) period.
  • Try to keep only mice of a single sex in the room at a time, even if cages are closed.
  • Support all 4 paws and keep a grip on the base of the tail when you carry them. Mice will only bite if provoked (e.g. you just injected them).
Example learning curves. Mice reach above chance levels in 5-10 days of training.
Example learning curves. Mice reach above chance levels in 5-10 days of training.
Example of mouse completing a few trials of the double forced track:
Video

Build counterweight pulley
Build counterweight pulley
The goal of the pulley counterweight is to (1) lift the data cable off of the mouse and towards data acquisition system and (2) reduce weight on the animals' head. First, attach a pulley, facing parallel with the main travel direction (e.g. along a linear track), as high as possible above the center of the enclosure. Using the parts list as a guide, thread the screw through an L-bracket attached to overhead 80/20 and secure with the nut piece.
Center pulley mounted next to camera
Center pulley mounted next to camera

Note
If your recording system uses a commutator, this will likely will not work.

Mount a second pulley along the side of the 80/20 frame, far enough away that it won't ever be above the mouse.
Second pulley connects the center pulley to the counterweight
Second pulley connects the center pulley to the counterweight

Tie one end of the nylon line to a 15mL conical tube, just below the cap. Thread the line up the second pulley, over the center pulley, and down to the headstage holder. Loop it into the headstage holder and secure with a knot. Make the line long enough so that the 15mL conical tube is at a height you can reach.
Run the data cable along the center nylon line, as far up as you can, loosely attaching the data cable to the line using small knots of more nylon line. Leave some slack so that the data cable can twist itself around the line as the mouse rotates.
IMG_20201116_130724.jpg

Secure the other end of the data cable to a wall above the acquisition system. Affix using loops of folded over tape, so that the data cable stays running down the wall but can easily be pulled up or down.
Example full assembly. Camera and center pulley are attached far overhead. Side pulley is mounted along wall, with counterweight below. Data cable runs along the same wall, affixed with loops of folded over yellow tape.
Example full assembly. Camera and center pulley are attached far overhead. Side pulley is mounted along wall, with counterweight below. Data cable runs along the same wall, affixed with loops of folded over yellow tape.

Add water to the conical tube, testing how mice move with different amounts of water. Too little water and the counterweight won't alleviate enough weight, causing mice to tilt their heads under the weight. Too much water and the counterweight will pull the mice towards the center pulley, causing mice to be unable to reach far corners of the enclosure. If the 15mL conical tube is too much weight, you can add a third pulley or swap for an Eppendorf tube.
Monitor the data cable, making sure it doesn't get too twisted around the pulley line, which could prevent the mice from reaching far corners of the enclosure. Keeping the data cable taut between the pulley line and the wall reduces this twisting, as instead the cable along the line will twist on itself. Between epochs of recording, rotate the mouse in your hands to alleviate any twisting, as once twisting begins it can quickly get worse.
Build headfixation apparatus
Build headfixation apparatus
This attachment to the 80/20 frame allows you to briefly headfix mice so you can plug their headstage in easily, able to use both hands and move away to check the neural signal or get supplies during the process. First, machine standard headfork, or machine custom headfork if using chronic Neuropixels build: https://github.com/emilyasterjones/chronic_NPX_mouse/tree/main/headforks
Cut a 3 inch slice of the foam roll to create a wheel. Paint with black spray paint (to make the surface easier to clean) and anti-ESD spray.
Drill a 6mm hole through the center of the wheel. Thread the metal rod through the center hole and center the wheel on the rod. Epoxy to secure.
Attach the 8 inch 80/20 pieces to the outside edge of one of the levels of your 80/20 frame, making a box. Secure with L-brackets along the inside of each of the 4 joints. You will have 4 sides of your box: 1 from the main 80/20 frame (referred to as Side 1), 2 extruding out from it (referred to as Sides 2 and 3 for left and right), and 1 connecting the 2 extruding pieces (referred to as Side 4).
Attach the mounting post to the post base, then place that on Side 1, next to Side 2. Place the 1/4"-20 drop-in nuts in the 80/20, then thread the accompanying screws through the post base into the nuts and screw in. The post will be positioned in a later step.

Note
1/4"-20 thread size screws are too small for the 1.5" 80/20, but are the correct size for the Thorlabs parts. The drop-in nuts will twist so that they fill the 1.5" 80/20 groove and stay put.

Attach the post bracket (large black piece) to the post. Position the bracket so it is parallel to Side 1 and pointed towards Side 3. Place the mounting base (small flat black piece) pointed towards the interior of the box, perpendicular to the post bracket. Affix this to the top of the post bracket using 2 1/2" screws each threaded through a washer, then affix the headfork to the underside of this mounting base using the 2 1" screws each threaded into a nut.
Thread the 0.5" posts into the post bases, attach to pedestal adapters, then place those on Sides 2 and 3. Place a clamping fork around the base of each and secure each with 2 1/4"-20 screws and drop-in nuts. These posts will be positioned in a later step.
Thread the rod holding the wheel through the thin holes of the right-angle clamps, one on each side, then thread the posts through the larger holes and tighten bolts to secure. Adjust the posts so that the wheel is parallel to the box, then adjust the right-angle clamps so that the wheel is centered over the box with the rod parallel to the floor.
Completed headfixation apparatus, before positioning adjustments
Completed headfixation apparatus, before positioning adjustments

Adjust the position of each of the parts:
  1. left/right position of mounting post: center over wheel
  2. distance between wheel posts and Side 1: make headfork end about 1.25cm in front of the center of the wheel
  3. height of wheel and headfork: make distance between base of headfork and top of wheel 3cm

Note
These positions work well for keeping the mouse comfortable and walking slowly. For setups where recordings are headfixed, try moving the headfork back and up so that the mouse is can only reach the wheel with its paws (not its belly) and falls slightly off of the back of the wheel to encourage movement.

Place magnetic hex key and magnetic headbar screws in a tray attached to the inside of the 80/20 box. Place a weigh boat on Side 1 behind the wheel to catch poop. Keep the headstage holder next to the wheel by taping to the 80/20 frame.
Mouse with chronic Neuropixel implant headfixed to wheel for plugging in headstage.
Mouse with chronic Neuropixel implant headfixed to wheel for plugging in headstage.
Headstage holder attached and electrode plugged into headstage. See Assembly protocol for instructions on how to build the headstage holder.
Headstage holder attached and electrode plugged into headstage. See Assembly protocol for instructions on how to build the headstage holder.
Same as above, for dual 2.0 probes. Use ESD forceps to bend the flex cable and guide it into the headstage.
Same as above, for dual 2.0 probes. Use ESD forceps to bend the flex cable and guide it into the headstage.
Single 1.0 probe
Single 1.0 probe
Dual 2.0 probes
Dual 2.0 probes

Record
Record
If using the chronic Neuropixels implant described in the other protocols in this collection, refer tohttps://github.com/emilyasterjones/X_maze/blob/main/Capture/protocol.md for how to record using the completed system. With handling and acclimatization, mice reach the same running speeds and trials per minute as before surgery within 3-5 days. See video below for a tour of the completed system, including a linear track and open field.
Video