Emotiv EPOC BCI with Python on a Raspberry pi

  • José Salgado Patrón Universidad Surcolombiana, Neiva
  • Cristian Raúl Barrera Monje Universidad Surcolombiana, Neiva
Keywords: BCI, EEG, EPOC, Python, Raspberry Pi, support vector machine


The hybrid Brain-Computer Interface [BCI] system gives an insight on the development of useful interfaces for users with different backgrounds, from medical applications to video games, where standalone and wearable means accessibility for the user. Systems such as EPOC offers a simple solution for acquiring electroencephalography and electromyography signals with low price and fast setup, compared to high tech medical equipment. From the processing point of view, a computer always offers the main foundation for solving any issue, as the Raspberry Pi [RPi] does, which provides the sufficient computational power for a BCI to be implemented and an open source operating system such as Raspbian. Certainly a wireless communication is a must between the robot and the RPi, where an Xbee module gives a simple bidirectional connection. Python is the principal tool used in the project with multiple libraries for the processing of brain and muscular signals not only for the preparation of them but classification as well, from multithreading functions, feature extraction such as power spectral density and Hjorth parameters, and a support vector machine  classifiera.


Download data is not yet available.

Author Biographies

José Salgado Patrón, Universidad Surcolombiana, Neiva
Electronic Engineer; Master in Computing and Electronic Engineering; professor at the Universidad Surcolombiana (Neiva, Colombia): Electronic Engineering Program. His professional interest areas are: biomedical instrumentation, biomedical signal processing, robotics, and computational vision.
Cristian Raúl Barrera Monje, Universidad Surcolombiana, Neiva
Student of Electronic Engineering at the Universidad Surcolombiana (Neiva, Colombia). His professional interest areas are: biomedical signal processing [EEG], learning machine, embedded systems and brain computer interfaces.


Bao, F., Liu, X., Zhang, C. (2011). PyEEG: An Open Source Python Module for EEG / MEG Feature Extraction. Computational Intelligence and Neuroscience. 2001(Art. 406391). doi: 10.1155/2011/406391.

Emotiv (2014). Emotiv EPOC: Brain Computer Interface & Scientific contextual EEG [blog]. Retrieved from: https://emotiv.com/product-specs/Emotiv%20EPOC%20Specifications%202014.pdf

Goh, C., Hamadicharef, B., Henderson, G., & Ifeachor, E. (2005). Comparison of fractal dimension algorithms for the computation of EEG biomarkers for dementia. In 2nd International Conference on Computational Intelligence in Medicine and Healthcare (CIMED2005), (pp.464-471). Retrieved from: https://hal.inria.fr/inria-00442374

Grude, S., Freeland, M., Yang, C., & Ma, H. (2013). Controlling mobile Spykee robot using Emotiv neuro headset. In 2013 32nd Chinese Control Conference (CCC), (pp. 5927-5932). IEEE.

Guneysu, A., & Akin, H. (2013). An SSVEP based BCI to control a humanoid robot by using portable EEG device. In 2013 35th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), (pp. 6905-6908). IEEE. doi: 10.1109/EMBC.2013.6611145.

Joblib (2009). Joblib: running Python functions as pipeline jobs [blog]. Retrieved from: https://pythonhosted.org/joblib/generated/joblib.dump.html

Kaysa, W. A. & Widyotriatmo, A. (2013). Design of Brain-computer interface platform for semi real-time commanding electrical wheelchair simulator movement. In 2013 3rd International Conference on Instrumentation Control and Automation (ICA), (pp. 39-44). IEEE. doi: 10.1109/ICA.2013.6734043.

Lin, K., Chen, X., Huang, X., Ding, Q., & Gao, X. (2015). A Hybrid BCI speller based on the combination of EMG envelopes and SSVEP. Applied Informatics, 2(1). doi: 10.1186/s40535-014-0004-0

Liu, N., Chiang, C., & Chu, H. (2013). Recognizing the degree of human attention using EEG signals from mobile sensors. Sensors, 13(8). 10273-10286. doi: 10.3390/s130810273.

Oh, S. H., Lee, Y. R., & Kim, H. N. (2014). A novel EEG feature extraction method using Hjorth parameter. International Journal of Electronics and Electrical Engineering, 2(2), 106-110. doi: 10.12720/ijeee.2.2.106-110.

Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., ... & Vanderplas, J. (2011). Scikit-learn: Machine learning in Python. The Journal of Machine Learning Research, 12, 2825-2830.

Pololu Corporation (2014). Pololu maestro servo controller: user's guide [on line] Retrieved from: https://www.pololu.com/docs/pdf/0J40/maestro.pdf

Qt Company. (2016). Qt Designer Manual [blog]. Retrieved from: http://doc.qt.io/qt-4.8/designer-manual.html

Rechy-Ramirez, E. J., Hu, H., & McDonald-Maier, K. (2012). Head movements based control of an intelligent wheelchair in an indoor environment. In 2012 IEEE International Conference on Robotics and Biomimetics (ROBIO), (pp. 1464-1469). IEEE. doi: 10.1109/ROBIO.2012.6491175.

Scikit Learn (2014b). Standardize features by removing the mean and scaling to unit variance [blog]. Retrieved from: http://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.StandardScaler.html

Scikit Learn. (2014a). C-Support vector classification [blog]. Retrieved from: http://scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html

Sinyukov, D. A., Li, R., Otero, N. W., Gao, R., & Padir, T. (2014). Augmenting a voice and facial expression control of a robotic wheelchair with assistive navigation. In 2014 IEEE International Conference on
Systems, Man and Cybernetics (SMC), (pp. 1088-1094). IEEE. doi:10.1109/SMC.2014.6974059.

Tahmasebzadeh, A., Bahrani, M., & Setarehdan, S. K. (2013). Development of a robust method for an online P300 speller brain computer interface. In 2013 6th International IEEE/EMBS Conference on Neural Engineering (NER), (pp. 1070-1075). IEEE. doi: 10.1109/NER.2013.6696122.

The Python Software Foundation (2016a). 16.2. threading — Higher-level threading interface. In The Python Standard Library [blog]. Retrieved from: https://docs.python.org/2/library/threading.html

The Python Software Foundation (2016b). 16.6. multiprocessing — Process-based “threading” interface. In The Python Standard Library [blog]. Retrieved from: https://docs.python.org/2/library/multiprocessing.html

Upton, L. (2015). Benchmarking raspberry Pi 2 [blog]. Retrieved from: https://www.raspberrypi.org/blog/benchmarking-raspberry-pi-2/

Van Der Walt, S., Colbert, S. C., & Varoquaux, G. (2011). The NumPy array: a structure for efficient numerical computation. Computing in Science & Engineering, 13(2), 22-30. doi:10.1109/MCSE.2011.37.

Wang, Q., & Sourina, O. (2013). Real-time mental arithmetic task recognition from EEG signals. IEEE Transactions on Neural Systems and Rehabilitation Engineering 21(2), 225-232. doi: 10.1109/TNSRE.2012.2236576.

Yao, L., Meng, J., Zhang, D., Sheng, X., & Zhu, X. (2014). Combining motor imagery with selective sensation toward a hybrid-modality BCI. IEEE Transactions on Biomedical Engineering, 61(8), 2304-2312. doi: 10.1109/TBME.2013.2287245.
Original Research