Control the Flame of a Candle Using Your Focus (EEG)
by Upside Down Labs in Circuits > Sensors
464 Views, 7 Favorites, 0 Comments
Control the Flame of a Candle Using Your Focus (EEG)
.png)
Imagine controlling the flame of a virtual candle using just your focus!!
This project uses BioAmp EXG Pill to record EEG signals and use them get real time visual feedback on Chord Web.
But before moving forward, let's get familiar with BCI and EEG.
What is electroencephalography (EEG)?
Electroencephalography (EEG) is a method to record an electrogram of the spontaneous electrical activity of the brain. It is typically non-invasive, with the EEG electrodes placed along the scalp (commonly called "scalp EEG") using the International 10–20 system.
What is Brain-Computer Interface (BCI)?
A brain-computer interface (BCI), sometimes called a brain-machine interface (BMI), is a direct communication link between the brain's electrical activity and an external device, most commonly a computer or robotic limb.
How does this game work?
When we focus, our brain generates more beta brainwaves, typically in the frequency range of 13 to 30 Hz. These brainwaves are associated with active thinking, problem-solving, and sustained attention. The more intensely we concentrate, the more prominent the beta wave activity becomes which are then being used to control the flame of the candle in Chords Web.
In neurotechnology applications, such as brain-computer interfaces, this natural response of the brain can be used to interact with external devices like controlling the brightness of a candle flame based on the level of focus, making brain activity visually and interactively accessible.
Supplies
HARDWARE:
1 x BioAmp EXG Pill
1 x BioAmp Cable v3
3 x Gel Electrodes
3 x Jumper Cables
1 x Arduino Uno R4 Minima with USB Cable (You can also use any other microcontroller board with an ADC)
1 x Nuprep Skin Preparation Gel
1 x Wet wipe
1 x Brain BioAmp Band (optional)
1 x Electrode Gel (only if using Brain BioAmp Band)
1 x Laptop (do not connect to charger while recording the EEG signals)
SOFTWARE:
- Arduino IDE: : https://www.arduino.cc/en/software
Which kit to buy?
You can get any of the kit mentioned below from our online stores (Shipping Worldwide)
- DIY Neuroscience Kit - Pro (2025 Edition) (DigiKey | Tindie | Robu | Amazon India | Upside Down Labs Store)
- DIY Neuroscience Kit - Basic (DigiKey | Tindie | Robu | Amazon India | Upside Down Labs Store) and Arduino Uno R4 Minima
- BioAmp EXG Pill (DigiKey | Tindie | Robu | Upside Down Labs Store), Nuprep Skin Preparation Gel (Tindie | Upside Down Labs Store) and Arduino Uno R4 Minima
- BioAmp EXG Pill - EXG Explorer Pack (Tindie | Mouser | Robu | Amazon India | Upside Down Labs Store), Nuprep Skin Preparation Gel (Tindie | Upside Down Labs Store) and Arduino Uno R4 Minima
Assembling BioAmp EXG Pill

If in case you received an unassembled BioAmp EXG Pill from a marketplace/distributor, then you may have to assemble it for this project by soldering the header pins and JST PH 2.0 connector, as shown in the diagram.
Connecting BioAmp Cable

Connect BioAmp Cables to BioAmp EXG Pill as shown.
Skin Preparation

Apply Nuprep Skin Preparation Gel on the skin surface where electrodes would be placed to remove dead skin cells and clean the dirt from the skin surface. After rubbing the skin surface thoroughly, clean it with a wet wipe or an alcohol swab.
About Nuprep Gel:
Nuprep skin preparation gel is a mildly abrasive, highly conductive gel that should be applied before placing the electrodes on the skin to improve measurements. When applied gently, it strips away the top layer of skin and moistens the underlying skin layer, which reduces the skin impedance with minimal skin irritation and discomfort.
Electrode Placements


Let's understand the electrode placements before moving forward in this project. For recording EEG from the prefrontal cortex part of the brain, you have to place the electrodes on your forehead, specifically between Fp1 and Fp2 (refer to the International 10-20 system for recording EEG)
What is the International 10-20 system for recording EEG?
It is an internationally recognized method to describe and apply the location of electrodes in the context of an EEG exam or voluntary lab research. This method was developed to maintain standardized testing methods, ensuring that a subject's study outcomes (clinical or research) could be compiled, reproduced, and effectively analyzed and compared using the scientific method.
Measuring EEG using Gel electrodes:
- Connect the BioAmp Cable to gel electrodes,
- Peel the plastic backing from the electrodes.
- Place the IN+ cable of the BioAmp EXG Pill between the Fp1 and Fp2 positions
- Place IN- on the bony part behind the earlobe on one ear.
- Place REF on the bony part behind the earlobe of the other ear.
Connecting Development Board

Connect both the BioAmp EXG Pills to either Arduino Uno R4 Minima or Raspberry Pi Pico using the jumper cables as directed below:
- VCC to 5V if using Arduino Uno R4 Minima, VCC to 3.3V if using Raspberry Pi Pico
- GND to GND
- OUT to A0
Now connect the development board to the laptop using a USB cable.
Note:
- BE VERY CAREFUL and follow the above diagram while making the connections between your BioAmp EXG Pill & development board, especially the GND and VCC, or else it may damage the sensor.
- There are 2 variants of the BioAmp EXG Pill. The old version is only compatible with 5V, but the latest version is compatible with both 3.3V and 5V development boards. So you can only be able to use Raspberry Pi Pico if using the latest version of BioAmp EXG Pill.
Uploading Firmware
First of all, download Arduino IDE: https://www.arduino.cc/en/software
Now copy and paste the Chords Arduino Firmware in Arduino IDE as per the development board you are using.
If using Arduino Uno R4: https://github.com/upsidedownlabs/Chords-Arduino-Firmware/blob/main/UNO-R4/UNO-R4.ino
If using Raspberry Pi Pico:
Now follow the steps below:
- Navigate to Tools > Board and select your board.
- In the tools menu, choose the correct COM port.
- Upload the code
Running Chords Web

Follow the steps given below to use Chords Web, a web application for recording and visualizing EEG, ECG, EMG or EOG.
- Open a Chromium-based browser like Google Chrome, Microsoft Edge, Opera, Brave, etc.
- Search chords.upsidedownlabs.tech
- Click on Visualize Now.
- At the bottom, you can see buttons to access various applications. Click on FFT Visualizer.
- Here the top segment displays filtered EEG data using a 45Hz low-pass filter to remove noise.
- The bottom segment is divided into two sections:
- Left side → Shows EEG frequency values in Hz.
- Right side → Offers two interactive modes:
- Band Power Mode → Displays real-time EEG band power values.
- Beta Candle Mode → EEG visualization where a glowing candle represents your focus level.
Play the Game
)
Click on Beta Candle Mode and try to maintain your focus without blinking.
As you concentrate, your beta brainwave activity increases, which directly controls the brightness of the candle flame.
The stronger your focus, the brighter the flame becomes—and as your focus fades, the flame gradually dims.
This is a perfect example of a brain computer interface.
The possibilities are endless. What are you doing to make with it?
Let us know what you think about this project in the comment section below.
You can also mail us at support@upsidedownlabs.tech for any kind of support while you are making this project.