Control Your Home Appliances With Your Brain
by Upside Down Labs in Circuits > Sensors
1072 Views, 6 Favorites, 0 Comments
Control Your Home Appliances With Your Brain
In this project, we'll use the Neuro PlayGround Lite (NPG Lite) to build a wireless remote that you can control using brain, eye, or muscle signals.
First, the NPG Lite learns commands from your regular IR remote, such as Power, Volume, or Channel. Once the commands are saved, you can trigger them using different gestures.
For example, you can use a blink to send a command or a muscle gesture to move between commands.
You can also control everything manually from a web browser if you don't want to use BCI signals.
The system lets you save up to 5 different remotes, with 10 commands for each remote, giving you plenty of commands to experiment with.
Supplies
Here's everything you need to build it:
How It Works?
The BCI IR Remote works in three simple steps:
Learn the Remote
Point your regular remote at the IR Transceiver and press a button. NPG Lite captures and saves the IR signal.
Detect Your Gesture
NPG Lite reads your brain, eye, or muscle signals through the electrodes and detects the gesture you make.
Send the Command
When you trigger Shoot IR, the IR Transceiver sends the saved signal to your device.
You can also use different gestures to move between commands, switch between remotes, and select the command you want to send.
Connect IR Transceiver
First, let's give your NPG Lite the ability to receive and send IR signals.
Using the Adafruit Cable
If you're using the Adafruit 4-pin JST PH to JST SH / STEMMA QT cable, connecting the IR transceiver is super easy.
- Plug one end of the cable into the Adafruit IR Transceiver.
- Plug the other end into the NPG Lite.
- That's it! Your IR transceiver is connected and ready to use.
No soldering, breadboard, or individual wire connections needed.
Using Your Own Wires
Don't have the Adafruit cable? No problem!
Connect the wires manually as follows:
- OUT → GPIO 23
- IN → GPIO 22
- GND → GND
- VIN → 3V3
Quick Note: On the NPG Lite, the pins are labeled SDA and SCL. These correspond to GPIO 23 and GPIO 22, respectively. For this project, we're using them as regular GPIO pins for the IR transceiver — not for I²C communication.
Once everything is connected, you're ready to move on to the next step!
Check the IR Transceiver
Before we start recording remote commands, let's make sure the IR Transceiver is connected and working properly.
The transceiver has three LEDs that help you check its status:
- 🟢 Green Power LED: Lights up when the transceiver is receiving power.
- OUT LED: Flashes when the NPG Lite sends an IR signal.
- IN LED: Flashes when the NPG Lite receives an IR signal.
To test the connection, press the user button on the NPG Lite to send a saved IR command.
The OUT and IN LEDs should flash once.
If the green power LED is on but the OUT and IN LEDs don't flash, check the connections to GPIO 22 and GPIO 23.
Flash the BCI IR Remote Firmware
There are two ways to get the firmware onto your NPG Lite:
- Web Flasher — quick and easy
- Arduino IDE — best if you want to modify the project
Let's start with the easy way.
Using the Web Flasher
Open:
Then:
- Turn on your NPG Lite.
- Make sure the battery cable is connected.
- Connect it to your computer using USB Type-C.
- Click Connect.
- Select USB JTAG.
- Click Get from GitHub.
- Select BCI-IR-Remote.
- Flash the firmware.
Once it's finished, unplug the USB cable.
Your NPG Lite is now ready to become a remote-control wizard.
Arduino IDE
If you prefer to flash the firmware using Arduino IDE, follow these steps:
- Download and install Arduino IDE.
- Open Tools → Manage Libraries and install:
- IRremoteESP8266 (tested with version 2.9.0)
- Adafruit NeoPixel
- ESP32 version 3.2.0 by Espressif Systems.
- Open Tools → Board → Boards Manager
- Download the NPG-Lite-Arduino-Firmware repository.
- Open BCI-IR-Remote.ino from the BCI-IR-Remote folder.
- Select your NPG Lite's COM port from the board selector at the top.
- Go to Tools → Board → ESP32 → ESP32C6 Dev Module.
- Go to Tools → Partition Scheme → Huge APP (3MB No OTA/1MB SPIFFS).
- Click Upload to flash the firmware.
The firmware also works with the default partition scheme, but it leaves very little free space. Using Huge APP gives the firmware more room if you plan to add more features later.
Open the Remote Control App
Now we need a way to teach your NPG Lite your existing remote's commands.
Open the BioAmp Arduino Firmware Explorer and navigate to:
IR-Transceiver → Web App
Open BioAmp Arduino Firmware Explorer
You can also download the project and open index.html directly.
Use Chrome, Edge, Brave, or another browser that supports Web Bluetooth. Firefox and Safari aren't supported for this setup.
Teach It Your Remote
Now that the IR transceiver is working, it's time to teach the NPG Lite your remote's commands.
Connect to the NPG Lite
- Click Connect in the web app.
- Select NPG-IR from the list.
- Click the lock icon to unlock the setup.
Create a Remote
- Click the + button next to any of the five remote slots.
- Give your remote a name, such as TV Remote.
Each remote has 10 command slots that you can fill with your favorite buttons.
Record Your Commands
- Open the remote you just created.
- Click + on an empty command slot.
- Point your original remote toward the IR transceiver.
- Press the button you want to record.
- Give the command a name.
- Save it.
You can record any buttons you need, such as:
- Power
- Volume Up / Down
- Channel Up / Down
- Mute
- Play / Pause
Repeat the process for all the commands you want to save.
Once you're done, click the lock icon again to lock the setup.
Try Your New Remote
Before we bring brain signals into the mix, let's make sure the IR control works.
Click the Send button next to any saved command.
If your device responds, congratulations — your NPG Lite has learned its first remote command!
You can also use the physical button on the NPG Lite:
- Short press: Fire the selected command
- Hold for 1.5 seconds: Start recording into the open remote
Control the Remote With BCI
Now you can control the remote using your brain, eye, or muscle signals instead of clicking buttons.
- Forward: Move to the next command.
- Backward: Move to the previous command.
- Shoot IR: Send the selected command.
- Switch Remote: Move to the next saved remote.
Simply use your signals to select a command and send it to your device.
Set Up Your BCI Controls
Now let's control the saved commands using brain, eye, or muscle signals.
Connect the electrodes
- Clean your forehead and behind your ears.
- Attach the BioAmp cables to the gel electrodes.
- Positive → forehead
- Negative → behind one ear
- Reference → behind the other ear
- Connect them to A0P, A0N, and REF on NPG Lite.
Choose your signal
You can use:
- EEG: focus, blinking, or jaw clenching
- EMG: muscle clenching
- EOG: blinking
Open Controls in the app and select your channel, signal type, gesture, and threshold.
Use the live signal bar to adjust the threshold so the gesture is detected reliably.
You can assign gestures to:
- Forward — move to the next command
- Backward — move to the previous command
- Shoot IR — send the selected command
- Switch Remote — move to another saved remote
Control Your Device
Select the remote you want to use.
Use your gestures to move through the saved commands and select the one you want.
When you trigger Shoot IR, NPG Lite sends the saved IR signal to your device.
You can also use the browser app manually by clicking the Send button.
Your saved remotes and commands stay on NPG Lite, so you can use them again later.
You're Done!
Your NPG Lite can now learn IR commands and control your devices using brain, eye, or muscle signals.
Try different gestures and create your own hands-free remote.