Mind Patterning

By Rosemary Hattersley. Posted

Michael Darby, aka 314reactor, has been having ideas for electronics projects for as long as he can remember. “As a kid I’d try to make things (with poor results) by badly soldering up circuits. I was just too young to really make it work,” he says.

A lifelong video games and technology fan, Michael picked up his first Raspberry Pi in 2013 and was excited to play around with it and see what he could do with it. After a few false starts, he realised his inventiveness could finally be given free rein. His first big project was a Windows 98 Wrist Watch. Hop forward in time three years and he’s lost count of the number of Raspberry Pi boards he possesses.

Since then he’s made several Raspberry Pi projects, including Spider-Man specs – hence his profile pic. His Mind Patterning headset is intended “to kick off a much larger project using mind-reading capabilities.”

The project reads brainwave data with a MUSE headband and uses TensorFlow machine learning to train a model on the data to recognise a relaxed or non-relaxed mind state.

Training the mind-patterning headband to discern whether Mike’s happy or unhappy (will it still work when he finally becomes a robot, though?)

Mind over matter

Michael used a Raspberry Pi 4 for the Mind Patterning project “because it allows lots of applications to run simultaneously.” The Bluetooth setup required for Raspberry Pi to import data from the headset turned out to be one of the trickier aspects of the build since the latter is really designed to work with iOS or Android.

“Using Raspberry Pi was essential for the TensorFlow tech required for training a neural network on the recorded EEG data,” he explains. “The code is where the design and development was [see his GitHub repo]. I used some libraries from elsewhere in order to get the EEG data logged and accessed. So many people use Raspberry Pi and it ensures that there is always support and information out there to learn from and assist,” he notes.

Raspberry Pi 4’s flexibility and processing power meant Michael needed little else to realise his project.“It has so much hardware on board, including the power for the machine learning, which is where the multicore and lots of RAM really helped,” he says.

One of Mike’s other projects recreates the EDITH glasses from Spider-Man: Far From Home

Trial and error

“Initial testing of the model training and inference was done with the PipelineRunnerTest.py file,” explains Michael. “This creates artificial sets of training and neural network testing data. It calls CSV preprocessing (which loads and trains the model), then runs that against the test data.”

This approach allowed him to see quickly how well the model would work if given real-world data, and to make adjustments. “I was trying to get the raw EEG sensor data at first, but then realised I needed to get the data processed into alpha/beta/theta wave data before passing to the neural net.”

Michael hopes to develop the project to read more mind states, possibly even emotions, and sees future potential for the mind-patterning idea in simulating human responses via a neural network.

“With more tweaking and more data, it could be used to interact with the hardware without having to manually press buttons, but I’m sure Elon Musk’s Neuralink is going to be far, far more effective than anything I could ever do,” he says.

From The MagPi store