Control robots with your mind through high-level intent, not low-level commands.
Aura is a Brain-Computer Interface (BCI) system that enables intuitive brain-controlled robotic manipulation through EEG signal processing. Unlike traditional BCI approaches that require users to mentally control every axis of movement (exhausting and cognitively demanding), Aura's architecture focuses on high-level intent: simply select what you want and where you want it—the system handles the rest.
Built from the ground up by undergraduate CS students at De Anza College, University of Waterloo, and UC San Diego.
Most robotics BCI projects require users to mentally control individual robotic components (X, Y, Z translation). While simple to implement, this approach leads to:
- High cognitive fatigue
- Slow operation
- Poor user experience
Our core innovation: Instead of controlling individual axes, users make simple high-level selections:
- "I want to move object A to location B"
The robot figures out the rest—drastically reducing cognitive load and making brain-controlled manipulation practical.
Aura represents the "brain" of robotic operation, translating human neural signals into precise robotic actions:
- EEG Headset (OpenBCI Cyton) captures brain activity at 125Hz
- Dual BCI Paradigms process two types of neural signals:
- P300 Speller: Select target objects (82.8% accuracy)
- Motor Imagery: Execute grasp/release commands (F1-score ~0.61)
- Computer Vision (ArUco markers + planar homography) localizes objects in 3D space
- Inverse Kinematics translates object positions to joint angles
- 3-Axis Robotic Arm executes the physical manipulation
- Real-time EEG Processing: 125Hz sampling from OpenBCI Cyton headset
- Dual BCI Paradigms:
- Motor Imagery (MI) for grasp/release commands
- P300 speller for object selection
- Multiprocessing Architecture: Separate processes for GUI, EEG acquisition, and ML inference
- Computer Vision Integration: ArUco marker tracking with planar homography
- Robotic Control: 3-axis arm with inverse kinematics
| Component | Metric | Value |
|---|---|---|
| P300 Detection | Accuracy (LOSO) | 82.8% |
| P300 Detection | Confidence Threshold | 0.55-0.60 |
| MI Classification | F1-Score | ~0.61 |
| MI Classification | Confidence Threshold | 0.1 |
| EEG Sampling | Rate | 125 Hz |
| Epoch Length | MI | 2.5s (50% overlap) |
| Epoch Length | P300 | 0.6s (post-stimulus) |
- OpenBCI Cyton Board (8 channels, expandable to 16 with Daisy module)
- EEG Electrodes configured for:
- Motor Imagery: C3, C4, Cz (motor cortex)
- P300: Fz, Cz, Pz, P3, P4, P7, P8, Oz (visual processing)
- Sampling Rate: 125Hz
- 3-axis servo-controlled arm
- Arduino Uno controller
- Serial communication (configurable port, default 9600 baud)
- USB camera (640x480 or higher)
- ArUco markers (IDs 0-5 for workspace + object tagging)
- Well-lit environment for marker detection
The system uses app/eeg/acquire_eeg.py to interface with the OpenBCI Cyton headset via the pyOpenBCI library. The acquisition runs in a separate process to ensure real-time performance:
- Auto-detection: Automatically finds OpenBCI device on available serial ports
- Channel Configuration: Reads 7-8 channels at 125Hz
- Epoch Generation: Creates 2.5-second overlapping windows (50% overlap) for signal processing
- Queue-based Communication: Sends raw EEG data to ML processing pipelines
Key File: app/eeg/acquire_eeg.py
Motor Imagery detects when the user imagines moving their hand to execute grasp or release commands—a challenging BCI problem that requires distinguishing subtle differences in brain activity.
We use a classic, robust BCI pipeline optimized for motor imagery:
- Filter-Bank Common Spatial Patterns (FBCSP): Feature extractor that splits EEG into 8-30Hz sub-bands and maximizes variance between grasp/release
- SelectKBest: Dimension reduction to select the most discriminative features
- Linear Discriminant Analysis (LDA): Final classifier for binary grasp/release decisions
Performance: F1-score ≈ 0.61 in Leave-One-Subject-Out (LOSO) cross-validation. While this represents solid performance for a challenging classification problem, we're actively working to improve accuracy for more reliable everyday use.
Key Files:
- Model:
models/mi_v3/README.md - Runtime:
app/models_runtime/mi_runtime.py - Manager:
app/ml_manager.py(MIManager class)
Raw EEG (7 channels) → Bandpass 8-30Hz → FBCSP Feature Extraction
→ SelectKBest → LDA Classifier → Confidence Score (threshold 0.1)
→ Grasp/Release Command
P300 detects the brain's natural response to visual stimuli—allowing users to select objects by simply focusing their attention. This is a simpler and more reliable classification problem than Motor Imagery.
The GUI presents a grid of rectangles that flash in sequence at 0.05s intervals. When the user focuses on their target, their brain automatically generates a P300 response (~300ms after the target flashes)—no special training required!
- Epoch Extraction: 0.6s windows aligned to stimulus onset
- Feature Engineering:
- Temporal features (mean, std, peak amplitude)
- Frequency domain (FFT power in alpha/beta bands)
- Classification: RandomForest classifier
- Confidence Thresholding: 0.55-0.60 for reliable detection
Performance: 82.8% test accuracy (LOSO cross-validation)—solid performance for real-time object selection!
Key Files:
- Model:
models/p300_v1/README.md - Runtime:
app/models_runtime/p300_runtime.py - Manager:
app/ml_manager.py(P300Manager class)
Raw EEG (8 channels) → Stimulus Timestamp → 0.6s Epoch Extraction
→ Feature Engineering → RandomForest → Confidence Score (threshold 0.55-0.60)
→ Selected Object
The system is built on a robust Python multiprocessing architecture designed to keep everything responsive and low-latency.
We run four separate processes in parallel:
- GUI Process (Tkinter): User interface and application logic
- OpenBCI Acquisition Process: Raw EEG data streaming at 125Hz
- MI Processor: Heavy-duty Motor Imagery ML calculations
- P300 Processor: P300 event-related potential ML calculations
Why multiprocessing? By separating the GUI, acquisition, and ML inference into independent processes, we ensure:
- Real-time responsiveness (no UI blocking during ML calculations)
- Parallel processing power (all cores working simultaneously)
- Modular design (each component can be developed/tested independently)
Communication: Processes exchange data via multiprocessing.Queue for thread-safe, decoupled producer/consumer patterns.
Key File: app/main.py (BCIMultiprocessingManager orchestrates all processes and queues)
Now for the physical side: a low-cost, custom-designed 3-axis robotic arm built specifically for desktop robotics research.
ArUco markers are specially designed QR codes that computers can easily detect and localize in camera images. Here's our clever approach:
- Workspace Calibration: Place 4 ArUco markers at known corner positions on the workspace
- Planar Homography: Use these corner markers to transform pixel coordinates → real-world (X, Y, Z) coordinates
- Object Tracking: Each graspable object has its own unique ArUco marker for precise localization
- Deposit Zones: Specialized zones are also marked for accurate drop-off targeting
The result? The system can accurately track objects and their destinations in 3D space—all from a simple overhead camera!
Once we know what to pick and where it needs to go, we use inverse kinematics to calculate the individual joint angles:
- IKPy Library: Solves joint angles for any target (x, y, z) position
- 3-Axis Control: Base rotation, shoulder, and elbow servos
- Serial Commands: Arduino Uno receives angle commands via USB and drives the servos
P300 Selection → ArUco Marker Detection → Planar Homography Transform
→ Inverse Kinematics → Servo Commands → Physical Movement
Lighting Note: Ensure good lighting without harsh shadows—shadows can interfere with marker detection!
Key Files:
- Arm Control:
app/arm.py - Marker Tracking:
app/robot_arm/src/markerTracking/ - Robot Control:
app/robot_arm/src/robotControl/
# Clone the repository
git clone <repository-url>
cd aura
# Install dependencies (Python 3.11+)
uv pip install -e .-
OpenBCI Headset:
- Place electrodes according to 10-20 system
- MI channels: C3, C4, Cz, FC3, FC4, CP3, CP4
- P300 channels: Fz, Cz, Pz, P3, P4, P7, P8, Oz
- Connect via USB dongle
-
Robotic Arm:
- Upload Arduino sketch from
app/robot_arm/Arduino Uno/ - Connect via USB serial
- Configure port in
app/config.py
- Upload Arduino sketch from
-
Camera:
- Position camera above workspace
- Print ArUco markers (IDs 0-5)
- Ensure good lighting for marker detection
# Start the BCI GUI
python app/main.pyEdit app/config.py to customize:
- Serial ports for OpenBCI and Arduino
- Confidence thresholds for MI/P300
- Camera resolution and settings
- Model paths
- Lighting: Ensure plentiful light on markers; harsh shadows interfere with detection
- Marker Visibility: Object markers must face the camera (both QR codes visible)
- P300 Focus: Concentrate on target rectangle during flashing sequence
- MI Calibration: May require per-user retraining for better accuracy
aura/
├── app/ # Main application
│ ├── main.py # GUI and multiprocessing manager
│ ├── ml_manager.py # P300/MI manager classes
│ ├── eeg/ # EEG acquisition
│ ├── models_runtime/ # Runtime inference code
│ └── robot_arm/ # Arduino, CV, robot control
├── models/ # Training code and saved models
│ ├── mi_v3/ # Motor Imagery (FBCSP+LDA)
│ ├── p300_v1/ # P300 (RandomForest)
│ └── other models
├── data/ # Training datasets
└── tests/ # Integration tests
# Run all tests
python run_tests.py
# Run specific test suites
pytest tests/test_p300_integration.py
pytest tests/test_mi_integration.pySee individual model READMEs:
- Motor Imagery:
models/mi_v3/README.md - P300:
models/p300_v1/README.md
- MI Model Accuracy: Current F1-score (~0.61) is solid but needs improvement for reliable everyday use
- App-Robot Interface: Communication protocol between BCI application and Arduino could be simplified
- Shadow Interference: ArUco detection can fail with partial shadows—requires good, even lighting
- P300 Latency: 0.05s stimulus intervals may be too fast for some users
-
Enhanced MI Performance:
- Per-user calibration and transfer learning
- Deep learning approaches (EEGNet, ShallowConvNet)
- Additional feature engineering
-
System Reliability:
- Simplified robot communication protocol
- Improved lighting robustness for marker detection
- Adjustable P300 stimulus timing
- De Anza College, AS Math for Transfer
- President, De Anza Human Computer Interaction
- Role: Aura Project Lead and Initiator, Application and pipeline architecture, ML pipeline design & integration, MI model development, EEG acquisition, Data collection, Testing, Documentation
- University of Waterloo, BASc Biomedical Engineering (Co-op)
- External member, De Anza Human Computer Interaction
- Role: Aura Project Initiator, P300 model development, Pipeline bug fixing, ML
- De Anza College, AS Computer Science for Transfer
- Member, De Anza Human Computer Interaction
- Role: Robotic arm & computer vision hardware/software, arm control integration, testing and fine-tuning
- UC San Diego, BS Computer Science
- External Member, De Anza Human Computer Interaction
- Role: OpenBCI Cyton headset & Daisy module renting, Initial project discussions
This project is licensed under the MIT License.
