diff --git a/src/.vuepress/config.js b/src/.vuepress/config.js index 5f6a665..81b13a3 100755 --- a/src/.vuepress/config.js +++ b/src/.vuepress/config.js @@ -85,7 +85,9 @@ function getBuildingSidebar () { 'projection', 'reward', 'air-puffs', - 'control' + 'control', + 'pupillometry', + 'lick-detection' ] } diff --git a/src/building/lick-detection.md b/src/building/lick-detection.md new file mode 100644 index 0000000..ecdf6fd --- /dev/null +++ b/src/building/lick-detection.md @@ -0,0 +1,49 @@ +--- +title: Lick detection +lang: en-US +--- + +# {{ $frontmatter.title }} + +The lick detection module is based on a simple transistor design (Slotnick 2009), we modified the design to allow the detection of 2 lick spouts in the same module. Additionally, we added a DC-DC converter to isolate the circuit from the power source and added a 5V voltage regulator after the relays to have a TTL signal at the output of both circuits. + +[comment]: # (Add diagram of the modified circuit with the explanation of the inputs and outputs) + +The module was designed this way to enable a specific task that require the use of two spouts, but it can also be used in a one spout setting (e.g count the number of licks during a task). Below is an example of a setup using two lick spouts during a decision making task developed by one member of the BRAIN CoGS team. + +[comment]: # (Drawing of the two lick spout setting) + +## Two lick detection module assembly + +The schematics of the PCB can be found here and the drawings with the specs of the part can be found here, below is an image that can be used as a reference. The step by step instructions to solder the components on the solenoid valve driver from the [control module](/building/control.html#solenoid-valve-driver-assembly) can be used as well for this module, making sure to use the appropiate components and placing them as labeled in the PCB. + +[comment]: # (Image of the PCB with the part number labels or references) + +After assemblying the module, place the labels as shown in the picture below. + +[comment]: # (Image of the enclosure with labels) + +The description of each pin of the lick detector module can be found in the table below. + +| PIN | Description | +| ----------- | ----------- | +| 1. GROUND | Input - ground | +| 2. 24V | Input - 24V DC | +| 3. OUT LEFT | Output - TTL output pin for the left spout | +| 4. OUT RIGHT | Output - TTL output pin for the right spout | +| 5. RIGHT SPOUT | Input - Connect the right spout to this pin | +| 6. LEFT SPOUT | Input - Connect the left spout to this pin | +| 7. HEADPLATE | Input - Connect the headplate to this pin | +| 8. COMMON | Input - Connect the ground from the NiDAQ (or any acquisition device) to this pin | + +### Soldering a cable to the feeding spout and headplate + +[comment]: # (If possible, add photos of the process) + +1. Use sandpaper to remove the outer layer of the stainless steel spout at one of the sides if the luer lock connector (as far as possible from the connector tip), do the same with the headplate (wherever you want to place the cable, we recommend to use the arm without the tapped hole to fit a heat shrinkable tube). + +2. Clean the sanded surface with isopropyl alcohol and let it dry. In the meantime, prepare the coaxial cable (we recommend a [26](https://www.digikey.com/en/products/detail/molex-temp-flex/1000660054/4368709) or [28](https://www.digikey.com/en/products/detail/molex/1001935047/8566104) AWG coaxial cable like these ones ) by removing the jacket and the shield, then expose the conductor by removing a portion of the insulation material. Repeat the process on the other end of the cable. + +3. Drop a small drop of flux in the sanded surface and place the tip of the solder iron over the flux - the tip might stick to the stainless steel, that's normal - continue heating the surface and use soldering wire (we found lead works best) to solder the coaxial cable to the spout and headplate. + +4. Use heat shrinkable tube to cover the soldering spot. \ No newline at end of file diff --git a/src/building/pupillometry.md b/src/building/pupillometry.md new file mode 100644 index 0000000..1814984 --- /dev/null +++ b/src/building/pupillometry.md @@ -0,0 +1,44 @@ +--- +title: Pupillometry +lang: en-US +--- + +# {{ $frontmatter.title }} + +The pupillometry module consist on a monochrome camera mounted at the side of the screen pointing laterally to the face of the mice, the lens used allows to frame the pupil with enough detail to be processed by markeless pose estimation software. The field of view obtained with the lens allows to track sniffing and whisking, altough that is out of the scope of this building guide. + +[comment]: # (Add an image with the camera set up) + +## Camera set up + +We use a Teledyne FLIR FFY-U3-04S2M-S camera, the small factor allows to place it right below the aluminum plate holding the screen without taking much space on the rig. We use a 0.4 MP, 121 FPS, monochromatic camera with an IR light source; a mono camera has better sensitivity and allow us to capture the details of the pupil better than the color sensor. Despite the fact that pupillometry can be detected at 30 Hz, we decided to use a 0.4 MP 121 FPS camera to have the flexibility in case we need another kind of measurement (whiskers move), but using the 1.6 MP 60 FPS camera should work fine for pupillometry and should result in a better image resolution. + +1. Make a 1" hole on the screen at the position showed below. If you're setting up a pupillometry module on a built screen first mark the position where the hole is going to be made, then use a precision knife to remove the outer part of the screen (make sure not to introduce the knife all the way into the other side), remove the outer part using your fingers and then use your fingers to remove the styrofoam up to the inner part of the screen (the paint layer). Then, use the precision knife to cut the paint layer in the inner part of the screen, this way the hole from the inside out will be cleaner and the smaller size possible (it will adjust to the diameter of the lens). + +::: tip + +Despite the fact that the screen has a hole in one of the sides, we didn't observe any behavioral impact in any of the pilot -or subsequent- sessions. The position and the fact that the hole is tailored to the diameter of the lens can be the reason. + +::: + +[comment]: # (Image of the position of the hole in the screen and final result photo) + +2. Set up the camera and position it on the aluminum plate. + +[comment]: # (Image of the thorlabs parts and how to assemble them in fusion 360, and a couple of photos on the final result) + +3. Connect it to the computer. + +## Light source set up + +Explain how to set up the light source at the top of the rig. + +[comment]: # (Drawing on how to assemble the Thorlabs parts and a photo if I have of the result) + +## Image focus and camera positioning + +Explain step by step how to focus the image and screw all the parts to get the camera in position. + +[comment]: # (Image of how the mice should look) + +## Explanation of the processing and how to set up the pipeline \ No newline at end of file