Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions Air-track/Air-track_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

In this paradigm, head-fixed mice perform a visual two-alternative forced choice task. This setup can be adapted to accommodate more sensory modalities by using appropriate equipment.

<div align="center">
<figure id="fig">
<img src="figures/Fig.png" width="%" />
</figure>
</div>

## 📦 Hardware parts list

### 🔌 Electronics
Expand Down Expand Up @@ -46,27 +52,29 @@ In this paradigm, head-fixed mice perform a visual two-alternative forced choice

### 🧩 3D printed parts

You will find the blueprints for the items you should 3D print [here](ethopy_hardware/Air-track/3d_designs).
You will find the blueprints for the items you should 3D print [here](https://github.com/ef-lab/ethopy_hardware/tree/main/Air-track/3d_designs).

| # |Item |Qty |Filename |
|:-:|:-: |:-: |:-: |
|1 |screen holders |2 |[screen_holder.stl](ethopy_hardware/Air-track/3d_designs/screen_holder.stl) |
|1 |screen holders |2 |[screen_holder.stl](https://github.com/ef-lab/ethopy_hardware/blob/main/Air-track/3d_designs/screen_holder.stl) |

## 🛠️ Step-by-step assembly instructions

You will find the blueprints for the items you should 3D print [here](3d_designs).
You will find the blueprints for the items you should 3D print [here](https://github.com/ef-lab/ethopy_hardware/tree/main/Air-track/3d_designs).

> :bulb: **Info:** The air-table ([see Other Hardware, part #1](#hardware1)) and platform ([see Other Hardware, part #2](#hardware2)) of the air-track were developed by Dr. Mostafa A. Nashat and assembly (https://doi.org/10.1152/jn.00088.2016, https://doi.org/10.1101/2024.08.22.608577).

**Step 1**. Set up the [Raspberry Pi Behavioral Setup](ethopy_hardware/Homecage/RP_instructions.md) following steps 1-7, modifying Raspberry Pi Behavioral Setup Step 5 to connect only the valves ([see Electronics, part #2](#electro2)) to the EthoPy Controller Board.
**Step 1**. Set up the [Raspberry Pi Behavioral Setup](https://github.com/ef-lab/ethopy_hardware/blob/main/Homecage/RP_instructions.md) following steps 1-7, modifying Raspberry Pi Behavioral Setup Step 5 to connect only the valves ([see Electronics, part #2](#electro2)) to the EthoPy Controller Board.

**Step 2**. Mount the Raspberry Pi Behavioral Setup on the screen holders ([see 3D printed parts, part #1](#printed1)) in front of the air-table ([Fig. 1](#fig1)).

<div align="center">
<figure id="fig1">
<img src="figures/Fig1a.png" width="66.4%" />
<img src="figures/Fig1b.png" width="30%" />
<figcaption><i>Figure 1: The RP behavioral setup, mounted on the aluminum rails of the air-table using the screen holders.</i></figcaption>
</figure>
</div>


**Step 3**. Assembling of a behavior port ([see Other Hardware, part #3](#hardware3)). Mounting of the infrared emitter ([see Electronics, part #3](#electro3)) and phototransistor ([see Electronics, part #4](#electro4)) to the port was performed following the instructions provided [here](https://sanworks.github.io/Bpod_Wiki/assembly/mouse-behavior-port-assembly/). Each platform included three behavior ports.
Expand All @@ -84,10 +92,12 @@ You will find the blueprints for the items you should 3D print [here](3d_designs

**Step 7**. Remove the insulation from the edge of the Ethernet wires. Place 13 female terminals ([see Other Hardware, part #4](#hardware4)) at the end of each wire and cover the exposed terminal with insulation (e.g., heat shrink tube, [see Other Hardware, part #9](#hardware9)). In the following steps, the identification of the Ethernet cable wires is shown in ([Fig. 2](#fig2)).

<div align="center">
<figure id="fig2">
<img src="figures/Fig2.png" width="30%" />
<figcaption><i>Figure 2: Ethernet cable wire number ids.</i></figcaption>
</figure>
</div>

> :memo: **Note:** You will use the wires 1 (signal of the sensor), 4 (power of the emitter), 5 (ground).

Expand All @@ -99,15 +109,16 @@ You will find the blueprints for the items you should 3D print [here](3d_designs

> :memo: **Note:** Power cables and grounds should be short-circuited together to connect to one pin of the Raspberry Pi.

**Step 9**. Driving of the valves for ports 1 and 2 using the [`EthoPy Controller Board`](ethopy_hardware/Homecage/EthoPy_Controller_Board.md).
**Step 9**. Driving of the valves for ports 1 and 2 using the [`EthoPy Controller Board`](https://github.com/ef-lab/ethopy_hardware/blob/main/EthoPy_Controller/EthoPy_Controller_Board.md).

**Step 10**. Adjust the reward tubes ([see Other Hardware, part #5](#hardware5), [part #6](#hardware6)) to the behavioral port and connect the valves. Bridge the valves and connect to the water supply ([Fig. 3](#fig3)).

<div align="center">
<figure id="fig3">
<img src="figures/Fig3.png" width="30%" />
<figcaption><i>Figure 3: Solenoid valve with the positions of the tubes</i></figcaption>
</figure>

</div>

**Step 11**. If sound/light insulation is needed, the Air-track behavioral system can be enclosed in the [`Rat-Rig V-Hive Enclosure Base Model`](https://ratrig.dozuki.com/Guide/01.+V-Hive+Enclosure+Base+Model/183?lang=en) ([see Other Hardware, part #7](#hardware7)). For further sound and light insulation, related insulation material (e.g. ISOLFON foam plate, see ([see Other Hardware, part #8](#hardware8))) can be used to cover the sides of the enclosure.

Expand Down
Binary file added Air-track/figures/Fig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 28 additions & 1 deletion EthoPy_Controller/EthoPy_Controller_Board.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# EthoPy Controller Board and Arduino

Arduino is a microcontroller that converts the analog signal from the lick and proximity ports to digital, and a Controller Board ensures the communication between the Arduino and Raspberry Pi.

<div align="center">
<figure id="fig13">
<img src="Controller_Figures/Fig13.png" width="%" />
Expand Down Expand Up @@ -48,88 +49,114 @@ Arduino is a microcontroller that converts the analog signal from the lick and p
<a id="electro17"></a>
|15 | Printed Circuit Board (PCB) | 1 | Custom | — | |

<div align="center">
<figure id="fig1">
<img src="Controller_Figures/Fig1.png" width="30%" />
<figcaption><b>Figure 1</b>: <i>EthoPy Controller Board and Arduino parts</i></figcaption>
</figure>
</div>

> :memo: **Note:** <ins>You will also need</ins>: a soldering iron, a wire cutter

## 🛠️ Step-by-step assemply instructions

**Step 1**. Print the PCB board of the schematic ([Fig. 2](#fig2)). PCB and gerder files for JLPCB are available [here](). <!--Add hyperlink-->

<div align="center">
<figure id="fig2">
<img src="Controller_Figures/Fig2.png" width="30%" />
</figure>
</div>

**Step 2**. Solder the 1x15 female pin headers on each side of the Arduino Nano Every board ([Fig. 3](#fig3)).

<div align="center">
<figure id="fig3">
<img src="Controller_Figures/Fig3a.png" width="45.6%" />
<img src="Controller_Figures/Fig3b.png" width="30%" />
</figure>
</div>

**Step 3**. Solder each resistor into its designated position on the PCB according to its resistance value ([Fig. 4](#fig4)).

<div align="center">
<figure id="fig4">
<img src="Controller_Figures/Fig4.png" width="30%" />
</figure>
</div>

**Step 4**. Solder the five 1x2 male pins headers into the corresponding ports on the PCB ([Fig. 5](#fig5)).

<div align="center">
<figure id="fig5">
<img src="Controller_Figures/Fig5.png" width="30%" />
</figure>
</div>

**Step 5**. Solder the transistors onto their correct positions on the board ([Fig. 6](#fig6)).

<div align="center">
<figure id="fig6">
<img src="Controller_Figures/Fig6.png" width="30%" />
</figure>
</div>

**Step 6**. Solder the diodes in the same way ([Fig. 7](#fig7)).

<div align="center">
<figure id="fig7">
<img src="Controller_Figures/Fig7.png" width="30%" />
</figure>
</div>

**Step 7**. Solder the tactile push button switch in the appropriate position on the board ([Fig. 8](#fig8)).

<div align="center">
<figure id="fig8">
<img src="Controller_Figures/Fig8.png" width="30%" />
</figure>
</div>

**Step 8**. Solder the capacitor, ensuring the longer positive lead goes into the right hole ([Fig. 9](#fig9)).

<div align="center">
<figure id="fig9">
<img src="Controller_Figures/Fig9.png" width="30%" />
</figure>
</div>

**Step 9**. Solder the right-angle female pin headers - two on the left side (1x2) for valves and three on the bottom (1x3) for ports and centerport ([Fig. 10](#fig10)).

<div align="center">
<figure id="fig10">
<img src="Controller_Figures/Fig10.png" width="30%" />
</figure>
</div>

**Step 10**. Solder the two 1x15 female pin headers for the Arduino board ([Fig. 11](#fig11)).

<div align="center">
<figure id="fig11">
<img src="Controller_Figures/Fig11.png" width="30%" />
</figure>
</div>

**Step 11**. Mount the Arduino board onto the previously mentioned female pin headers ([Fig. 12](#fig12)).

<div align="center">
<figure id="fig12">
<img src="Controller_Figures/Fig12a.png" width="37.5%" />
<img src="Controller_Figures/Fig12b.png" width="30%" />
</figure>
</div>

**Step 12**. Solder the 40-pin extra-tall stackable female header to connect the PCB to the Raspberry Pi board ([Fig. 13](#fig13)).

<div align="center">
<figure id="fig13">
<img src="Controller_Figures/Fig13.png" width="30%" />
</figure>
</div>

**Step 13**. Set up the Arduino using the code provided [here](). <!--add hyperlink-->
**Step 13**. Set up the Arduino using the code provided [here](https://github.com/ef-lab/ethopy_hardware/blob/main/EthoPy_Controller/EthoPy_Controller_code.ino).

20 changes: 19 additions & 1 deletion Homecage/Lick_ports_assemply.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,28 +57,34 @@ Lick Ports are used both for lick detection and reward delivery. Regarding the f
- `Pin 3`: collector of the sensor (current flow after light reflection)
- `Pin 4`: emitter of the sensor (connects to the signal output)

<div align="center">
<figure id="fig1">
<img src="Lick_ports_Figures/Fig1a.png" width="30%" />
<img src="Lick_ports_Figures/Fig1b.png" width="24.5%" />
<figcaption><b>Figure 1</b>: <i>Positions of the phototransistor’s pins and their corresponding wires.</i></figcaption>
</figure>
</div>

**Step 5**. Use the soldering station to connect the pins vertically to their corresponding wires as described below ([Fig. 2](#fig2)).

**Step 6**. Use a hot air gun to heat the heat shrink tubes you have added to each wire to cover the wire and the phototransistor’s pins.

<div align="center">
<figure id="fig2">
<img src="Lick_ports_Figures/Fig2.png" width="30%" />
<figcaption><b>Figure 2</b>: <i>Heat shrink tubes covering the exposed wires and the phototransistor’s pins.</i></figcaption>
</figure>
</div>

**Step 7**. Cut a piece of heat shrink tube (3/16’’) long enough to cover the exposed cable and the pins of the phototransistor, and pass it down the cable. Αpply the epoxy glue ([Other Hardware parts list, item #6](#other6)) to the exposed section of the cable and cover it up to the edge. Cover the exposed cable with the heat shrink tube and use the hot air gun to heat it. Ensure that the phototransistor’s pins and the wires are well covered.
Note: As the hot air gun shrinks the tube, ensure that the epoxy glue will not cover the phototransistor.

<div align="center">
<figure id="fig3">
<img src="Lick_ports_Figures/Fig3.png" width="30%" />
<figcaption><b>Figure 3</b>: <i>Heat shrink tube covering the phototransistor side of the lick port.</i></figcaption>
</figure>
</div>


**Step 8**. Cut a steel cylinder ([Other Hardware parts list, item #2](#other2)). long enough to cover the heat shrink tube that covers the exposed wires ([Fig. 4](#fig4)). Carefully smooth both edges of the cylinder with sandpaper to ensure the mouse is not injured while licking it.
Expand All @@ -87,17 +93,21 @@ Note: As the hot air gun shrinks the tube, ensure that the epoxy glue will not c

> :memo: **Note:** The needle is required <ins>only if</ins> you will use the lick port for reward delivery.

<div align="center">
<figure id="fig4">
<img src="Lick_ports_Figures/Fig4.png" width="30%" />
<figcaption><b>Figure 4</b>: <i>Indicative lengths of the steel cylinder and the needle relative to the lick port.</i></figcaption>
</figure>
</div>

**Step 10**. Pass the phototransistor cable and the needle through the steel cylinder. Apply epoxy glue around the heat shrink tube insulation of the phototransistor ([Fig. 5](#fig5)) and the needle, ensuring that the phototransistor’s and the needle’s tops are not covered with glue. Pull the cable and the needle so that they are on the same level and a few millimeters below the top of the steel cylinder to prevent possible damage. Fill all the empty spaces between the phototransistor and the cylinder with epoxy glue.

<div align="center">
<figure id="fig5">
<img src="Lick_ports_Figures/Fig5.png" width="30%" />
<figcaption><b>Figure 5</b>: <i>Phototransistor end of the lick port.</i></figcaption>
</figure>
</div>

### Connecting the cable to the resistors

Expand All @@ -107,24 +117,30 @@ You will need two resistors:

**Step 11**. Shorten the wire connected to the anode and expose the conductor. Cut both ends of the 330Ω resistor ([Electronics parts list, item #3](#electro3)) and use soldering to connect the 330Ω resistor to the wires connected to the anode and the collector. Solder the resistor horizontally across the cable, connecting the distal pin to the collector wire and the proximal pin to the anode wire ([Fig. 6](#fig6)).

<div align="center">
<figure id="fig6">
<img src="Lick_ports_Figures/Fig6.png" width="30%" />
<figcaption><b>Figure 6</b>: <i>Connections of the 330Ω resistor.</i></figcaption>
</figure>
</div>

**Step 12**. Shorten the wire connected to the emitter and expose the conductor. Βend one of the pins of the 47KΩ resistor ([Electronics parts list, item #4](#electro4)). Use soldering to connect the cathode wire to the straight pin and the emitter wire to the other pin ([Fig. 7](#fig7)).

<div align="center">
<figure id="fig7">
<img src="Lick_ports_Figures/Fig7.png" width="30%" />
<figcaption><b>Figure 7</b>: <i>Connections of the 47kΩ resistor.</i></figcaption>
</figure>
</div>

**Step 13**. Use a male pin header ([Other Hardware parts list, item #4](#other4)) with 3 pins and connect it to the cable ([Fig. 8](#fig8)). Mark the tip that is connected to the bent pin of the 47kΩ resistor so you can distinguish it (it corresponds to the signal).

<div align="center">
<figure id="fig8">
<img src="Lick_ports_Figures/Fig8.png" width="30%" />
<figcaption><b>Figure 8</b>: <i>Connections of the signal cable (<b>P</b>: power, <b>G</b>: ground, <b>S</b>: signal).</i></figcaption>
</figure>
</div>

**Step 14**. Cover the exposed cable and the proximal part of the male pin header with heat shrink tube (1/4’’ or 3/8’’), and heat it with the hot air gun.

Expand All @@ -136,8 +152,10 @@ You will need two resistors:

**Step 17**. Use your finger to simulate the lick of a mouse and observe the activation of the phototransistor ([Fig. 9](#fig9)).

<div align="center">
<figure id="fig9">
<img src="Lick_ports_Figures/Fig9a.png" width="30%" />
<img src="Lick_ports_Figures/Fig9b.png" width="35.5%" />
<figcaption><b>Figure 9</b>: <i>Sensor voltage output (left: connections of the power supply and the oscilloscope, right: activation of the phototransistor).</i></figcaption>
</figure>
</figure>
</div>
Loading