Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 76 additions & 62 deletions hardware/bioamp/bioamp-exg-pill/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,25 @@ Software requirements

.. figure:: ../../../kits/diy-neuroscience/basic/media/arduino-ide.*

- Download Backyard Brains' `Spike Recorder <https://backyardbrains.com/products/spikerecorder>`_ according to the operating system you are using (Windows, OSX, Linux).
- Visit Upside Down Labs `Chords Web <https://chords.upsidedownlabs.tech>`_ to visualize your biosignals directly in the browser.

.. figure:: ../../../kits/diy-neuroscience/basic/media/byb.*
.. figure:: ../../../software/chords/chords-web/media/chords_landing_page.*

.. grid:: 1 1 1 1
:margin: 4 4 0 0
:gutter: 2

.. grid-item::

.. card::

**Getting started with Chords Web**

.. youtube:: IVIPnk9z75g
:align: center
:width: 100%

.. tip:: To know more about Chords Web :ref:`click here<chords>`.

Using the Hardware
*********************
Expand All @@ -93,13 +109,15 @@ Insert the provided BioAmp cable's JST PH connector and header pins from top as

.. figure:: media/assembly-step1.*
:align: center
:alt: Soldering the connector & header pins on BioAmp EXG Pill

`Soldering the connector & header pins on BioAmp EXG Pill`
Soldering the connector & header pins on BioAmp EXG Pill

.. figure:: media/bioamp-exg-pill-soldered.*
:align: center
:alt: After soldering, BioAmp EXG Pill should look like this

`After soldering, BioAmp EXG Pill should look like this`
After soldering, BioAmp EXG Pill should look like this

Step 2 (optional): Configure for ECG/EMG
==========================================
Expand Down Expand Up @@ -132,8 +150,9 @@ For all the examples provided, we are using the A0 pin of Arduino UNO R3. Connec

.. figure:: media/connections-with-arduino.*
:align: center
:alt: Connections with Arduino UNO R3

`Connections with Arduino UNO R3`
Connections with Arduino UNO R3

.. warning:: Take precautions while connecting to power, if power pins are to be swapped, your BioAmp EXG Pill will be fried and it’ll become unusable (DIE).

Expand All @@ -144,8 +163,9 @@ Connect the BioAmp cable to BioAmp EXG Pill by inserting the cable end in the JS

.. figure:: media/connection-with-cable.*
:align: center
:alt: Connections with BioAmp Cable v3

`Connections with BioAmp Cable v3`
Connections with BioAmp Cable v3

Step 5: Skin Preparation
===========================
Expand Down Expand Up @@ -215,15 +235,28 @@ the EMG signals.

After opening the serial plotter make sure to select the baud rate to 115200.

.. tip:: Visit the complete documentation on how to :ref:`How to upload the code <muscle-bioamp-arduino-firmware-code-upload>`.

.. important:: Make sure your laptop is not connected to a charger and sit 5m away from any AC appliances for best signal acquisition.

Visualizing the EMG signals
----------------------------

For visualizing the EMG signals, use `Chords Web <https://chords.upsidedownlabs.tech/>`_ for quick and hassle-free real-time biosignal visualization—right from your browser, without installing any software.

.. figure:: ../../../software/chords/chords-web/media/chords_emg_signal.*
:align: center
:alt: Visualizing EMG signals on Chords Web

Visualizing EMG signals on Chords Web

Now flex your arm to visualize the muscle signals in real time on your laptop.

.. figure:: media/EMGEnvelop.*
:align: center
:alt: Visualizing EMG signals on Arduino IDE v1.8.x

Visualizing EMG signals on Arduino IDE v1.8.x

Step 6: Measuring ElectroCardioGraphy (ECG)
=============================================
Expand Down Expand Up @@ -277,15 +310,29 @@ the signals.

After opening the serial plotter make sure to select the baud rate to 115200.

.. tip:: Visit the complete documentation on how to :ref:`How to upload the code <heart-bioamp-arduino-firmware-code-upload>`.

.. important:: Make sure your laptop is not connected to a charger and sit 5m away from any AC appliances for best signal acquisition.

Visualizing the ECG signals
-----------------------------

For visualizing the ECG signals, use `Chords Web <https://chords.upsidedownlabs.tech/>`_ for quick and hassle-free real-time biosignal visualization—right from your browser, without installing any software.

.. figure:: ../../../software/chords/chords-web/media/chords_ecg_signal.*
:align: center
:alt: Visualizing ECG signals on Chords Web

Visualizing ECG signals on Chords Web


Sit back, relax and see your ECG signals in real time on your laptop.

.. figure:: media/bioamp-Exg-Pill-ECG.*
:align: center
:alt: Visualizing ECG signals on Arduino IDE v1.8.x

Visualizing ECG signals on Arduino IDE v1.8.x

Step 7: Measuring Electrooculography (EOG)
================================================
Expand Down Expand Up @@ -337,15 +384,29 @@ the signals.

After opening the serial plotter make sure to select the baud rate to 115200.

.. tip:: Visit the complete documentation on how to :ref:`How to upload the code <eye-bioamp-arduino-firmware-code-upload>`.

.. important:: Make sure your laptop is not connected to a charger and sit 5m away from any AC appliances for best signal acquisition.

Visualizing the EOG signals
------------------------------

For visualizing the EOG signals, use `Chords Web <https://chords.upsidedownlabs.tech/>`_ for quick and hassle-free real-time biosignal visualization—right from your browser, without installing any software.

.. figure:: ../../../software/chords/chords-web/media/chords_eog_signal.*
:align: center
:alt: Visualizing EOG signals on Chords Web

Visualizing EOG signals on Chords Web


Move your eyes up-down or left-right to see your EOG signals in real time on your laptop.

.. figure:: media/bioamp-exg-pill-eog.*
:align: center
:alt: Visualizing EOG signals on Arduino IDE v1.8.x

Visualizing EOG signals on Arduino IDE v1.8.x

Step 8: Measuring Electroencephalography (EEG)
===================================================
Expand Down Expand Up @@ -397,51 +458,34 @@ Uploading the code

Connect Arduino Uno to your laptop using the USB cable (Type A to Type B). Copy paste the Arduino Sketch given below in Arduino IDE v1.8.19 that you downloaded earlier:

:fab:`github;pst-color-primary` `Spike recorder arduino code <https://raw.githubusercontent.com/BackyardBrains/SpikerShield/master/Muscle/Arduino%20Code/SpikeRecorder/SpikeRecorderSpikerShield_V1_1.ino>`_
:fab:`github;pst-color-primary` `EEG Filter Code <https://github.com/upsidedownlabs/Brain-BioAmp-Arduino-Firmware/blob/main/02-eeg-filter/02-eeg-filter.ino>`_

Go to ``tools`` from the menu bar, select ``board`` option then select Arduino UNO. In the same menu,
select the COM port on which your development board is connected. To find out the right COM port, screen
disconnect your board and reopen the menu. The entry that disappears should be the
right COM port. Now upload the code.

.. important:: Make sure your laptop is not connected to a charger and sit 5m away from any AC appliances for best signal acquisition.
.. tip:: Visit the complete documentation on how to :ref:`How to upload the code <brain-bioamp-arduino-firmware-code-upload>`.

.. important:: Make sure your laptop is not connected to a charger and sit 5m away from any AC appliances for best signal acquisition.

Visualizing the EEG signals
-------------------------------

Open the Spike Recorder software. When the Spike Recorder starts, it will start recording from your microphone. To change that, go to the settings by clicking
the first icon on the top left corner of the screen, select the COM port on which your Arduino UNO is connected and click on connect.

.. figure:: ../../../kits/diy-neuroscience/basic/media/spike-recorder-configurations.*
:align: center

`Spike Recorder settings`

Mute the speakers and apply the 50Hz notch filter by clicking on the checkbox as shown in the screenshot above. You should
set the low band pass filter to 1Hz and high bandpass filter to 40Hz as we are only recording the EEG signals which range between
these frequencies.

Now everything is configured and connected. So close the settings window and start recording EEG signals.
For visualizing the EEG signals, use `Chords Web <https://chords.upsidedownlabs.tech/>`_ for quick and hassle-free real-time biosignal visualization—right from your browser, without installing any software.

.. figure:: ../../../kits/diy-neuroscience/basic/media/bioamp-exg-pill-eeg.*
.. figure:: ../../../software/chords/chords-web/media/chords_eeg_signal.*
:align: center
:alt: Visualizing EEG signals on Chords Web

`EEG signals being visualised in Spike Recorder`
Visualizing EEG signals on Chords Web

The signals that you can see on the screen right now are originating from prefrontal cortex part of your brain and propagating through all the layers to the surface of your skin.

To record these EEG signals, you have placed the electrodes on the forehead (Fp1 & Fp2), then BioAmp EXG Pill is amplifying those signals so that we can detect it and finally sending it to the ADC (Analog to Digital Convertor) of your Arduino Uno. Ultimately the signals are being visualized in Spike Recorder software.
You have placed the electrodes on the forehead (Fp1 & Fp2), the BioAmp EXG Pill is amplifying those signals so that we can detect it and finally sending it to the ADC (Analog to Digital Convertor) of your Arduino Uno and the signals are being visualized in Chords Web.

We hope everything is clear now and you understand how the signals are propagating from your brain to the screen of the laptop.

**Features of Spike Recorder that you can explore:**

- Increase or decrease the scale of the Y axis by clicking on the + and - icons respecitively that is present on the left side of the graph.
- Increase or decrease the X axis timescale by sliding up and down on the scroll wheel of the mouse.
- Visualize the FFT graph by clicking on the FFT icon on top left size of the screen.
- Record the data in .wav format by clicking the record icon on the top right corner. You can convert this data in any other format according to your project requirements.
- Listen to the signals by clicking the volume icon on the top right corner. No don't smile right now, that's how your brain sounds like :P

Glimpses of previous versions
*******************************

Expand Down Expand Up @@ -558,33 +602,3 @@ Project ideas & tutorials

These are some of the project ideas but the possibilities are endless. So create your own Human Computer Interface (HCI) and
Brain Computer Interface (BCI) projects and share them with us at [email protected]

Software tutorials
********************

.. grid:: 1 1 1 1
:margin: 4 4 0 0
:gutter: 2

.. grid-item::

.. card::

**1. Getting started with Backyard Brains' Spike Recorder**
^^^^

.. youtube:: QzZh243-Ac8
:align: center
:width: 100%

.. card::

**2. Getting started with Brainbay**
^^^^

.. youtube:: 8vKYAg9C8Jg
:align: center
:width: 100%



22 changes: 11 additions & 11 deletions software/bioamp/brain-bioamp-arduino-firmware/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Before you start using the kit, please download or open the following:
- We will use Chords Website to visualize the Brain Signals!
- Open this website: `Chords Web <https://chords.upsidedownlabs.tech>`_

.. _Connect Your Hardware:
.. _brain-bioamp-arduino-firmware-connect-hardware:

Step 3: Connect Your Hardware
===============================
Expand Down Expand Up @@ -132,7 +132,7 @@ Make sure the sticky side of electrodes touches your skin firmly.

- **Using BioAmp Band:** For BioAmp Band, refer to the following documentation: :ref:`Using BioAmp Bands <using-bioamp-bands>`

.. _How to upload the Code to Arduino:
.. _brain-bioamp-arduino-firmware-code-upload:

Step 5: How to upload the Code to Arduino
============================================
Expand All @@ -148,7 +148,7 @@ Step 5: How to upload the Code to Arduino
- To try filtered signal: open ``02-eeg-filter.ino``

.. note::
You'll find all the experiments listed below, each with :ref:`step-by-step instructions<experiments step by step>`. Just scroll to the one you're working on to get started with the right setup.
You'll find all the experiments listed below, each with :ref:`step-by-step instructions<brain-bioamp-arduino-firmware-exp-list>`. Just scroll to the one you're working on to get started with the right setup.

5. Connect Your Arduino

Expand Down Expand Up @@ -187,7 +187,7 @@ Step 5: How to upload the Code to Arduino

- Remember to close the **Serial Monitor & Serial Plotter** in **Arduino IDE** before starting the Chords Visualizer.

.. _Visualize Your Brain Signals!:
.. _brain-bioamp-arduino-firmware-visualize-signals:

Step 6: Visualize Your Brain Signals!
============================================
Expand All @@ -205,7 +205,7 @@ Step 6: Visualize Your Brain Signals!

🎉 Now sit still and let your mind wander—or blink and shift your gaze—you’ll see real‑time EEG waves on the screen!

.. _experiments step by step:
.. _brain-bioamp-arduino-firmware-exp-list:

Let's explore all the experiments step by step
***********************************************
Expand Down Expand Up @@ -241,16 +241,16 @@ Let's explore all the experiments step by step

**3. Perform the Hardware**

- Refer to wiring as per instructions given in :ref:`Connect Your Hardware<Connect Your Hardware>`
- Refer to wiring as per instructions given in :ref:`Connect Your Hardware<brain-bioamp-arduino-firmware-connect-hardware>`

**4. Firmware Upload**

- For this project, navigate to the repository folder (Brain-BioAmp-Arduino-Firmware/01-fixed-sampling) and select ``01-fixed-sampling.ino``.
- To upload firmware, refer to :ref:`How to upload the Code to Arduino<How to upload the Code to Arduino>`
- To upload firmware, refer to :ref:`How to upload the Code to Arduino<brain-bioamp-arduino-firmware-code-upload>`

**5. Visualize your signal**

- Follow the steps given in :ref:`Visualize Your Brain Signals!<Visualize Your Brain Signals!>`
- Follow the steps given in :ref:`Visualize Your Brain Signals!<brain-bioamp-arduino-firmware-visualize-signals>`

**6. Running & Observing Results**

Expand Down Expand Up @@ -321,16 +321,16 @@ Let's explore all the experiments step by step

**3. Perform the Hardware**

- Refer to wiring as per instructions given in :ref:`Connect Your Hardware<Connect Your Hardware>`
- Refer to wiring as per instructions given in :ref:`Connect Your Hardware<brain-bioamp-arduino-firmware-connect-hardware>`

**4. Firmware Upload**

- For this project, go to the repository folder (Brain-BioAmp-Arduino-Firmware/02-eeg-filter) and select ``02-eeg-filter.ino``.
- To upload firmware, refer to :ref:`How to upload the Code to Arduino<How to upload the Code to Arduino>`
- To upload firmware, refer to :ref:`How to upload the Code to Arduino<brain-bioamp-arduino-firmware-code-upload>`

**5. Visualize your signal**

- Follow the steps given in :ref:`Visualize Your Brain Signals!<Visualize Your Brain Signals!>`
- Follow the steps given in :ref:`Visualize Your Brain Signals!<brain-bioamp-arduino-firmware-visualize-signals>`
- You’ll see a smooth EEG waveform updating at 256 Hz, free of drift and high‑frequency spikes.

**6. Running & Observing Results**
Expand Down
Loading