Brain Controlled Wheelchair
by parker jones in Circuits > Arduino
242 Views, 5 Favorites, 0 Comments
Brain Controlled Wheelchair

I made an EEG/EMG-controlled car/wheelchair that runs using Python, Arduino, and OpenBCI GUI/Headset. If you want to know more about how I made this, please email me at eeg.projects.parker.jones@gmail.com. Special thanks to OpenBCI for sponsoring this project through their Discovery Program. If you want to view my license for this project, please visit my GitHub.
Supplies
Assembling and Wiring


First we need to assemble and wire the car to the arduino.
- Asemble the car so it looks like the image above
- Wire arduino and motors to L298n motor controller.
- Right side motor (from back of car):
- Black wire to Out 4 of L298n
- Red wire to Out 3 of L298n
- Left side motor:
- Black wire to Out 1 of L298n
- Red wire to Out 2 of L298n
- Arduino:
- Pin 5 to IN4 of L298n
- Pin 4 to IN3 of L298n
- Pin 3 to IN1 of L298n
- Pin 2 to IN2 of L298n
- 5v to +12v of L298n
- GND to GND of L298n
Coding Arduino
This is the code I used, very simple to run over BLE, and easily editable.
Downloads
Coding and Testing Python
This is the code that I used for my Python backend, you need to replace the BLE device characteristics, and I would recomend testing and then changing the EMG thresholds.
Downloads
How to Run Python and Arduino Code With GUI
- Open up the GUI and chose cyton from dongle, selcet auto connect and your good. However, if it says that it fails to start sesion or the GUI freezes when trying to auto connect, instead chose manual>select your dongles serial port>select overide dongle> and 20.
- Set your view to the regular time plot on the left, EMG on the top right and networking on the botom right.
- Set the networking type to LSL.
- Turn off all channels except 1 and 2 in time plot and EMG.
- Click start data stream.
- Click start LSL stream.
- Turn on Arduino by plugging it in.
- Run Python code through terminal:
- For Mac:
- open terminal
- cd desktop (or whoever you have the python script saved)
- python3.10 backend.py
- If you get any errors, install anything such as asyncio, pylsl, time, and bleak using python3.10 -m pip install blank.
- For Windows:
- open command prompt
- cd %USERPROFILE%\Desktop
- python3.10 backend.py
- If you get any errors, install anything such as asyncio, pylsl, time, and bleak using python3.10 -m pip install blank.
- Use your eyebrows to drive the car. (note, there may be some input delay due to the amount of time it takes to recive data and send it in python.)