Table of Content
ToggleProject Overview
This case study presents the development of an advanced Pupilknowlogy system designed to measure Pupillary Unrest Index (PUI) and Pupillary Light Reflex (PLR) for the detection of fatigue and drug influence in subjects. The project integrated hardware and software components to create a comprehensive, portable solution for use in clinical, research, and law enforcement settings.
Tools Used
C#, .Net, Computer Vision, Embedded Linux, Component One, Altium
Hardware Development
A complex multi-board design was designed and successfully integrated advanced processing capabilities, high-speed imaging, and portable power management in a compact form factor, enabling the system to operate effectively in various field conditions while maintaining clinical-grade measurement accuracy.
Custom PCB Design
Size and Power Management Challenges
- Implemented high-density design within strict size constraints while managing significant power requirements
- Developed custom power delivery system to handle varied loads during processing-intensive operations
- Created thermal management solutions to dissipate heat from densely packed components
Multi-Board System Architecture
- SOM Integration Board
- Successfully integrated Phytec SOM with IMX8M processor (300+ pins)
- Designed complex power distribution network for high-performance processing
- Implemented proper impedance control for high-speed interfaces (USB 3.2, MIPI CSI2, SDIO)
- Top and Bottom Camera Boards
- Optimized layout for signal integrity in imaging subsystems
- Implemented low-noise design practices for sensor interfaces
- Created shielding solutions to minimize electromagnetic interference
- Infrared Illumination Board
- Designed controlled current delivery system for IR LEDs
- Implemented pulse-width modulation for adjustable illumination intensity
- Created optical isolation to prevent interference with camera sensors
- Battery Enclosure PCB
- Designed 2S battery management system with advanced protection features
- Implemented cell balancing for extended battery life
- Created power monitoring circuits for accurate charge status reporting
- RGB Indicator Board
- Designed status indication system with multi-color capabilities
- Implemented low-power illumination control
- Created user-feedback system integrated with main software
- Stimulus Box Vertical Board
- Designed precision light stimulus generation circuitry
- Implemented timing synchronization with image capture
- Created variable intensity control for PLR measurement protocols
Advanced Interconnect Solutions
- Repurposed USB-C 3.2 connections for custom inter-board communication
- Utilized USB 2.0 pins for UART interfaces
- Adapted USB 3.0 pins for high-speed data transfer
- Implemented dedicated synchronization line for precise timing
- Designed custom board-to-board connectors for reliable connection in portable device
High-Density Interconnect (HDI) Implementation
- Utilized micro vias and buried vias to achieve required connection density
- Implemented controlled impedance routing for high-speed interfaces
- Created layer stack-up optimized for signal integrity and EMI reduction
High-Speed Interfaces
- Implemented MIPI CSI-2 camera interface with proper impedance control
- Designed SDIO interface for WiFi module integration
- Created on-board image processing pathways for real-time pupil detection
Power Management System
- Designed complex battery management system for 2S lithium cell configuration
- Implemented protection circuits for overcurrent, overvoltage, and thermal conditions
- Created power sequencing logic for proper system startup and shutdown
- Optimized power delivery to minimize noise in sensitive analog circuits
Software Architecture
Embedded Linux System
- Developed custom Linux distribution optimized for Pupilknowlogy applications
- Created camera interface software to capture and process image feed at 25 FPS
- Implemented secure data transmission protocols to desktop application
- Designed command-line interface for system configuration and updates
- Established reliable WiFi and USB connectivity for flexible deployment
Desktop Application
- Created intuitive user interface with real-time camera feed display
- Implemented robust database integration for subject data management
- Developed user profile system supporting multiple recording sessions and configurations
- Designed calibration tools to optimize camera settings for different environments
- Integrated secure data storage with encryption for sensitive medical information
Pupilknowlogy Algorithms
PUI Measurement System
- Developed algorithms to detect pupil margins with sub-pixel accuracy
- Implemented adaptive thresholding to accommodate various iris pigmentations
- Created statistical outlier detection using sigma-based filtering to improve measurement reliability
- Established maximum and minimum diameter limits based on physiological parameters
- Designed frame quality assessment using sigma of pupil fit to determine data integrity
- Implemented data logging system capturing temporal changes in pupil size at 25 FPS
PLR Analysis System
- Created protocol for 3-5 short recording sessions with controlled light stimuli
- Developed algorithms to measure pupillary constriction velocity, amplitude, and latency
- Implemented comparison with standardized baselines for drug influence detection
- Designed statistical analysis tools to determine significance of observed deviations
Data Analysis and Reporting
Real-time Analysis
- Implemented algorithms for instantaneous pupil tracking and diameter measurement
- Created visualization tools showing pupil position within the eye and diameter fluctuations
- Developed data quality indicators to alert operators of potential measurement issues
Report Generation
- Designed comprehensive PDF report generation system
- Implemented visualization of pupil diameter as time-series graphs
- Created spatial mapping of pupil position throughout recording sessions
- Developed data integrity analysis with clear identification of signal loss or artifacts
- Generated statistical summaries comparing subject data to established norms
Validation and Results
Fatigue Detection
- Validated PUI measurements against established sleepiness scales
- Demonstrated significant correlation between increased PUI values and subject fatigue levels
- Established threshold values for alertness monitoring in safety-critical environments
Drug Influence Detection
- Validated PLR patterns against known pharmacological effects
- Established detection sensitivity and specificity for various substance categories
- Demonstrated reliability across diverse subject populations
- Created reference database of substance-specific pupillary response patterns
Conclusion
This project successfully integrated hardware and software components to create a comprehensive pupilknowlogy system capable of detecting both fatigue and drug influence. The system’s portable nature, coupled with its robust analytical capabilities, makes it suitable for deployment in various professional settings where monitoring alertness and substance influence is critical for safety and performance.