Skip to content

Commit

Permalink
Update Muscle BioAmp Candy content
Browse files Browse the repository at this point in the history
  • Loading branch information
bhawnasehgal committed Apr 18, 2024
1 parent c9c28c0 commit 86deb1c
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 25 deletions.
121 changes: 96 additions & 25 deletions hardware/bioamp/muscle-bioamp-candy/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
Muscle BioAmp Candy
#####################

Candy-size affordable muscle sensor for precise EMG sensing.

Overview
*********

A candy-size single-channel ElectroMyography (EMG) sensor for precise recording of muscle signals
at an affordable cost. It is an SMD version of Muscle BioAmp BisCute that can be used to make
amazing Human-Computer Interface (HCI) projects. To record the EMG signals you can use any standalone
ADC like ADS1115 or any microcontroller development board with an ADC of your choice like Arduino
UNO/Nano.
A candy-size single-channel ElectroMyography (EMG) sensor for recording of muscle signals
at an affordable cost. It is an SMD version of :ref:`muscle_bioamp-biscute` that can be used to make
amazing Human-Computer Interface (HCI) projects.

.. figure:: media/Muscle-BioAmp-Candy-front.*
:width: 800
Expand All @@ -31,7 +27,7 @@ Features & Specifications
+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Bandpass filter | 72 – 720 Hz |
+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Compatible Hardware | Any development board with an ADC (Arduino UNO & Nano, Espressif ESP32, Adafruit QtPy, STM32 Blue Pill, BeagleBone Black, Raspberry Pi Pico, to name just a few) |
| Compatible Hardware | Any development board with an ADC (Arduino UNO & Nano, Adafruit QtPy, STM32 Blue Pill, BeagleBone Black, Raspberry Pi Pico, to name just a few) |
+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| BioPotentials | EMG (Electromyography) |
+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Expand Down Expand Up @@ -75,33 +71,108 @@ Images below shows a quick overview of the hardware design.
:align: center
.. figure:: media/dimensions.*
:align: center

**PCB Layout**

.. figure:: media/schematic.*
:align: center

Connecting with Arduino
****************************
**Schematic Diagram**

To get started, you can pair Muscle BioAmp Candy with any development board with an ADC (Arduino UNO & Nano, Espressif ESP32,
Adafruit QtPy, STM32 Blue Pill, BeagleBone Black, Raspberry Pi Pico, to name just a few) or any standalone ADC of your choice.
Contents of the kit
********************

To measure the EMG signals, connect BioAmp Cable v3 with your muscle sensor as shown in the image below:
.. image:: media/kit-contents.*

.. figure:: media/Muscle-BioAmp-Candy-Arduino-EMG-Recording.*
Software requirements
**********************

**CAUTION:** Make sure to follow the above diagram while making the connections between your Muscle BioAmp Candy & Arduino (or any other ADC of your choice), especially the GND and VCC else it may damage the muscle sensor.
- Before you start using the kit, please download `Arduino IDE v1.8.19 (legacy IDE) <https://www.arduino.cc/en/software>`_. Using this you'll be able to upload the arduino sketches on your development board and visualise the data on your laptop.

.. image:: ../../../kits/diy-neuroscience/basic/media/arduino-ide.png

Using the sensor
******************
Using the kit
****************

.. youtube:: lPX2TGBcHOA
:width: 100%
Step 1: Connect Arduino UNO R3
=================================

.. image:: media/arduino-candy-connection.*

Connect VCC to either 5V or 3.3V, GND to GND, and OUT to Analog pin A0 of your Arduino UNO via jumper cables provided by us. If you are connecting OUT to any other analog pin, then you will have to change the INPUT PIN in the arduino sketch accordingly.

**Note:** For demonstration purposes we are showing connections of the sensor with Arduino UNO R3 but you can use any other development board or a standalone ADC of your choice.

.. warning:: Take precautions while connecting to power, if power pins (GND & VCC) are to be swapped, your sensor will be fried and it’ll become unusable (DIE).

Step 3: Connecting electrode cable
========================================

.. image:: media/candy-cable-connection.*

Connect the BioAmp cable to Muscle BioAmp Candy by inserting the cable end in the JST PH connector as shown above.

Step 4: Skin Preparation
===============================================

Apply Nuprep Skin Preparation Gel on the skin surface where electrodes would be placed to remove dead skin cells and clean the skin from dirt. After rubbing the skin surface thoroughly, clean it with a wet wipe.

For more information, please check out detailed step by step :ref:`skin-preparation`

Step 5: Measuring EMG (ElectroMyoGraphy)
===============================================

We have 2 options to measure the EMG signals, either using the gel electrodes or using dry electrode based Muscle BioAmp Band. You can try both of them one by one.

- **Using gel electrodes:**

1. Connect the BioAmp cable to gel electrodes,
2. Peel the plastic backing from electrodes
3. Place the IN+ and IN- cables on the arm near the ulnar nerve & REF (reference) at the back of your hand as shown in the connection diagram.

.. image:: media/candy-emg.*

- **Using Muscle BioAmp Band:**

1. Connect the BioAmp cable to Muscle BioAmp Band in a way such that IN+ and IN- are placed on the arm near the ulnar nerve & REF (reference) on the far side of the band.
2. Now put a small drop of electrode gel between the skin and metallic part of BioAmp cable to get the best results.

**Tutorial on how to use the band:**

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

Some project ideas
********************
.. note:: In this demonstration we are recording EMG signals from the ulnar nerve, but you can record EMG from other areas as well (biceps, triceps, legs, jaw etc) as per your project requirements. Just make sure to place the IN+, IN- electrodes on the targeted muscle and REF on a bony part.

**Uploading the code:**

Connect your Arduino UNO to your laptop using the USB cable (Type A to Type B). Copy paste any one of the arduino sketches given below in Arduino IDE v1.8.19 that you downloaded earlier:

EMG Filter: https://github.com/upsidedownlabs/Muscle-BioAmp-Arduino-Firmware/blob/main/2_EMGFilter/2_EMGFilter.ino

EMG Envelope: https://github.com/upsidedownlabs/Muscle-BioAmp-Arduino-Firmware/blob/main/3_EMGEnvelope/3_EMGEnvelope.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 Arduino Uno is connected. To find out the right COM port,
disconnect your board and reopen the menu. The entry that disappears should be the
right COM port. Now upload the code, & open the serial plotter from the tools menu to visualize
the EMG signals.

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

.. warning:: 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**

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

.. image:: media/using-candy.*

**Video tutorial:**

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

We have curated a playlist for you which consists some awesome project ideas for you to get started with your next HCI project.

.. .. youtube:: https://youtube.com/playlist?list=PLtkEloJ7UnkQIoz1HK4IXWujCB8hKdiKU&si=osloTX71TE7AJ3CF
.. :width: 100%
.. :align: center
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 86deb1c

Please sign in to comment.