Inspiration
neurover was inspired by Perrikaryal, a streamer who plays games with her mind using EEG headsets and other body sensors. We wanted to take that idea off the screen, so we built a real rover you drive with your brain instead of a controller.
What it does
neurover reads brain activity from a BrainBit Flex EEG headset and turns it into Forward, Left, Right and Stop commands for a micro:bit rover. Three boxes flicker on screen: 8.57 Hz for forward, 20 Hz for left and 7.5 Hz for right. Staring at a box makes your visual cortex pulse at that box's frequency (SSVEP). The app works out which box you're looking at, and the rover drives that way over Bluetooth. Look away at the rover and it stops. Clench your jaw or move and it stops instantly. A live dashboard shows the command being sent, each box's score against the threshold, electrode contact and the rover link.
How we built it
neurover is written in Python. pygame runs the app and dashboard, NumPy and SciPy handle the signal processing, pyneurosdk2 connects to the headset, and bleak talks to the rover over Bluetooth. We also rewrote the rover's firmware in MakeCode TypeScript. Every 0.1 s, the decoder takes the last 2 seconds of EEG and turns down the effect of blinks. It then uses canonical correlation analysis (CCA) to score how much each box's frequency stands out from nearby frequencies where nothing flickers. A command only changes when the same box wins several windows in a row. A 4.5-minute calibration copies real driving: look at the rover, follow an arrow to a box, then look back at the rover. It then replays that recording through every combination of window length, threshold and debounce, and picks the fastest setting that rarely sends a wrong command. The Bluetooth link runs in its own process, and the rover stops by itself if it hears nothing for half a second.
Challenges we ran into
The signal is weak, and our own brains got in the way. The alpha rhythm (10–12 Hz) gets stronger when you look away at the rover, so boxes at 10 and 12 Hz drove the rover by themselves. We measured which frequencies stay quiet at rest, dropped the back box, and moved the others to 7.5, 8.57 and 20 Hz. The original micro:bit code queued up seconds of commands, so the rover lagged far behind. Our firmware only acts when the command changes and answers a ping, which gives a round trip of about 60 ms. Turns overshot to about 180°, so turning got its own slower speed. Our first calibration was overfit, and we only noticed when we combined it with a second run.
Accomplishments that we're proud of
We drove a real rover with nothing but brain signals. When we replayed our calibrations, the right box won 83% of trials, against 33% chance. The rover started moving about 1.7 s after the driver looked at a box and stopped less than a second after they looked away. While they were looking at the rover, it drove by itself only 2% of the time. Blinks, muscle noise and dropped connections can't turn into drive commands.
What we learned
Brain signals are tiny and noisy. Choosing the right frequencies and electrode positions mattered more than a fancier algorithm. Your own brain rhythms can look exactly like the signal you're trying to decode. Making real-time Bluetooth fast and safe took more engineering than the decoding itself.
What's next for neurover
We want to cut the delay with shorter decision windows and more calibration data, and strengthen the signal by combining a second headset with the first. We also want to bring back reverse.
Built With
- brainbit
- numpy
- python
- scikit-learn