EPSILON-BCI (Controlling electronics with Brain)

Published  November 7, 2024   0
Epsilon BCI for Paralyzed Patients

Introduction

All around the world, the number of people who are paralyzed or cannot use one of their limbs is increasing. Every living being on this earth has its umwelt, which means our surroundings. LIKE humans have touch, hearing, and senses, a dog has his whole life, remembering the smells of each of the things he experienced in life. We, humans, can expand our umwelt and cannot always depend on what Mother Nature has given us. We can expand our umwelt beyond limits.

Epsilon

We can control things using our brain not exactly things but more likely electronics like an LED or a wheelchair or a servo motor etc. How does this work? We call this type of technology a BCI or brain-computer interface. Later in my project for proof, I will do many things related to interfaces and expanding one's umwelt. a BCI is a thing in which we can control one thing, especially through electronics and many other things. What it uses is measuring eeg. what it means brain eeg value is.. Let's say for example I want

Wheelchair Representing the Paralyzed

Impact Statement

I am trying to help paralyzed people control a wheel chair or electronics with their brain a special ability or an umwelt, which means a person's capability of their body parts. We don't have to depend on our mother nature to let her give us our powers. every living being had its own umwelt like a fish that has electricity, pigeons use the earth's magnetic field to find their home we call it magnetite. but in humans, we have the most common features but we have the brain that is the most distinct part compared to any living being part. why can't we control things with our brains? I have created the epsilon and frequency of the project name. Epsilon helps paralyzed people control electronics using their brain waves...I want every person trying to expand their ability. the umwelt that humans have built is the technology. I have created a BCI  that can help paralyzed humans control electronics using their brains.

Components Required

I have developed a Brain-Computer Interface (BCI) that uses a bio amp EXG Pill, motors, and Arduino r4 wifi and nano esp32  to detect eye movements through EOG signals. It uses Arduino r4 wifi and nano esp32 connected with alligator cables connected to analog pins on the Arduino. I have used the backyard Brain Spiker app, which helps in visualizing electrical and action potential signals. Also, by Wi-Fi, I will connect the Arduino R4 to another IOT board(nano esp32), which will create a wireless BCI interface for BCI

1]A headset to track all of my EEG signals [3d printed pla material VR headset]l
2]Bio amp exg pill or [eeg sensor],
3]Arduino [r4 wifi],
4]6 electrodes
5]3 alligator cables
6]Jumper wires,
7]Led [Red],
8]5 volt servo claw 90 degrees,
9]l293d motor driver
10]2 gear motors
11]Slim but strong wood base for motors,2 rubber tyres,
12]Esp32 & esp32 cam 
13]NANO esp32

Software needed

1]Arduino IOT cloud and Arduino ide
2]Spike recorder app for visualising my eeg 
3)Arduino programming language
4)blender 3d for 3d modelling

To see the full demonstration video, click on the YouTube Video below.

 (STEPHEN HAWKINGS CHAIR) When I turn on an LED, I am focused, and my EEG value will be different, most likely higher than my general EEG value. When I turn off the LED, it will have a different EEG value. Well, EEG values use brain waves and special brain electrical signals to analyse one's brain-focused power or attention span in a laboratory and research centre. 
Whenever I am focused it will turn on the LED and whenever I am less focused on turning it off the LED means turning off the LED my brain wasn't giving much attention and my brain didn't have a high eeg value. So by that theory, I have an EEG sensor named bio amp exg pill that can detect EEG value. Whenever my eeg value goes up a certain level or my normal level it will turn on the LED because I am focused either it gies less on a certain threshold value it will turn off. The bio amp exg pill is connected to a0 and supporters on 5v. 
I will make a non-invasive, more advanced prototype that a person can move a wheelchair with his brain. A BCI in which the world's most powerful companies Neuralink and Nvidia are working on but it is invasive. Hence, I thought months is there a way we can make this more suitable for normal people and keep people's comfortability? I have used electrodes which are used in measuring electrical signals of the human body.

Demonstration of The Setup BCI

(I visualizing my eeg value to decide at which value I am focused on spike recorder app)

Have applied 5 on my frontal cortex because it has almost no hair and it most closest to our skin and others on the f5 part of my brain or more specifically my head.so overall this is a prototype. By using IoT we can move the wheelchair without the contact of wires, thank you.

Illustration Of Working BCI

(idea of big companies like Neuralink creating invasive solutions to paralyze people)

Neuralink

WELL TO INFORM YOU I HAVE ONLY DEMONSTRATED WITH LED BECAUSE I CAN SUBMIT ONLY ONE PROJECT SO IT WILL HAVE THE COMPONENTS REQUIRED AND WRITTEN ALL THAT BUT IN THE VIDEO I HAVE ONLY SHOWN THE DEMONSTRATION OF THE LED WITH THAT ALSO SINCE I HAVE ONLY DEMONSTRATED THE LED BCI  IN THE VIDEO I WILL ONLY PROVIDE THE CODE AND EXPLANATION OF THE LED ONLY PLEASE UNDERSTAND IT THANK YOU

Completed Epsilon BCI

Technical Information--

BCI [TECHNICAL INFORMATION]

  • A headset to track all of my EEG signals [3d printed pla material VR headset ]

Headset to Track EEG
  • I have designed this headset that will have a function to wear without any problem and that little box is the VR headset that will be connected to  an esp32 cam all around my headset will have dry electrodes sending signals to my nano esp32

Nano ESP32
  • Bio amp exg pill or [eeg senor], Arduino [r4 wifi], nano esp32,6 electrodes, 3 alligator cables, jumper wires, led [white],5v servo claw 90 degrees,l293d motor driver,2 gear motors, the slim but strong plastic base for motors,4 rubber tyres, Arduino ide for programming, spike recorder for visualising,4 m long wires for electrodes connector and a wifi connection......and Iot cloud for programming it..

VR HEADSET

VR Headset

So what will all this do, and how will I build-----?

FOR THE BCI

I have designed a VR headset that will help me record eeg using Blender a 3d designing app. Well just as above I will do the same thing finding out my eeg value using different methods like meditating while being stressed over the exam by finding that, then I will see the changes made by the value and graph and set the threshold and code accordingly then for seeing if it works or not,, first I will try to do it on simpler electronics like a led or a servo claw. Then by building and connecting all the wires and rechecking everything I will try to make this possible till the end.

Demontration of EEG Reading

It will control things by using my brain waves or EEG values. for paralyzing people like controlling a wheelchair by using your very own brain. I have also tried to understand what you do, it tracks our movements so if I move my eye upward it will move the car upwards down then down left right  then it will also move the car left-right,

 Image no.1 is less focused so the servo claw is opened and it's not grabbing anything

whenever I blink or close my eyes for too long it will stop the wheelchair.....

HOW I WILL DEMO IT OR SHOW

well for the BCI I will try not to have any AC or network around me since it will give them some wrong and unlikely output,(in image no.2)

[more focused so increase in EEG value send data through IoT and grabbing a piece of cloth]

I will connect and place all the electrodes in their appropriate places since it is necessary to record electrical signals that my brain sends while I am focused...

then I will place and join it with the cables and by putting the VR headset on my head it will be completed I will be putting the electrodes on the frontal cortex and the f5 part of my brain behind the ears
. Then whenever I am focused or I am thinking of turning on that LED the nano ESP32 will detect that behaviour from bio amp exg pill and bio amp shield, then it will send signals to my Arduino r4 wifi board which will turn on the LED.

F5 Part Of The Brain

for the servo claw it is the same there will be two outputs either closing it and grabbing the things or opening it wide so we can release it it will do the same

for the wheelchair as discussed earlier if I move my eye upward the electrodes will grab and gather those signals and send them to bio amp ex pill which will then recognise it and send it to my nano esp32 connected to analog ao pin on my board nano esp32 and it will recognise the pattern and signals to esp32 and it will move the cars forward with the use of motor driver. the nano esp 32 needs ip address of the baord so i have connected to the ip address of the following board

CODE EXPLANATION FOR BCI OF nano esp32

BCI Setup Connection

1. THE VOID SETUP AND INITIALIZING THE PINS NANO Esp32

#include <WiFi.h>
#include <WiFiClient.h>

// Wi-Fi network details
const char* ssid = "Your_SSID";
const char* password = "Your_PASSWORD";

// IP and port for Arduino Uno R4 WiFi
const char* serverIP = "192.168.1.100"; // Uno R4 WiFi's IP address
const uint16_t serverPort = 80;

// EEG reading parameters
const int eegPin = A0; // Analog pin connected to the Bio Amp EXG Pill
const int threshold = 700; // EEG threshold for high activity

void setup() {
Serial.begin(115200);
pinMode(eegPin, INPUT);

// Connect to Wi-Fi
WiFi.begin(ssid, password);
Serial.print("Connecting to WiFi...");
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("Connected to WiFi.");
}

It is set as bool focus detected since it is a boolean variable

  • I have added a cloud variable named focus detected in the option of adding customer variables it will help me to do work a lot faster

  • I have connected the ip address of arduino uno r4 wifi to nao esp32

  • Whenever both are connected to each other it will show connected in serial monitor

  • In this I have told and initialised the pins so that my Arduino board can take input and output to the other components

  • I have connected the EEG sensor to a0 for analog inputs and it is the most suitable for my project

  • I have set my eeg value according to my general eeg value and above that

  • I have used the client function in Arduino programming

  • wifi.h libary is obviously used
    UNDERSTANDING THE VOID LOOP CODE
    void loop() {
    int eegValue = analogRead(eegPin); // Read EEG value
    Serial.print("EEG Value: ");
    Serial.println(eegValue);

// Check if EEG value exceeds threshold
if (eegValue > threshold) {
Serial.println("EEG threshold exceeded. Sending signal to Arduino Uno R4 WiFi...");

// Connect to server and send signal
if (client.connect(serverIP, serverPort)) {
client.println("HIGH_EEG_DETECTED");
client.stop();
} else {
Serial.println("Connection to Arduino Uno R4 WiFi failed.");
}

delay(2000); // Wait 2 seconds before checking again
}
}

  • I have used Arduino programming language which is best suitable for my project.

  • It uses the if and else functions of it to do some work based on the command or input given.

  • Using client function it sends data and signlas

  • In this I have set this such as if my eeg value goes up more than 700 it will send msg to Arduino uno wifi board accordingly

  • I have also used the delay function for stability

  • In this nano esp32 is sending data to my arduino uno r4 wifi respectively

CODE FOR PROTOTYPE OF BCI Arduino R4 Wifi

#include <WiFi.h>
#include <WiFiServer.h>

const char* ssid = "KKRA";
const char* password = "sorry cannot provide that";

const int ledPin = 12; 
WiFiServer server(80);

void setup() {
Serial.begin(115200);
pinMode(ledPin, OUTPUT);
digitalWrite(ledPin, LOW); // strat with led off

// Connecting to Wi-Fi
WiFi.begin(ssid, password);
Serial.print("Connecting to WiFi...");
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("Connected to WiFi.");

// Starting server
server.begin();
Serial.println("Server started.");
}

void loop() {
WiFiClient client = server.available(); // Checking for incoming connections to board

if (client) {
Serial.println("Client connected.");

while (client.connected()) {
if (client.available()) {
String message = client.readStringUntil('n');
Serial.print("Received message: ");
Serial.println(message);

// Checking if the message is "HIGH_EEG_DETECTED"
if (message == "HIGH_EEG_DETECTED") {
digitalWrite(ledPin, HIGH); //  on LED
delay(2000); // LED on for 2 seconds
digitalWrite(ledPin, LOW); // off LED
}

client.stop(); // Disconnect from the client
}
}
}
}

VOID SETUP AND VOID LOOP

  • Arduino Nano ESP32 Reads EEG values and send msg to `arduino uno r4 wifi board` when the EEG value crosses the threshold.
    Arduino Uno R4 WiFi detects the values coming from nano. When it detetcs the msg from nano esp32 turns on the LED for 2 seconds.

  • Have connected the lead to d12

  • Same as above I have used if else condition for this also

  • I have set a certain threshold on nano esp32 so it will send msg to my Arduino r4 wifi such if it goes above my normal eeg value it will turn on the LED
    delay function for stability and also short delay to get instant output

  • Since its connected to wifi and i have also write and in the code the ssid and name of the wifi and connected them

I hope this helps in understand my project perfectly tell me any improvements advice or any other ideas to help me build my project to the best thank you --->_<

sorry for anything that is spelt wrong or the spelling is wrong also make sure the code is not missing anything since i have changed my code a lot of times because of the complexity of it i have taken help from my school teacher as a mentor to guide me from code...

thanks.........................................................................

I Have Applied For A Patent The Patents Act 1970 Also Since I Have Used Open-Source Devices And Other Free Things I Will Publish An Article So Whenever Try To Make It Yourself This Project Make Sure That It Is Already Applied For A Patent........................Under The (The Patents Act 1970)
BY-Gandhi Rushil[EPSILON]

Have any question realated to this Article?

Ask Our Community Members