Brain-Controlled Car: EEG + EMG Robotic Control

by Upside Down Labs in Circuits > Sensors

90 Views, 1 Favorites, 0 Comments

Brain-Controlled Car: EEG + EMG Robotic Control

BIOAMP EXG PILL.gif

Ever dreamed of driving a car with your mind?

This project makes it possible - using EEG (brainwave) and EMG (muscle) signals to control a robotic car wirelessly via Bluetooth Low Energy (BLE).

What is an Electroencephalography (EEG) ?

Electroencephalography (EEG) is a method used to record an electrogram of the brain's spontaneous electrical activity. It is typically non-invasive, with electrodes placed along the scalp (commonly referred to as "scalp EEG") using the International 10–20 system.

what is an Electromyography (EMG) ?

Electromyography (EMG) is a diagnostic and research technique that records the electrical signals generated by muscles when they contract or are at rest.

Focus your mind → Move forward

Flex your left/right arm → Steer left/right

Flex both arms together → Move reverse

Powered by the NPG Lite Device

Neuro PlayGround (NPG) Lite is a compact Adafruit Feather form factor, a multi-channel wireless biopotential signal amplifier designed for EMG, ECG, EOG, and EEG recording.

It offers Wi-Fi, Bluetooth, Zigbee, and Thread connectivity, along with patient protection, LEDs (User LED, charging LED, six addressable RGB LEDs), buttons (Reset and user button), LiPo battery charging, and USB-C with ESD protection. Its lightweight and user-friendly design makes it perfect for research, education, and wearable applications.

Neuro PlayGround Lite is available on CrowdSupply. Subscribe now to never miss out on any updates.

This project is made by Aman Maheshwari and Deepak khatri

Supplies

BIOAMP EXG PILL.png
WhatsApp Image 2025-08-23 at 4.18.44 PM.jpeg

1. Biopotential Sensing

  1. NPG Lite Device
  2. Snap cables + electrodes (or alligator clips)
  3. Nuprep + alcohol wipes
  4. USB-C cable


2. Car Components

  1. Robotic chassis (e.g., VoidBot)
  2. 2 × geared DC motors (6V–12V)
  3. Motor driver: MX1508/ MX1616
  4. XIAO ESP32C6 board (receiver)
  5. LiPo battery
  6. Slide switch


3. Tools

  1. Soldering iron + wires
  2. Screwdriver
  3. Laptop with Arduino IDE

Hardware Assembly

BIOAMP EXG PILL(3).gif

A. Build the Robotic Car

  1. Watch this video for step-by-step guidance (only up to 5 minutes).
  2. After 5 minutes, follow the circuit diagram below for wiring and connections.
  3. Mount the DC motors to the chassis.


Motor Driver Connection

Motor driver.png
  1. Connect motors to the driver: Motor A → Left wheel, Motor B → Right wheel.
  2. Power the motor driver MX1508/ MX1616
  3. Wire the motor driver inputs to the XIAO ESP32C6 receiver pins.


Motor Driver to XIAO Board Connection

Main Connection Diagram.png
  1. Wire the motor driver inputs to the XIAO ESP32C6 receiver pins.
  2. Secure all wiring and components to the chassis like this and the final setup should look like this.

Connecting NPG Lite

BIOAMP EXG PILL(11).gif
BIOAMP EXG PILL(3).png

Connect the snap caples to Neuro PlayGround Lite.

Skin Preparation

BIOAMP EXG PILL(4).gif

Proper skin preparation is crucial for clear signal acquisition. Here’s how to prepare:

  1. Apply Nuprep Gel to each target area.
  2. Gently rub to exfoliate and remove dead skin
  3. Wipe the area clean using an alcohol swab.

It ensures minimal noise and maximum signal clarity during meditation

What is Nuprep Gel?

Nuprep is a mildly abrasive, highly conductive gel that improves electrode contact by reducing skin impedance. It's safe, effective, and causes minimal skin irritation.

Wearable Setup

BIOAMP EXG PILL(5).gif
BIOAMP EXG PILL(3).png
Electrode Placement
Electrode Placement Signal Type
A0P Center Forehead EEG
A0N Behind Right Ear EEG
A1P and A1N Left Arm (biceps) EMG
A2P and A2N Right Arm (biceps) EMG
REF Behind Left Ear Ground

Pro Tips:

Clean skin with alcohol wipes before applying electrodes for better signal quality

Install ESP32 Board

BIOAMP EXG PILL(15).gif

Install the following board in Arduino IDE

  1. Install board manager: ESP32.

Tools → Board Manager → search for esp32 → Install esp32 by Espressif Systems(version - 3.2.0 compulsary).

Install Adafruit NeoPixel Library

BIOAMP EXG PILL(6).gif

Install the following library in Arduino IDE

  1. Install library: Adafruit NeoPixel.

Sketch → Include libraries → Manage libraries → Search for Adafruit NeoPixel → Install Adafruit NeoPixel

Upload the Code

BIOAMP EXG PILL(10).gif

A. NPG Lite Device

  1. Select board: ESP32C6 Dev Module.

Tools → Board → esp32c6 esp32c6 Dev Module.

  1. Enable CDC On Boot in Tools menu.

Tools → USB CDC ON BOOT "ENABLED".

  1. Upload BLE-BCI-Car-Remote.ino.
  2. Calibrate EEG using Serial Monitor - adjust BETA_THRESHOLD if needed (Set a value slightly above your relaxed state as the threshold)
  3. Now connect the XIAO board to your laptop using the USB-C cable attached to the car, and launch the Arduino IDE.
  4. Re-upload the firmware


B. XIAO ESP32C6 (Receiver)

  1. Select XIAO ESP32C6 in Arduino IDE.
  2. Upload BLE-BCI-Car.ino.

Set the Beta Threshold Value

21.png
22.png
23.png
24.png
  1. Observe the beta-wave percentage while staying focused (default threshold is 2%).
  2. Set a value slightly above your relaxed state as the threshold.
  3. After calibration is done.
  4. It is now time to reflash it, and after flashing, you can disconnect the USB-C cable.

NPG Lite will handle everything wirelessly from here.

Run

Follow these steps to run the car :

  1. Power the car and NPG Lite.
  2. Focus your mind → Car moves forward.
  3. Flex left/right arm → Steering control.
  4. Flex both arms together → Car moves reverse.


Applications

  1. Neurotechnology research
  2. Accessibility devices
  3. Human-computer interaction experiments