The Brain-Computer Interface (BCI) Home Automation for People with Limited Mobility project is designed to empower individuals with restricted mobility by enabling them to control household devices such as lights, doors, and thermostats using their brain waves. At its core, the project uses a BCI system that interprets Electroencephalogram (EEG) signals to translate neural activity into actionable commands. These commands allow users to control various home functions without any physical movement, offering significant benefits in terms of independence and quality of life.
To see the full demonstration video, click on the YouTube Video below.
Data Collected: 1,18,98,816 instances
In my project, I developed a BCI system for home automation, aimed at helping people with limited mobility control household devices using their brainwave signals. The system integrates both hardware and software components to enable smooth signal acquisition, processing, and control of devices like lights and doors, improving accessibility for users.
To achieve this, I will use the Maixduino Kit for AI and IoT.
Directional Thinking:
Subject think left, right, back, and front for 20 minutes each, repeated 3 times.
Activity-Based Data:
Brain waves recorded during activities like:
- Playing games
- Listening to pop music
- Listening to devotional songs
- Thinking about an ideal character
- Thinking about a bad character (e.g., enemies)
The Maixduino board processed the EEG signals using a machine learning model trained to identify specific brainwave patterns, such as focus or relaxation. Once these patterns were detected, the neural network translated them into commands to control various devices in the home. For example, focusing on a task might trigger the lights to turn on, while relaxing could open or close a door.
The Maixduino Kit will also handle signal acquisition from the EEG sensor, serving as the bridge between the sensor and the device control mechanisms. The kit’s AI capabilities allowed for real-time processing and interpretation of EEG data, while its IoT features ensured seamless communication between smart devices.
EEG signals typically have a very low voltage, ranging from 1 µV to 100 µV (microvolts). These signals are recorded using electrodes placed on the scalp. The raw EEG data often contains noise from various sources, such as muscle activity and environmental interference, so signal filtering is essential.
EEG signals contain frequencies ranging from 0.1 Hz to 100 Hz, but most relevant brainwave frequencies fall within specific bands: Delta waves (0.5 Hz to 4 Hz), Theta waves (4 Hz to 8 Hz), Alpha waves (8 Hz to 13 Hz), Beta waves (13 Hz to 30 Hz), and Gamma waves (30 Hz to 100 Hz). To filter out unwanted frequencies and noise, a band-pass filter is used. A band-pass filter is applied with lower and upper cutoff frequencies to isolate the brainwave band of interest. For example, to isolate Alpha waves, the filter might pass signals between 8 Hz and 13 Hz, removing everything outside this range. The formula for a basic band-pass filter is expressed as:
where f is the signal frequency, 1/1+ is the cutoff frequency, and is the imaginary unit. This filter allows frequencies within the desired band to pass while attenuating others.
Once the filtered signal is obtained, it is often subjected to feature extraction for further processing. Commonly extracted features include the power spectral density (PSD) of the signal within the desired frequency band, which provides insights into the power of different brainwave patterns. The power of the signal at frequency
can be calculated using the formula:where X(f) is the Fourier transform of the EEG signal, and P(f) is the power at frequency .
The machine learning model used to classify these brainwave patterns is typically a neural network, such as a Convolutional Neural Network (CNN) or a Long Short-Term Memory (LSTM) network, depending on the complexity and type of data. The model is trained using labeled EEG data that corresponds to specific mental states (e.g., focus or relaxation). The general formula for a neural network is given by:
where y is the output, WW is the weight matrix, xx is the input (the extracted EEG features), b is the bias, and σsigma is the activation function (such as the sigmoid or ReLU function).
For binary classification of brainwave states (e.g., focus vs. relax), the output can be interpreted using a sigmoid activation function:
This transforms the output into a probability between 0 and 1, allowing the system to determine whether the detected brainwave pattern corresponds to a specific command (e.g., turning on a light or opening a door).
The model is trained using a loss function, such as binary cross-entropy:
Other components included a TFT LCD display for visual feedback, ensuring users could see the system’s status, and DC motors to control mechanical devices like doors. LEDs served as indicators, and jumper wires were used for connecting various components. This setup created a fully functional home automation system that interprets brainwave signals, providing enhanced independence for individuals with limited mobility.
Steps to Develop the System:
Signal Acquisition Using EEG Sensor:
The EEG sensor captured brainwave data, which was sent to the Maixduino Kit for processing.
Signal Processing Using Maixduino Kit:
The Maixduino Kit filtered and processed the raw EEG data, running a trained neural network model to interpret brainwave patterns.
Hardware Integration:
The processed signals were used to control devices like lights and doors. DC motors and LEDs provided physical and visual feedback, respectively.
User Feedback:
A TFT LCD display offered real-time feedback, showing the system’s status based on brainwave signals.
System Testing and Optimization:
The system was fine-tuned to ensure accurate signal interpretation and smooth functioning of home automation tasks.
Integration with Maixduino Kit:
The Maixduino Kit for AI and IoT provides advanced data processing capabilities, enabling real-time decision-making and efficient communication between devices. Its AI functionality allows the system to adapt to the user’s preferences and patterns over time, while its IoT connectivity ensures seamless integration with smart home systems, resulting in a responsive and customizable automation system for people with limited mobility.
Applications:
1. Increased Independence:
Users with mobility restrictions can control household functions autonomously, reducing reliance on caregivers.
2. Enhanced Quality of Life:
The system offers convenience and comfort, contributing to users' well-being and emotional health.
3. Non-Invasive Control:
EEG-based control is non-invasive and requires no physical effort, ideal for individuals with physical or speech impairments.
4. Adaptability and Customization:
The system is customizable, with machine learning models tailored to recognize unique brainwave patterns for each user.
5. Seamless Smart Home Integration:
By connecting with IoT devices, the system integrates smoothly into smart home environments, allowing users to control multiple devices through brain signals.