User:Zainab Siddiqui/Open-Source Sleep/Activity Tracking System
Project Overview
[edit | edit source]This project developed an affordable, non-invasive system for long-term monitoring of sleep and activity patterns in mice. The system was developed as part of an undergraduate thesis investigating the relationship between the CADM2 gene and sleep behaviour in transgenic mice. Existing approaches such as electroencephalography (EEG) can provide detailed measurements of sleep but require surgical implantation. Non-invasive infrared sensors have their own limitations because they infer sleep from movement, but they can still provide useful measurements of sleep behaviour. The system therefore adapted the open-source COMPASS framework, using passive infrared (PIR) motion sensing to continuously detect movement across multiple mouse cages.
The resulting setup was designed to provide time-stamped activity data over extended experimental periods while remaining fairly low-cost, modular, and practical for laboratory use. The modified system incorporated remote data logging to make longer-term monitoring more practical.
System Design
[edit | edit source]The system uses PIR sensors to detect movement within individual mouse cages and convert those signals into time-stamped voltage data. Eight cages could be recorded at once using eight PIR sensors connected across two Arduino boards. An LDR was also included to monitor ambient light conditions.
-
Figure 1. Assembled PIR sensor and main PCB boards used
-
Figure 2. MicroSD data logger to record activity data remotely
-
Figure 3. PIR sensor board connected through RJ12 cabling during system testing
The hardware was based on the COMPASS design and consisted of individual PIR sensor boards, a multi-channel main PCB, Arduino microcontrollers, and a MicroSD data logging system, which allowed remote recording and was the main modification. The components were connected through RJ12 cabling, allowing the sensor boards to be mounted above individual cages while the main electronics remained centralized.
-
Figure 4. A PIR sensor, attached to the shelf above a mouse cage above the cage floor
-
Figure 5. Environmental set-up for sleep tracking
| Component | Product Information |
|---|---|
| PIR Sensor | Panasonic AMN32111 |
| 1K Ohm Resistor | 1 kΩ ±5% 1/4 W axial resistor |
| 10K Ohm Resistor | 10 kΩ ±5% 1/4 W axial resistor |
| Main PCB | 6-channel PIR main board |
| PIR Sensor PCB | Single PIR + LDR sensor board |
| Data Logger Shield | RTC MicroSD Data Logging Shield for Arduino Uno |
| LDR | Light-dependent resistor, 550 nm peak sensitivity |
| Arduino Board | Arduino Mega 2560 Rev 3 |
| RJ12 Connector | 6P4C Right-Angle Modular Jack |
| 2-Pin Header | 2.54 mm 2-pin socket header |
| 6-Pin Header | 2.54 mm 6-pin socket header |
| RJ12 Cable | 6P6C RJ12 Male-to-Male Cable |
My Contributions
[edit | edit source]
My work focused primarily on the hardware development, assembly, and implementation of the sleep tracking system. I soldered and assembled 18 PIR sensor boards and three main PCB boards, assembled the Micro-SD data logging shield, and connected and tested the components during system setup. I also helped with programming the Arduino to verify and monitor individual PIR sensor outputs duringtesting.
Furthermore, I contributed to the physical implementation of the system by helping develop ideas for sensor mounting and taking measurements used to design 3D-printed PIR sensor housings and the support beneath the water bottle. During testing, I helped troubleshoot hardware connections and refine the physical setup to support consistent operation during long-term behavioural monitoring.
My contribution was primarily on the hardware and physical implementation side of the project; the experimental analysis and final research conclusions were conducted as part of the broader thesis.
Research Outcome
[edit | edit source]The completed system was used to collect motion-based sleep-wake cycle data from multiple cages over six days. The associated thesis used these measurements to investigate the differences in sleep and activity patterns between CADM2 genotypes. The study reported differences in sleep-pattern adaptation between mouse genotypes and identified the system as a useful approach to further investigating the relationship between CADM2, sleep behaviour, and vulnerability to addiction disorders.

Research Team
[edit | edit source]This engineering work supported an undergraduate thesis project by Aisha Siddiqui in the Khokhar Lab at Western University, supervised by Dr. Jibran Khokhar, with hardware development supported by Hakan Kayir.
My contributions focused on the hardware assembly, testing, and physical implementation described above.
Open-Source Materials
[edit | edit source]The system was adapted from the open-source COMPASS framework for automated monitoring of transgenic mouse sleep and activity behaviour.
- Original framework
- Circuit boards: Main baord, PIR board
- Code: Arduino-based data logging
| Authors | Zainab Siddiqui |
|---|---|
| License | CC-BY-SA-4.0 |
| Cite as | Zainab Siddiqui (2026). "User:Zainab Siddiqui/Open-Source Sleep/Activity Tracking System". Appropedia. Retrieved October 2, 2026. |