Interactive IOT enabled Seizures and Epilepsy Data Acquisition system for prediction of Alzheimer's disease.

: Physiologically based models are persuading for seizure recognition with nearby neurological parameters extracted from biosensors like EEG and EMG. The event of a seizure is recognized by investigating the frequency bands of EEG and EMG. Records of electrical signal describe the cerebrum actions for the treatment of mental issue, mind sickness like epileptic seizures. Functional based models are alluring for seizure identification as their boundaries can be categorical identified with neurological system. We propose an incorporated Real-time Remote Health care System for Epilepsy patients using wearable remote sensors and IOT advancements and approve biosensor gadgets to recognize epileptic seizures. Proposed system gives us detailed description of structure implementation of interactive system which collects the data from sensors and stores data to cloud for Alzheimer Disease prediction.


Introduction
Fisher defines epilepsy as "a brain disease characterised by an enduring proclivity toward epileptic seizures as well as the neurobiology, emotional, psychological, and social ramifications of this condition." Epilepsy is caused by a variety of factors, can affect both children and adults, and has an active prevalence of 4-8 in 1000 people. Seizure recognition algorithms are often used for both identification and retrospective examination of seizures during pre-surgical examinations [1].
If the algorithm proves to be accurate, it may be used in an automated alarm system that warns the patient when a seizure is about to happen. Furthermore, this device may be extremely useful to medical personnel, allowing them to determine which specific roles could be harmed by a seizure and assisting them in locating the cause of the seizure activity . Electrical stimulation has also been shown to inhibit spontaneous epileptic type behaviour when administered appropriately at seizure initiation. An ambitious machine could detect and end electrographic seizures in a closed loop using an early seizure detection algorithm Previously,[11] some seizure prediction algorithms were proposed. The majority of them are based on feature extraction, which is used as input data by various types of classifiers, including fuzzy logic . neural network help vector machines and linear separation based on feature-channel matrix Wavelet transformations, differential operators eigen-decomposition and Gabor functions are among the methods previously chosen to derive useful features from the recording. Performances, on the other hand, are far from flawless. [10] When it comes to seizure detection, physiologically dependent models are appealing because their parameters can be directly linked to neuronal pathways. [3] As a result, improvements in fundamental physiological processes may be linked to parameter shifts over time. It is observed that one modelbased seizure detection algorithm has been proposed to our knowledge. It is based on a model that was applied to scalp. It wasn't designed to diagnose seizures early on. [4] Several electrodes mounted on the scalp, an electroencephalogram (EEG) tracks variations in electrical impulses in terms of voltage differences in the brain over a brief period of time. Via the production of the electrodes, EEG signals may reveal details about brain and neurological disorders. Seizure is a psychiatric disease or nervous disorder in which so many nerves fire at the same time, and epilepsy is a medical condition in which seizures occur randomly. Since the brain is unable to do regular functions during a seizure, people may feel irregular movements, sensations, perception, or behavior [5].
The prediction of epileptic seizures is critical for epilepsy medical diagnosis. EEG can also be used for a variety of purposes, including emotion recognition, video content appraisal , liquor intake estimation, sleep stage identification , smokinginduced changes in brainwaves, and cell phone use among others [6]. The ability to derive features from EEG signals is crucial for proper classification. For the identification of seizures in EEG signals, existing feature extraction and classification methods focused on wavelet and Fourier transformation [10] were used.
Recent research has shown that empirical mode decomposition is an effective transformation technique for EEG signal classification [7].
Empirical mode decomposition and a small dataset from the Bonn University open source database to analyse seizure and non-seizure EEG patterns, and they suggested a seizure prediction strategy [8].
Wearable wireless sensors detect and transmit real-time EEG signals to a central signal monitoring and processing facility over an IoT communication network in the application context we present. Epileptic seizure biosensor sensors have now been proposed, optimised, and tested The patient's facial expressions, words, and movements are also tracked using video cameras and microphones. Multiple high-quality, real-time video and audio streams from multiple patients are transmitted over the same IOT channel. Finally, compressed data is sent to a neurologist or treatment clinic for analysis suggest clinical medication using google assistant as mentioned in Fig 1. For eg, Sightspeed does not currently support high-resolution video transfer.
An emergency alert to a healthcare centre or 000 will be sent through the IOT network when a particular body wearable sensor reads below a threshold level set by a Medicare specialist. IOT stability and pace will continue to stymie video encoding and real-time distribution. [2] II. Proposed Methodology A. Block Diagram:

Fig 1 Proposed block diagram
In this proposed work, an IOT frame is modelled as shown in Fig 1. EEG (Electroencephalogram) and EMG (Electromyograph) sensorelectrodes can be placed on the patient to collect data. Through serially connecting the central processing unit and interfacing the sensors, the data will be transmitted via the microcontrol unit. Data was submitted to a cloud server for analysis, and a prediction algorithm model was created using machine learning algorithms with a dataset of Alzheimer's patients. A report is created via the web app and sent to the doctor for treatment to the patient and caretaker for health and rescue the patient from escalating to the next level of disease. A voicebased device is integrated to aid the patient in taking medications and engaging in daily exercises as prescribed by the doctor.
B. EEG signal acquisition and Data processing EEG is a method for monitoring microvolt-range potential changes across the user's scalp. To do this, we built a two-stage amplification and filtering circuit. To digitise the signal, we used the microcontroller's built-in ADC capabilities. Passive silver-plated electrodes immersed in saline solution are placed and applied to the amplifier surface on the user's head. The opto-isolated UART sends the ADC digital values to a PC connected to the microcontroller via USB. The PC runs an Embedded C programme to perform FFT and machine learning algorithms (SVM) on the resulting signal. We developed software to monitor our progress and save the EEG signal in a data file.

Fig 2 EEG cap connected to patient
A clinical analysis is used to diagnose Alzheimer Disease (AD) in which the patient is connected remotely to EEG electrodes, Pulse, EMG, and temperature sensor, the patient's seizures are recorded can be analysed for earlier detection of AD from the collected data .
C. Logical Structure internal EEG system A differential instrumentation amplifier, an automotive amplifier, and multiple filters are used in the project's overall setup, as well as a differential instrumentation amplifier (where common-mode noise is measured using a right-leg driver attached to the patient's mastoid or ear lobe) (to remove DC offsets, 60 Hz power-line noise, and other artefacts). The signal is then sent to the microcontroller, which uses an ADC to digitise it. An independent USB UART connection is then used to send it to a PC. After that, the PC completes signal processing and sends the data to the user, creating a neuro feedback loop in which the user will control the PC using their brain waves.

Fig 3 EEG Internal block diagram
Instrumentation amplifier: Using an instrumentation amplifier, an engineer can change the gain of an amplifier circuit without modifying more than one resistor value. The differential amplifier, on the other hand, allows several resistor values to be modified, as we previously discussed.
The so-called instrumentation amplifier builds on the previous iteration of the differential amplifier to provide us with the power. Understanding the Instrumentation Amplifier Circuit This formidable circuit is made up of three new resistors that connect the two buffer circuits. Except for Rgain, assume that all resistors are the same value.
(1) The voltage at point 1 (top of Rgain) is equal to V1 due to the negative feedback of the upper-left op-amp. Similarly, the voltage at point 2 (the bottom of Rgain) is kept constant at V2. The voltage difference between V1 and V2 creates a voltage drop through Rgain equal to the voltage difference between V1 and V2. Since the feedback loops of the two input op-amps draw no current, the same amount of current must be flowing into Rgain and the two "R" resistors above and below it .
(2) The normal differential amplifier on the righthand side of the circuit then amplifies this voltage decrease between points 3 and 4 by a gain of 1 (assuming that all "R" resistors are of equal value).
Advantages of the Instrumentation Amplifier While this seems to be a time-consuming method of creating a differential amplifier, it has the distinct advantages of having extraordinarily high input impedances on the V1 and V2 inputs (due to the fact that they bind directly to the non-inverting inputs of their respective op-amps) and adjustable gain that can be adjusted with a single resistor.
We can get a general expression for total voltage gain in the instrumentation amplifier by fiddling with the following formula: Though it may not be clear from the diagram, changing the value of one resistor, Rgain, will change the differential gain of the instrumentation amplifier.
Yes, we could adjust the total gain by adjusting the values of any of the other resistors, but in order for the circuit to stay symmetrical, we'd have to do so with balanced resistor value adjustments. Please notice that with the above circuit, the lowest gain possible is obtained with Rgain fully open (infinite resistance), and that gain value is 1.
An instrumentation amplifier is a differential opamp circuit with high input impedances and simple gain adjustment through a single resistor variation.
The first stage uses an AD620 instrumentation amplifier for differential common mode signal rejection to eliminate noise. The AD620 has a return of around 23 percent. A voltage divider and a 3140 op-amp buffer have a 2.5 V virtual ground for the instrumentation amplifier. After passing through the instrumentation amplifier, the signal is filtered with an RC high pass filter with fc=0.13 Hz (we modified the original design to allow the P300 ERP to reside within the pass-band of the filter).
The signal then goes into a second stage of amplification. The benefit of a 3140 opamp is set at about 65. The output signal is then filtered using an RC low-pass filter with a cut-off frequency of about 48 Hz. This frequency was chosen to preserve the low-frequency content of the EEG signal while filtering out 50-60 Hz power line noise. Analog Devices, Texas Instruments, and Maxim Semiconductor supplied samples, while Digi-Key provided parts. Passive EEG electrodes with silver plating were also examined. After amplification to way above the ADC reference voltage spectrum (0-1.1 V), we were able to plot a 125 VVpp, 10 Hz square wave calibration signal in real-time on a PC. We designed it ourselves. The below is a schematic diagram of the To separate the USB power from the microcontroller power, we used a Fairchild Semiconductor 6N137 optoisolator. The isolation line runs between the UART RX and TX pins on the microcontroller (Pin D.0 and Pin D.1) and the RX and TX pins on the FTDI chip. The below is a Fig.9 USB UART Opto-Isolation Schematic schematic diagram of the isolation circuit:

Design of an Electrode Cap
The Mind Wave Mobile 2 safely measures and outputs the EEG power spectrums (alpha waves, beta waves, etc), The device consists of a headset, an ear-clip, and a sensor arm. The headset's reference and ground electrodes are on the ear clip and the EEG electrode is on the sensor arm, resting on the forehead above the eye (FP1 position). It uses a single AAA battery with 8 hours of battery life.We made an EEG helmet out of an old baseball cap that had been changed to have single channel EEG electrodes.

EMG Sensor Measurement and Data processing A. EMG signal collection
Measuring muscle activation via electric potential, referred to as electromyography (EMG), has traditionally been used for medical research and diagnosis of neuromuscular disorders. However, with the advent of ever shrinking yet more powerful microcontrollers and integrated circuits, EMG circuits and sensors have found their way into prosthetics, robotics and other control systems. Place the sensor on the desired muscle after determining which muscle group you want to target (e.g. bicep, forearm, calf), clean the skin thoroughly. Place the sensor so one of the connected electrodes is in the middle of the muscle body. The other electrode should line up in the direction of the muscle length Peel off the backs of the electrodes to expose the adhesive and apply them to the skin. Place the reference electrode on a bony or nonadjacent muscular part of your body near the targeted muscle. Connect to a development board (e.g. Arduino, RaspberryPi), microcontroller, or ADC.

Fig. 10 EMG Sensor Layout
Our Muscle Sensors are designed to be used directly with a microcontroller. Therefore, our sensors primary output is not a RAW EMG signal but rather an amplified, rectified, and integrated signal (AKA the EMG's envelope) that will work well with a microcontroller's analog-to-digital converter (ADC). This difference is illustrated below using a representative EMG signal.

Rectified EMG Signal
Rectified & Integrated EMG Signal 2 ) ( Fig.12 Schematic of EMG Muscle sensor The output waveforms of the EMG schematic circuit design are simulated in Multisim Live and compared the simulation with real-world measurements inside the Measurements Live environment using the NI ELVIS III Oscilloscope. EMG signal is obtained through differential enhancement procedure. The differential speaker ought to have high input impedance and extremely low yield impedance with the gain of 10 from the schematic design the output raw signal is simulated by applying voltage to the electrodes.As shown in the Fig: 13 Fig.13: Raw Output EMG Signal The commotion frequencies debasing the crude EMG signal can be high just as low. Low recurrence commotion can be caused from intensifier DC balances, sensor float on skin and temperature variances and can be eliminated utilizing a high pass channel. The rectified EMG signal waveform is shown in Fig. 14.   Fig.14 Rectified EMG Signal For the transmission of unadulterated EMG, the high and low recurrence commotion ought to be erased. For this reason, just a particular band of recurrence ought to be conveyed forward. This can be made conceivable with the assistance of a band pass channel. The smoother EMG signal waveform is shown in Fig. 15. Fig.15 Smoother EMG Signal waveform The EMG signal, as referenced previously, is extremely feeble for example just 1-10 mV. For specific muscles, for which the sign reaction is exceptionally solid for example Biceps Brachii, an addition of 500-1000 can be sufficient. Yet, for muscles, whose EMG reaction is powerless. The Rectified and integrated EMG signal is shown in Fig.16.

Fig.16 Rectified and Integrated EMG signal
Reads an analog input on pin 0, converts it to voltage, and prints the result to the serial monitor. Graphical representation is available using serial plotter (Tools > Serial Plotter menu) Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground. Convert the analog reading (which goes from 0 -1023) to a voltage (0 -5V)

IV.
IOT Networking: Data is compiled and calibrated to provide precise data sets that are continually monitored for irregularities and referred to a healthcare support network through the home IOT link. In a hierarchical care network, this introduction around the country will provide opportunities for healthcare advancement through innovative services integrating triage nursing, general practise, and specialty care. The Internet of Things network will provide on-demand video connectivity between remote healthcare providers and patients, allowing a network of family members and healthcare professionals to play a key role in the management of senior citizens' healthcare. The applications, criteria, strategies, and future study challenges for a Centralized Real-time Remote Health Treatment for detecting and predicting seizures in Epilepsy patients are presented in this paper. Wearable wireless sensors track and relay real-time EEG signals to a central signal monitoring and processing facility through an IoT communication network. Biosensor sensors to track epileptic seizures are now proposed, optimised, and validated. This would necessitate the patient wearing a body sensor device that includes an accelerometer, gyroscope, and magnetometer, all of which are used to monitor body motions, including hand movements. Video cameras and microphones are also used to track the patient's facial gestures, sentences, and motions. By sharing the same IOT connection, multiple highquality, real-time video and audio streams from multiple patients are sent. Finally, compressed data is submitted to a neurologist or a medical facility. Sight speed, for example, does not currently allow high-resolution video transmission. When a specific body wearable sensor reads below a threshold level set by a Medicare specialist, an emergency warning to the healthcare centre may be issued via the IOT network. Image compression and real-time rendering will continue to be hampered by the reliability and speed of IOT.
An Alzheimers patient's Architecture for Remote Detection and Prediction of Epileptic Seizures The majority of existing Remote Health Care applications are stand-alone services that were created by individual consumers. Furthermore, several are out of date. Established healthcare services must now be transformed with holistic solutions, according to the demand. A Alzheimers Patient, on the other hand, necessitates the participation of a broad range of healthcare stakeholders since it must be adopted and used throughout the country. In order to design an Alzheimers Patient approach for n Epilepsy patients, the following parties must be considered.: Healthcare officials include the federal government and state healthcare agencies, as well as healthcare providers such as hospitals, consultants, and insurance companies.
V. Remote data analysis to find Epilepsy patients. It is also important to consider the complex aspects of e-health when planning e-health care services and networks. To put it another way, not only can key factors and variables be closely tracked, but also moderating and interfering variables, in order to allow more comprehensive and intelligent management and decision-making. Key factors such as gender, age, ethnicity, and other moderating variables such as position and diet can not be overlooked when designing an epublic health statistical method to examine and investigate the health of a population, for example.
The client, server, and database tiers of a general model for an Alzheimers patient for Epilepsy cases can be divided into three tiers. Alzheimers Patient inherits the traditional three-tier architecture of a typical client/server information system, with minimal information processing at the client side (sensor and base station) and massive information processing and storage at remote servers situated at a central healthcare facility. A standard Alzheimers Patient's elements, functions, and architecture are defined in Table 1 and illustrated in Figure 17. The four-tier architecture as shown in figure of an Alzheimers Patient for Epilepsy patients is shown in Figure 18. In this architecture model, a wireless node (wristband for the elderly) will be able to feel the necessary data (depending on the elder/condition), patient's gather physical parameters, perform basic data analysis, and then send the data to a sink or base station, and then to a central server, which will provide video in addition to today's text and voice communications. Caretakers (doctors, nurses) will remotely track the patient's physiological parameters until a final decision is taken on his or her health status. When senior citizens are not feeling safe or comfortable, they should push an emergency button from their wireless node or from the TV unit's remote control. After that, the central server will issue an emergency alert. The physiological parameters relating to the patients' behaviours can be gathered and transmitted to the central server through body wearable sensors. Voice telephone calls, SMS messages, and video calls are used to communicate health status updates to healthcare specialists and family members.
If IoT becomes more common, it seems that maintaining these improved links would be possible. When caregivers and family members wish to learn more about a patient's current diagnosis, they can use the website to access the site. At the central locations, detailed e-health information obtained by wireless sensors are classified, preserved, and managed with the appropriate security measures in place. This enables specific healthcare specialists to have timely and effective access to appropriate healthcare information. Furthermore, the saved information will be used as a valuable source of evidence in future studies to better increase care outcomes. Wearable, implantable, wireless movement sensing systems, sensor power supply, and epilepsy detection methods and algorithms are all examples of wireless sensor device standards. The rest of the machine architecture, on the other hand, shows no major variations.

VI. Conclusion:
IoT-based interactive data acquisition from EEG and EMG sensor interfaced and process of converting from raw signal digital data to upload the data on cloud database with IOT networking discussed, as well as healthcare network architectures and networks that allow for connectivity to the IoT backbone and the transmission and reception of medical data . IoTdriven healthcare systems and technologies have gotten a lot of R&D attention. The paper also includes extensive research activities about how the Internet of Things can be used to interact with Alzheimers patient monitor treatment, chronic illness monitoring, private wellbeing, and fitness management. The paper provides a broad view of how recent and continuing advancements in sensors, computers, internet apps, and other innovations have driven accessible healthcare gadgets and connected health systems to limitlessly broaden the potential of IoT-based healthcare services for further developments, providing deeper insights into market dynamics and enabling technologies.. This paper summarises eHealth and Internet of Things policies and regulations for the benefit of different parties involved in evaluating IoT-based healthcare technology. In conclusion, academics, engineers, health providers, and lawmakers working in the field of IoT and healthcare technology are expected to benefit from the findings of this study.