A Neurofeedback Meditation Journey

by Upside Down Labs in Circuits > Sensors

1116 Views, 16 Favorites, 0 Comments

A Neurofeedback Meditation Journey

11.gif

Ever wondered what your brain and heart are really doing while you meditate?

Say hello to CortEX - an open-source meditation tool that blends mindfulness with brain and heart monitering.

CortEX reads your brainwaves (EEG) and heart signals (ECG) in real time, helping you understand how focused, relaxed, or calm you are while meditating. It shows what’s happening inside your mind and body, So you’re not just guessing anymore.

By turning brain and heart activity into simple, easy-to-read visuals, CortEX makes meditation more personal, more powerful, and backed by real data

In this Instructable, we’ll walk you through how to set it up and start using it, So you can see what’s going on inside and build a deeper, more mindful practice.

Let’s get started!

What is an Electroencephalography (EEG) ?

Electroencephalography (EEG) is a method used to record an electrogram of the brain's spontaneous electrical activity.

What is Electrocardiogram (ECG) ?

Electrocardiogram (ECG) measures the electrical activity of your heart. It tracks how fast and how regularly your heart is beating by placing electrodes on the skin.

How does this application works?

In CortEX, ECG tracks your heart rate and heart rate variability (HRV) in real time to give you insights into your stress and relaxation. Meanwhile, EEG helps identify your mental state-whether you're focused, relaxed, drowsy, during meditation.

This connects wirelessly to the Neuro PlayGround Lite device, which records your brain (EEG) and heart (ECG) signals in real time. It streams this data to a web app that visualizes your brainwaves and heart metrics during meditation.While you meditate, CortEX analyzes your focus, relaxation, and heart rhythms, providing live feedback. After the session, it gives a detailed report to help you understand and improve your mental state.


CortEX application is an open-source free to use software designed to work with Neuro PlayGround Lite. It's a wellness and research tool, not a medical application and should not be treated like one. There is no Warranty, you may use it on your own risk. You agree to the terms if you use the application.


Note: This project is made by Ritika Mishra

Supplies

6(1).png

Hardware:

  1. 1 x NPG Lite
  2. 1 x Vibz Playmate
  3. 7 x BioAmp Snap Cables with baby get elctrodes or 7 x alligator cables with tab electrodes
  4. 1 x Nuprep skin preparation gel
  5. 1 x Alcohol swab
  6. 1 x Laptop

Software:

  1. NPG Lite Flasher
  2. CortEX


About Neuro PlayGround (NPG) Lite:

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. Get yours today!

Skin Preparation

10.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.


Connecting BioAmp Cables

Untitled design(10).png
1.gif
9.gif
Channel Placement
A0PRight Frontal(FP2)
A0NBehind Right Ear
A1PLeft Frontal(FP1)
A1NBehind Left Ear
A2PLeft Chest
A2NBeside A2P
REFRight chest

Alternate ECG option: Wrist setup

If chest placement is inconvenient, CortEX supports wrist-based ECG as well:

  1. REF cable → Back of the right hand
  2. Positive (A2P) → Front of the right wrist
  3. Negative (A2N) → Left wrist

Tip: Always clean skin with alcohol wipes before placing electrodes to ensure better signal quality.


Uploading Firmware

NPG Lite Flasher v0.2.0 | Updated UI | One-Click Integration | Flash NPG Lite & ESP32 devices

To enable signal streaming:

  1. Download and open NPG Lite Flasher.
  2. Connect the board via USB.
  3. Select the firmware file.
  4. Click Upload and wait for completion.


Launch CortEX APP

CortEX runs directly in your web browser - no installation required!

  1. Visit the app URL (https://upsidedownlabs.github.io/CortEX/).
  2. After initial load, CortEX works offline.
  3. Ensure Bluetooth is enabled on your laptop.

Connect Your Device Via BLE

Untitled design(7)(1).gif
6.gif

To start streaming:

  1. Power on your NPG Lite device.
  2. Click the “Connect” button in the app.
  3. Select your device from the list.
  4. CortEX will begin receiving EEG and ECG signals in real time.

Exploring CortEX Interface

3.gif

Click the Connect button and begin your journey inward:

  1. Focus on your breath.
  2. Let CortEX track your mental and physiological state in real time.

Once connected, CortEX displays a sleek three-column layout to guide your experience.

Column One – Control & Wellness

The first column is your control center:

  1. Connect/Disconnect your device.
  2. Begin Meditation Session to start real-time feedback.
  3. View inspirational wellness quotes to stay centered and motivated.

Column Two – Brain Insights

This is your EEG dashboard:

  1. A radar chart displays power across five brainwave bands (Delta, Theta, Alpha, Beta, Gamma).
  2. Two line charts stream live EEG signals from the left and right hemispheres.

Column Three – Heart Metrics

Here, CortEX reveals your heart’s inner story:

  1. Live BPM (Beats Per Minute) display at the top.
  2. HRV analysis below, showing metrics like low, high, and average intervals.
  3. A real-time ECG waveform is streamed from your chest or wrist electrodes.

Begin Your Meditation

8.gif
2.gif

Real-Time Feedback: What CortEX Measures

EEG Brainwaves

CortEX reads brainwaves from two frontal electrodes:

Wave Frequency Mental State
Delta 0.5 - 4 Hz Deep sleep, physical restoration
Theta 4 – 8 Hz Meditation, creativity, deep relaxation
Alpha 8 – 12 Hz Calm, peaceful, introspective
Beta 12 – 30 Hz Focused, alert, thinking actively
Gamma 30 – 45 Hz Intensity, memory, peak cognitive processing

All of this is visualized via radar and time-series plots for easy tracking.

Heart Rate & HRV

A high HRV typically indicates parasympathetic dominance, meaning your body is in “rest-and-digest” mode - ideal for meditation.

CortEX tracks HRV in real time, showing:

  1. Trends and outliers
  2. Current stress/calm state

Hemisphere Balance: Mind in Harmony

CortEX measures balance between:

  1. Left Frontal – Logical, analytical, verbal thinking
  2. Right Frontal – Emotional, intuitive, creative processes

Balanced Activity = calm, centered mind

Left-dominant = overthinking, cognitive tension

Right-dominant = emotional drifting, daydreaming

CortEX visualizes this balance in real time via a symmetry meter — helping you stay aligned.

After the Session: Your Neural Journal

When you click End Session, CortEX gives you a powerful summary:

  1. EEG timeline with dominant waveforms
  2. Mental state classification: Focused, Relaxed, Drowsy, Meditative
  3. Session score and key insights

Use this journal to reflect, improve, and track your inner growth.


Under the Hood: Technical Architecture


CortEX is built using modern web technologies:

  1. Next.js + React – Interactive, responsive UI
  2. Web Bluetooth API – Device connection
  3. Web Workers – Real-time signal processing
  4. WebGL + Recharts – Fast, Real time, beautiful visualizations
  5. Tailwind CSS – Clean, adaptive design
  6. Icons - Lucide Icons


State Classification Logic

It classifies your current state using real-time EEG + ECG data — far more reliable than guesswork used in traditional apps.

Feature Traditional Apps CortEX
EEG/ECG Integration Live biopotential signals
Real-Time Feedback Dynamic neurofeedback
HRV Metrics Limited Deep analysis
Open Source Fully customizable
Hemisphere Tracking Brain symmetry
Offline Mode After first load



Conclusion

Assistive meditation and neurofeedback with EEG & ECG | CortEX | Neuro PlayGround (NPG) Lite

For the complete step-by-step tutorial, check out our youtube video

This was just a demonstration of how Neuro PlayGround Lite can record, filter, and process multi - channel signals.

This is just the beginning. We are already working on creating much more interesting brain-computer interfaces.

The possibilities are endless. Drop your feedback in the comments.

Need help? Reach out at support@upsidedownlabs.tech

Troubleshooting

Getting an accurate EEG signal is very crucial for this project to work properly. Please check the link below for the tips for best signal acquisition: https://docs.upsidedownlabs.tech/guides/troubleshoot/tips/index.html

In case a weak EEG signal is detected, then ensure there is good electrode contact with the skin surface and you have prepared the skin using nuprep skin preparation gel properly.

If you face any issues with the Bluetooth connection, then restart NPG Lite and try to reconnect.