Materials
The materials used for each component, along with their respective dimensions, are summarized in Table 1. The apparatus comprises two main components, including the chamber assembly and control cabinet, both of which were fabricated using the machining procedures described in Table 2.
Apparatus design
The apparatus is a two-compartment system comprising a dark chamber fabricated from 3D-printed acrylonitrile butadiene styrene (ABS) and a light chamber constructed from 5 mm acrylic sheets, with overall dimensions of 40 × 20 × 30 cm (length × width × height). The two compartments are separated by a 6 × 4 cm (length × height) sliding door made of Formex. The control cabinet houses an embedded computer system (Raspberry Pi 5, Fig 1a) integrated with a camera module for animal monitoring and behavioral recognition. The Raspberry Pi Camera Module 3 is specifically designed for use with Raspberry Pi devices (Fig 1b). It connects directly to the Raspberry Pi
via the camera serial interface, enabling high-resolution image capture and video recording without requiring any intermediate hardware.
Stimulation circuit
A 5 V-10 A relay module is also integrated into the circuit to control the on-off switching of the current supplied to the load in response to control signals from the Arduino (Fig 1c). The relay operates at 5 VDC and is capable of switching high alternating current (AC) loads. The electrical stimulation circuit was designed with two main components. The power supply consists of a 24 VAC, 3 A adapter. Voltage regulation is achieved using a TRIAC BT136. The TRIAC modulates the AC voltage and current delivered to the load, thereby enabling precise control of the stimulation intensity. The load comprises a fixed resistor and a variable resistor. The fixed resistor is incorporated to prevent the current from dropping to 0 A, ensuring stable circuit operation, whereas the variable resistor allows fine adjustment of the current intensity according to the experimental requirements (Fig 1d, e).
Data acquisition and annotation
Image data were acquired using a Raspberry Pi camera module 3 with a resolution of 1080p and a frame rate of 30 FPS, mounted above the two compartments. Data were collected through two experimental phases: training trial and test trial. Images were extracted at every third frame to reduce redundancy.
Image labelling was performed using RoboFlow with YOLO TXT format, with two object classes defined: (a) lab_mouse, representing the experimental animal and (b) border, representing the physical boundary between the two comparments. The animal’s location was determined based on its spatial relationship to the detected border and classified as being in the light chamber, dark chamber or at the doorway. Each bounding box was drawn to enclose the entire body of the animal.
Model training
The dataset was organized according to the standard Ultralytics YOLOv11 directory structure. Given the fixed top-mounted camera position, augmentation was applied to dataset to reflect realistic experimental variations. All images were resized to 640 × 640 pixels and split into training (70%), validation (20%) and test (10%) subsets using a stratified strategy to ensure balanced class distribution. Subsequently, the model was trained on Google Colab using the Ultralytics framework, with continuous monitoring of loss functions covering localization, classification and objectness. Model performance was evaluated using precision, recall and mean average precision (mAP) to assess the accuracy and reliability of the model.
Heatmap generation
A heatmap was constructed based on the locations of the detected bounding boxes to visualize the spatial distribution of animal movement within the apparatus. Each image was divided into a uniform grid and the frequency of bounding box occurrences within each cell was calculated and mapped onto a color scale. Red regions indicate higher occupancy whereas blue regions indicate lower occupancy.
Animals
Female Swiss albino mice (6-8 weeks old, weighing 20-25 g) were purchased from the Pasteur Institute, Ho Chi Minh City, Vietnam. Animals were acclimatized for 14 days prior to experimentation under controlled environmental conditions (temperature 23±2°C, relative humidity 30-40%, 12 h light/dark cycle) as previously described for our animal housing conditions
(Trinh et al., 2026a). Mice were housed in polypropylene cages (36 × 30 × 20 cm), with 4-6 animals per cage and had access to standard laboratory chow and water
ad libitum. All procedures involving animals were approved by the Animal Ethics Committee of Ton Duc Thang University (Approval No. 17/HDTVDD). The experiments were carried out at Ton Duc Thang University, Ho Chi Minh City, Vietnam, between July 2025 and July 2026.
Experimental validation
To validate the constructed PA apparatus as a tool to evaluate memory, scopolamine was administered intraperitoneally at 1 mg/kg once daily for six consecutive days, following a previously reported protocol for inducing memory impairment in mice
(Kim et al., 2016). Following habituation, mice were randomly assigned into two groups: (a) control group (n = 8): mice received 0.9% saline (i.p.) and (b) scopolamine group (n = 8): mice received scopolamine at a dose of 1 mg/kg (i.p.).
Passive avoidance (PA) test
On days 5 and 6, mice were subjected to the PA test 30 mins after each injection. The training trial (day 5) commenced with placing each mouse individually in the light compartment. After a 5 s delay, the sliding door was opened, allowing the animals to voluntarily enter the dark compartment up to 300 s. Upon complete entry, the door was automatically closed and a mild electric foot shock (1.3 mA, 3 s) was delivered through the grid floor 2 s thereafter. Mice remained in the dark compartment for an additional 120s before being returned to their home cage. The test trial, conducted 24 hours later, followed the same procedure as the training day, however, no electric shock was delivered. Memory performance was assessed by measuring the step-through latency, defined as the time taken for the animal to enter the dark compartment, with a maximum cut-off time of 300 s.
Hematoxylin and eosin (H and E) staining
Mice were anesthetized with a single intraperitoneal injection of avertin (300 mg/kg). They were subsequently subjected to transcardial perfusion by initially flushing with phosphate-buffered saline (PBS, pH 7.4) followed by 4% (w/v) paraformaldehyde (PFA). Brains were carefully removed, sectioned into 3-mm blocks and post-fixed in 4% PFA for 24 hours at room temperature. Hippocampus-containing block was then processed for dehydration and embedded in paraffin and coronal serial 10 µm-thick sections were stained with H and E according to our previous protocols
(Trinh et al., 2026b and
Mai et al., 2026).
Immunofluorescence
Paraffin-embedded sections of 10 µm thickness were deparaffinized, rehydrated and then subjected to antigen retrieval. Sections were incubated in blocking solution [10% (v/v) fetal bovine serum, 0.1% Triton X-100 in PBS, pH 7.4] for 1 hour at room temperature. Rabbit anti-brain-derived neurotrophic factor (BDNF) primary antibody (1:100, Elabscience E-AB-18244) applied to sections overnight at 4oC. Sections were then incubated with goat anti-rabbit secondary antibody conjugated to AlexaFluor-488 (1:500, Servicebio) for 2 hours at room temperature. Nuclei were labelled using DAPI (1:1000, Invitrogen D1306). After washing in PBS-Tween [0.1% (v/v) Tween-20 in PBS, pH 7.4] for 15 mins, sections were air-dried and coverslipped with fluorescent mounting medium (Invitrogen). 20× images were acquired using an Axiovert 5 microscope with Zen software (Carl Zeiss).
Statistical analysis
All statistical analyses were performed using GraphPad Prism 8.0 software (San Diego, CA, USA). Data are presented as mean ± SD. Step-through latency and BDNF expression data were analyzed using two-way ANOVA followed by Tukey’s post-hoc test. Statistical significance was defined as p<0.05 and is indicated in each figure legend.