Categories
Art Hardware Science Software Technology

12 years of DIY-EEG

Back around 2010 we first explored open-hardware EEG for some fun, creative uses of real-time EEG analyses and control. At the time, there was not much around in terms of affordable EEG hardware or even real-time EEG analyses software. At the Donders Center for Cognitive Neuroscience in Nijmegen (NL), Robert was setting up the first realtime MEG and EEG experiments with FieldTrip, while I was in the middle of doing my PhD there, and had begun to get involved in art-science with a group of artists and curators which turned into the OuUnPo collective. At the time, one open-hardware EEG project, called OpenEEG developed hardware schematics for a cheap, 4 channel EEG system. Not able yet to do any hardware development myself, we found out that one could had the board populated and soldered by a Bulgarian company called Olimex. Once it arrived, we got Bram Daams from the technical support department excited as well, and together we added the neccecary serial interface board, a bluetooth module, and shopped around for a casing, touchproof EEG connectors, and battery holders (LiPo batteries were not such a widespread thing yet). Some days of carving and soldering later, we had it all put neatly in what we thought was a pretty neat little box, which I named the OuUnPod. I was able to dig up some photos of its construction:

Interfacing with the board wasn’t trivial. However, thanks to even more serendipity, during those months Robert employed a software engineer to work on some of the real-time interfacing with the lab’s EEG and MEG systems, to connect their data acquisition with his real-time analysis pipeline. Diverting the engineers’ time to our “pet project” for a day or two, we soon had the binaries that allowed us to stream the EEG data to the FieldTrip’s real-time buffer. That made us good to go! I then first build what I thought was a pretty fancy data representation with some 3D spectral plots using MATLAB, and FieldTrip (a MATLAB toolbox) for the real-time analysis.

One of our first EEG visualizations using MATLAB

Later, together with Bram Daams, we made a relay (using an arduino if I remember correctly) so that we could turn a desk light on and off depending on the alpha power. Only later did I realize that this was in fact the same idea as demonstrated in the first televised brain-computer-interface. Edmond Dewan used alpha to control a desk-lamp, creating brain communication with morse-code. He even created sophisiticated error-correction using a LINC computer, and got very impressive rates, which he published in Nature, back in 1967! For some reason, Dewan’s work is not cited as much as it should be – he seemed to have been a brilliant and creative mind.

Edmond Dewan, by the way, is the same person who showed up at Alvin Lucier’s doorstep with the idea of making music with EEG (himself a musician), after being turned down by several other musicians in Boston. And yes, this resulted in the first artistic performance of brain wave music, “Music for Solo Performer” by Alvin Lucier (1965). It’s good to remember that behind many succesful innovative artists, stand creative scientists and engineers who make the work possible.

The active life of the OuUnPoD was short-lived. I used it primarily for some didactic demonstrations, e.g. by explaining neuroscience to primary school children at some schools around Nijmegen, together with other PhD students. However, it did get things rolling. It was the first time that Robert and I started working together on real-time EEG, and he became a recurrent (and now constant) partner in many of our future artistic projects. When years later, in 2015, I got my hands on an OpenBCI board – a much higher quality, smaller and wireless open-source EEG device – he again added support for the FieldTrip buffer, and I started doing brain wave music performances with Per and Jean-Louis, which in turn resulted in our 1+1=3 performance collective.

The same year, Robert came over to my place in Stockholm, where I was now doing a postdoc and he was a visiting professor, and we discussed the structure the MATLAB codebase, and the potential for a real open-source resource for artistic development of real-time EEG analysis. In one long weekend, we (read: Robert) ported the code from MATLAB to Python, and we created the beginning what would develop into the current EEGsynth repository. You can read a long post summarizing that formative year here.

Early prototype using a Raspberry Pi, made possible by porting from MATLAB to Python

Now, step forward another half a decade to 2022, and we find ourselves in the midst of a flurry of developments. As you already know from this blog, we haven’t been silent with regard to our artistic and software development. Per especially has been pushing the envelope in EEG-based art in exciting new directions. Over the years we’ve (read: he) received many grants for artistic development, and since 2022, the I am part of a French ANR grant to develop a Brain Body Digital Music Instrument (BBDMI) within a consortium headed by MSH Paris Nord, with Robert as scientific advisor.

Per using EEG in his art performances, using different types of EEG electrodes

Regarding hardware, the last decade has seen the field move from a couple of hackable, open-hardware EEG devices, to a large market of small, light, wireless, consumer EEG devices. Many of these never really piqued our interest, as they were often too closed up – both physically and with regard to software – and were often are integrated in headsets with electrode configurations that did not conform to our scientific standards. Lately, however, several serieus EEG companies have joined the fray, and have introduced devices that offer both high quality and versatility. I’ve been excited to be able to work with the Mentalab Explore. Both Robert and I have also recently acquired the latest g.Tec Unicorn. In contrast to the less serieus consumer EEG systems, these systems provide both dry (conductive polymere) and gel-based (AgAgCl sintered ring electrodes) or hybrid (conductive polymere with the option of adding gel) electrodes in a way that is much more versatile and scientifically useful, i.e. using nylon (Unicorn) or Neoprene (Mentalab) caps. The Mentalab Explore provides gel-based electrodes as well as adaptors for their dry electrode, while g.Tec provides hybrid electrodes for their Unicorn system.

Using the Mentalab Explore for the BBDMI project at the ambisonic lab MSH Paris Nord

For us, as scientist-artists using real-time EEG, these systems are a dream come true. They are reasonably priced, and provide data quality that approuches, or is similar, to what we are used to in the lab. While generally limited to 8 electrodes, this is sufficient in most user-cases we have in mind. There was only one thing that bothered us: the requirement to use the electrodes and attachment systems (caps) supplied with the system. This is a shift in the market that has been going on for quite a while. In the lab, we used to buy amplifiers, acquisition systems, electrodes and caps separately, even from separate manufacturers, so one could pick and match according to your requirements and budget. Nowadays, especially with increasingly miniaturized EEG systems, companies provide whole systems, with sometimes pre-wired electrodes or custom connectors. This allows for optimalization of the form factor and hardware matching, but for people like us, it also limits our ability to explore different the user-cases and configurations. Luckily, we have had great interactions with the people at Mentlab and g.Tec, who support our efforts and understand our goals.

Case in point: Robert has just finished with his customization of the g.Tec Unicorn “naked” (the more DIY version) that now includes a common IDC connector housed in a custom 3D printed case. Also shown are IDC connectors to the original electrode cables and standard ring electrodes. He has even developed his own sponge-electrode cap that he can now use with the Unicorn! You can read more about this in his series of blog posts where he explains his process in much more detail:

I have just received extra connectors and electrode cables from Mentalab, and will start doing a similar customization with their Explore system (although I won’t need to make another case). This is the golden age of portable EEG, with serieus EEG companies having business models that can include people like us, who want to push the boundaries of their use.

Leave a Reply

Your email address will not be published. Required fields are marked *