Bluetooth based sensor networks for wireless EEG monitoring Tamara Jakovljevic1 , Tomaz Javornik2, Gregor Papa3 1Jožef Stefan International Postgraduate School, Jamova cesta 39, 1000 Ljubljana 2Jožef Stefan Institute, Jamova cesta 39, 1000 Ljubljana E-pošta: tamara.jakovljevic@hotmail.com Abstract—Wireless sensor networking has a crucial role to play in the progressive healthcare industry – the health monitoring systems in particular can gain a lot from this type of technology. The focus of this paper is to discuss the innovative wireless sensor network technology applied to electroencephalogram (EEG) devices alongside the paradigm used for mobile sensor networks in healthcare monitoring. Another focus of this paper is to present the technological challenges and benefits of the application of wireless EEG devices. The foundation of this method is based on the use of EEG sensors that are both miniaturized and wireless. As a result, we are able to perform ambulatory EEG recordings, which opens the door to real-time seizure detection during everyday activities. This in turn leads to a completely new stage in both medicine and research systems in general. 1! Introduction Wireless sensor networks are a technology that is gaining a lot of attention lately. The broad spectrum of these networks of small devices equipped with sensors, microprocessor and wireless communication interfaces is already finding use in military applications, environmental monitoring as well as healthcare [1]. One of the main focuses in this field is the introduction of smart sensor nodes. These small, low-cost and low-power devices are the product of MEMS (micro-electrical-mechanical systems) technology, combined with electric components and wireless communication. They are capable of performing various tasks related to sensoring, data processing and wireless communication [2]. When put together, these devices can make up a well-developed platform that enables many uses in terms of security systems, health monitoring, detection of aerial and hydro chemical agents etc. Medical monitoring as well as data access – are the benefits of the wireless sensor network. With it, one can determine any emergency conditions of patients. All one has to apply transducers embedded in clothing [3] or a network of body sensors [4]. Electroencephalography (EEG) is a very precise and insightful method to measure brain activity and function when exposed to certain factors. And since it is non­invasive, it is used today to diagnose and treat certain clinical disorders which can cause and present themselves as abnormalities in EEG readings. The most basic examples include epilepsy and encephalopathy, but it can be used to diagnose other neurological diseases [5]. The communication in sensor networks can be applied using various technologies such as infrared, UWB, Bluetooth, WiFi or even any legacy short range RF technology. 2! Bluetooth based sensor network Bluetooth found quite the application in mobile devices such as mobile phones, laptops, cameras PDAs etc. So, the original idea to remove the need for cables was resolved with the introduction of low-cost, short-range wireless technology that not only has a small footprint but also minimal power consumption, making it perfect for mobile devices. The concept has since spread and developed from point-to-point to becoming a network technology. Sensor network related Bluetooth operates in the 2.4 GHz frequency band and uses frequency hopping spread spectrum technique. There are 79 channels, each 1MHz wide, available for hopping [6]. Due to the low energy consumption and ease of use Bluetooth Low Energy (BLE) is a communication technology developed for low power consumption and low cost applications. The BLE technology is used in various devices, ranging from health care, fitness, home automation, toys, transportation and industry. Because of its low power consumption design, it is especially suitable for coin cell battery communication devices like wireless sensors [7]. In order to be able to communicate with other devices, a Bluetooth device has to be member of a piconet. A piconet represents a combination of 8 devices that hop together on the same frequency. Out of those 8 connected devices, one is the master device, whereas the remaining 7 are so-called slave devices. To establish a piconet, the device has to discover other Bluetooth devices in range using the Inquiry option (on other devices performing at the same time). Once they've found one another, the Inquiry option makes sure that both devices are on the same frequency at the same time. Once it comes to that, the Bluetooth address and the clock of the master device are exchanged in order to establish a working connection. If it happens that more than 7 devices try to communicate with each other, there is one of the ways to make this happen. The first option relies on the so-called Park mode of the device (disassociates from the piconet, but still maintains timing synchronization with it). Sniff, Hold and Park – these are the 3 low-power modes defined by Bluetooth. The second option is called Scatternet – a network of several piconets, where devices can connect to multiple piconets [8]. These devices can either be slaves in all piconets or master in one and slave in others [9]. Data from distant nodes cannot be transferred using a direct connection, the basis of multi-hop communication mechanism, according to [7] there is ability of each node to temporary assume the master role and to acquire the data from not already processed nodes, and relay acquired data to its master node along with its sensor data. Fig. 1. Scatternet The main aim of Bluetooth is the wireless communication between different devices that leads unification and harmony. 3! EEG signal transmission EEG was developed in 1875 and marks the electric activity of various parts of the brain with the use of electrodes placed on the head. In addition, discoveries were made for measuring the magnetic field of the heart and brain, also known as magnetocardiography (MCG) and magnetoencephalography (MEG). 3.1! Mechanism EEG is based on electrophysiological monitoring of electrical activity of the brain. It is graphic display of a difference in voltages from two sites of brain function recorded over time. The brain’s electrical charge is maintained by billions of neurons. The synaptic potentials are the most important source of the extracellular current flow that produces potentials in the EEG. Most routine EEGs recorded at the surface of the scalp represent pooled electrical activity generated by large numbers of neurons [10]. 3.2! Measurements Measurements are conducted by setting up a system of electrodes on the skin surface of the head with previous preparations by adding electrode gel that is used for acceleration of electrode contact with the skin. The distance between the electrodes is very important because it directly influences the sensitivity of the measurement – closer electrodes provide more accurate results [11]. 3.3! Information process Electroencephalography is the simple method of recording and measuring electrical activity of the brain. The analysis of EEG signal plays very important parts for detecting and predicting various brain diseases. The EEG signals are first amplified, filtered and then converted to digital output. This will be used by digital system to record the information. After the signal is recorded, next phase of measurement is to differentiate the signals by using mathematical models that classifies the signals from different parts of the brain and to use that data for a specific research. 4! WSN AND EEG MONITORING In order to monitor both the physical and physiological condition of patients, one can find various sensors, upgraded with medical equipment, installed at homes, in clinics and hospitals [12,13,14]. Previous user interfaces were isolated from these medical sensors. However, with the introduction of wireless short-range connections (such as Bluetooth and Zigbee) to close-vicinity PDAs, Smartphones or PCs, these obstacles have been overcome. The embedded platform that present technology offers combines data processing, storing, sensing and computing into one integrated unit. According to IEEE, Wireless personal area networks (WPANs) are used to convey information over short distances among a private, intimate group of participant devices. IEEE 802.15.1 also defines a Bluetooth as used WPAN technology. While many sensors connect to controllers and processing stations directly (e.g., using local area networks), an increasing number of sensors communicate the collected data wirelessly to a centralized processing station. Therefore, a wireless sensor has not only a sensing component, but also on-board processing, communication, and storage capabilities. When many sensors cooperatively monitor large physical environments, they form a wireless sensor network (WSN) [15]. The term Wireless Body Sensor Network (WBSN) it is also common in use. WBSN can be defined as a self-directed, self-sufficient and self-governing i.e. autonomous system which is used to monitor the daily life activities of a person [16] [17]. The EEG monitoring wireless system is comprised of multiple brain electrodes that have the capability to conduct and carry electrical signals to and from the brain. 4.1! Case Study Mbrain Train is a Belgrade-based start-up company which developed SMARTING -a small, simple and mobile EEG device. The appeal of this EEG device is found in the real-time brain activity monitoring and high-quality recordings in real life conditions. SMARTING offers superior data quality and high time-precision, no matter if paired with a smartphone or PC. SMARTING can be used for cognitive group studies because it supports synchronization with other sensors and simultaneous multi-amplifier streaming via labstreaming layer. The advantages of this device are: Lighter than 60g; Sampling 250-500Hz; Recording cap have 24ch; Bluetooth range 10m; Up to 5 hours recordings. We analyze two studies in which the SMARTING system was used: 1. EEG Recording and Online Signal Processing on Android: A Multiapp Framework for Brain-Computer Interfaces on Smartphone [18]. 2. Cortical Sensitivity to Guitar Note Patterns: EEG Entrainment to Repetition and Key [19]. 1)! Android-based processing In the first one, authors wanted to present a fully smartphone-operated, modular closed-loop Brain Computer Interface (BCI) system that can be combined with different EEG amplifiers and can easily implement other paradigms. The combination of unobtrusive EEG sensors [20], wireless EEG amplifiers, and smartphone-based signal acquisition and stimulus presentations (which we call transparent EEG [21]) opens up a plethora of possibilities for research, diagnostics, and therapy. The focus on smartphone-operated wearable devices for healthcare [22] allows for home-based applications with a high usability [23]. In previous studies, they have demonstrated the feasibility of Android smartphone-based EEG recordings [24, 25] as well as stimulus presentation on the phone or on a tablet [26]. However, while the signal quality achieved on handheld devices may be comparable to previous desktop computer-recorded EEG signals, all signal processing and classification routines were applied offline on desktop computers, after signal acquisition was concluded. More specifically, the SMARTING Android application was used for EEG acquisition and storage [27]. The Smarting Android application receives EEG data via Bluetooth from a small, wireless head-mounted 24­channel EEG amplifier and streams signals continuously over the local network via the Labstreaming Layer (LSL) [28]. There is an option to correct the transmission delays on the receiving device with the help of the time-stamped EEG samples on the amplifier before they are sent via Bluetooth. 2)! Cortical sensitivity to guitar The second research focused on demonstrating the brain's ability to process a series of repeated complex acoustic patterns to showcase the cause for the appreciation of music. The way the study was conducted by using a series of guitar notes presented with a musical pattern or without a pattern, during which the cortical responses were measured. While using a 24-electrode Bluetooth mobile EEG system (Smarting mBrainTrain), the ERP (Event-related potential) responses of 13 healthy non-musicians to individual notes were measured. They have used the SMARTING Streamer (the software interface for mBrainTrain's Smarting EEG amplifier) to collect data. The amplifier is connected to the computer with Bluetooth manager BlueSoleil. The primary role of the BlueSoleil is found in the ability to enable the wireless integration of multiple Bluetooth devices such as: mobile phones, headsets, keyboards and mouses – all on one computer screen, and it can tranfer files from and to mobile phones. 5! CONCLUSION The multitude of potential applications for wireless sensor networks is endless and make for interesting research. Bluetooth is a possible choice for data communication in sensor networks. The advantages of Bluetooth can be found in good throughput, low-power, low-cost, standardized specification and hardware availability. When it comes to disadvantage, one has to note slow connection establishment and lack of scatternet support as the more essential ones. Implemented bluetooth platform presents a good environment for further research in field od EEG monitoring. SMARTING team choose Bluetooth technologie for EEG especially because it can support 24 channels -3 bytes each, which is total 83bytes of data for every 2 ms (which is 41.5kbyte per second, or 332 kbit per sec). This is roughly the upper limit of what it can go through the Bluetooth Serial Port Profile (SPP) protocol. They use Bluetooth because it needs less power than wifi, so the battery is slower. Also, the Bluetooth SPP protocol is more "real time" because there is less delay compared to Wifi. Some manufacturers also use wireless profiles ­a radio connection that is not Bluetooth or WiFi, but the problem is that they must then have one more device loaded onto the computer, and this is not standard communication. In that case, they can not communicate with a mobile phone. Since most of the devices work on BLE, and SPP has been much reduced, so it cannot be close to 2 Mbit/sec, but it's about 350kbit. It's possible that it will change in some future bluetooth profiles. With the existing design, it is possible to integrate Bluetooth wireless technology into a deep pool of new products, hence following the trend of connected information appliances. In addition, the introduction of Bluetooth technology has a double benefit – it reduces expenses for wiring and transforms industrial into smart environment. There is some research that presents the solution for replacing cables with a wireless interface in bridge-sensor measurement applications. It is also mentioned that medical applications are more oriented towards Bluetooth tehnologies. The main idea of that research was to investigate the possibility of implementing a wireless replacement for a sensor-bridge cable. They were able to prove the concept of an inverted topology. The concept was tested using several receiver/transmitter pairs, and the results were always the same. This confirmed the idea of an inverted topology and validated it for mass production. That solution is currently integrated within a serial production for medical application [29]. Smartphones used as medical devices [30] and as scientific instruments [31, 32] will play a crucial role in the future, the main reason for this being the high usability and the large number of integrated sensors. And even though EEG is still not quite there, it's just a matter of time before it becomes completely mobile and wireless. EEG hardware is available for low cost and, in the near future, it may be sufficiently user-friendly and small enough to be taken out of the lab and into real-life situations. In addition, wearable EEG sensor technology seems within reach. In the future, a stable online EEG solution, requiring little more hardware than already available may support several use cases in the growing field of healthcare. References [1] S. Krco: Bluetooth Based Wireless Sensor Networks – Implementation Issues and Solutions, Applied Research Lab, Ericsson Ireland Invited paper [2] M. Bandyapadhyay: Health monitoring system in Wireless sensor networks, IT, MCKV Institute of Engineering/ MAKAUT, India [3] G. Cho, S.K. Yoo1: Wearable ECG Monitoring System Using Conductive Fabrics and Active Electrodes, Proceedings of the 13th International Conference on Human-Computer Interaction, 2009, Berlin, Heidelberg [4] A. Darwish , A. E. Hassanien: Wearable and Implantable Wireless Sensor Network Solutions for Healthcare Monitoring, 2012, Sensors 12: 12375-12376. [5] J. Chiang, K. Rabab: Energy-Efficient Data Reduction Techniques for Wireless Seizure Detection Systems, Ward Department of Electrical and Computer Engineering, The University of British Columbia, 2332 Main Mall, Vancouver, BC V6T 1Z4, Canada [6] Bluetooth specification, http://www.bluetooth.com [7] B. Skocir, G. Papa, A. Biasizzo: Multi-hop communication in Bluetooth Low Energy ad-hoc wireless sensor network, Informacije MIDEM, 2018, Vol. 48, No. 2, pages: 85-95 [8] T. Salonidis, P. Bhagwat, L. Tassiulas, R. LaMaire: Distributed Topology Construction of Bluetooth Personal Area Networks [9] N. Johansson, F. Alriksson, U. Jönsson: JUMP Mode -A Dynamic Window-based Scheduling Framework for Bluetooth Scatternets, Proceeding of the Mobicom 2001, Rome, Italy, July 2001 [10] W.O. Tatum, A. M. Husain, S. R. Benbadis: Handbook of EEG Interpretation, Demos Medical Publishing, 2008 [11] K. V. Harpale, K. V. Bairagi: Mathematical Modeling and Data Analysis of Electroencephalographic Signals: A Review. ISSN 2250-2459, 2015, ISO 9001:2008 Certified Journal, Volume 5, Issue 3 [12] P. Yager, T. Edwards, E. Fu, K. Helton, K. Nelson, M. R. Tam, B. H. Weigl: Microfluidic diagnostic technologies for global public health, 2006, Nature, 442(7101):412–8. [13] J. Burrell, T. Brooke, R. Beckwith (2004) Vineyard computing: sensor networks in agricultural production, IEEE Pervasive Computing, vol 03(1), pp 38-45 [14] P. A. Aberg, Tatsuo Togawa, and Francis A. Spelman, editors, 2002, Sensors in Medicine and Healthcare, Wiley-VCH. [15] W. Dargie, C. Poellabauer: Fundamentals of Wireless Sensor Networks: Theory and Practice, 2011, ISBN:9780470997659, John Wiley & Sons, Ltd [16] G. Fortino, S. Galzarano: Programming Wireless Body Sensor Network Applications through Agents, 2015, Department of Electronics, Informatics and Systems (DEIS) University of Calabria (UNICAL), 1-8. [17] B. O. Sadiq, A. E Adedokun, Z.M Abubakar: The Impact of Mobility Model in the Optimal Placement of Sensor Nodes in Wireless Body Sensor Network, Department of Electrical and Computer Engineering, Ahmadu Bello University, Zaria Nigeria [18] S. Blum, S.Debener, R.Emkes, N. Volkening, S. Fudickar, M. G. Bleichner: EEG Recording and Online Signal Processing on Android: A Multiapp Framework for Brain-Computer Interfaces on Smartphone, 2017, BioMed Research International, Article ID 3072870, 12 pages [19] D. Bridwell, E. Leslie, D. Q. McCoy, S.M. Plis, V.D. Calhoun: Cortical Sensitivity to Guitar Note Patterns: EEG Entrainment to Repetition and Key, 2017, Front Hum Neurosci [20] S. Debener, R. Emkes, M. De Vos, M. Bleichner: Unobtrusive ambulatory EEG using a smartphone and flexible printed electrodes around the ear, 2015, Scientific Reports, vol. 5, Article ID 16743 [21] M. G. Bleichner and S. Debener: Concealed, Unobtrusive Ear-Centered EEG Acquisition: cEEGrids for Transparent EEG, 2017, Frontiers in Human Neuroscience, vol. 11, p. 163 [22] C. Gretton and M. Honeyman: The digital revolution: eight technologies that will change health and care , The King’s [23]Fund,” https://www.kingsfund.org.uk/publications/articles /eight-technologies-will-change-health-and-care. Google Research: “TensorFlow: Large-scale machine learning on heterogeneous systems.” pp. 19, 2015. [24] S. Debener, F. Minow, R. Emkes, K. Gandras, M. de Vos: How about taking a low-cost, small, and wireless EEG for a walk?, 2012, Psychophysiology, vol. 49, no. 11, pp. 1617–1621 [25] M. De Vos, S. Debener: Mobile eeg: towards brain activity monitoring during natural action and cognition, 2014, International Journal of Psychophysiology, vol. 91, no. 1, pp. 1-2 [26] B. Griffiths, A. Mazaheri, S. Debener, S. Hanslmayr: Brain oscillations track the formation of episodic memories in the real world, 2016, NeuroImage, vol. 143, pp. 256–266 [27] mBrainTrain | Fully Mobile EEG Devices, https://mbraintrain.com/ [28] Swartz Center for Computational Neuroscience and C. Kothe: Lab Streaming Layer (lsl), https://github.com/sccn/labstreaminglayer. [29] M. Pavlin, F. Novak: A wireless interface for replacing the cables in bridge-sensor applications, Sensors, 2012, Vol. 12, No. 8, pages: 10014-10033 [30] W. H. Frist: Connected health and the rise of the patient-consumer, Health Affairs, 2014, vol. 33, no. 2, pp. 191– 193 [31] R. Kwok: Personal technology: Phoning in data, 2009, Nature, vol. 458, no. 7241, pp. 959–961, 2009. [32] J. Cartwright: Smarthphone science: researchers are learning how to convert devices into global laboratories, 2016, Nature, vol. 531, pp. 669–671