# Grove – 肌電圖EMG感測器

<figure><img src="/files/zmuqng1KiGV5Ps7RbqRl" alt="" width="369"><figcaption></figcaption></figure>

{% hint style="danger" %} <mark style="color:red;">**注意：**</mark>

* <mark style="color:red;">**電極需確實貼合皮膚。**</mark>
* <mark style="color:red;">**本感測器不能用於醫療目的。**</mark>
  {% endhint %}

### **測量前準備**

#### **1. 把三電極的插頭接到感測器的插座**

<figure><img src="/files/i76fsDHbcQqBQAz5SZZ7" alt="" width="237"><figcaption></figcaption></figure>

#### **2. 三電極的貼片接到手部肌肉**

EMG 感測器在前臂上的標準三電極貼法，用來量測肌肉在收縮時產生的微弱生物電訊號。

* **紅色電極（Signal  + /** **Active）**：\
  主要訊號電極，貼在目標肌肉（如前臂屈肌）上方，接收肌肉活動的電位變化。
* **黑色電極（Signal - / Reference）**：\
  參考電極，貼在同一條肌肉、稍微遠離主要電極的位置，形成差動量測的第二點。
* **白色電極（Ground / GND）**：\
  接地電極，通常貼在較不活躍、較少肌肉動作的位置，用來穩定整體訊號並減少雜訊。

貼片之間的距離約 2～4 公分，有助於提高訊號品質並降低干擾。

<figure><img src="/files/4qSHIB2FCZD0KpwAaVWm" alt="" width="407"><figcaption></figcaption></figure>

#### 3.  Grove 接公 – 母 杜邦線

<figure><img src="/files/bwqqyhinvw4EhGzJAnoK" alt="" width="320"><figcaption></figcaption></figure>

### Grove – 肌電圖EMG感測器模組電路圖

* Raspberry Pi Pico W
* Raspberry Pi Pico W 擴充板
* Grove – 肌電圖EMG感測器
* 公 – 母 杜邦線

{% hint style="success" %}
*<mark style="color:$warning;">**Grove – 肌電圖 EMG 感測器是類比訊號輸入。本範例模組的 SIG 腳位需接至Raspberry Pi Pico擴充板 A0/D26 腳位。**</mark>*
{% endhint %}

<figure><img src="/files/o8t49B772Veowsxq0bzm" alt="" width="459"><figcaption></figcaption></figure>

### Arduino 程式如下

```
// PICO W 讀取 EMG 類比訊號（A0）

const int EMG_Pin = A1;
int emgValue = 0;
int emgAvg = 0;

void setup() {
  Serial.begin(115200);

  // Pico W ADC = 12-bit (0~4095)
  analogReadResolution(12);

  Serial.println("Pico W EMG Sensor Test");
}

void loop() {
  long sum = 0;

  // 取10次平均降低雜訊
  for (int i = 0; i < 10; i++) {
    sum += analogRead(EMG_Pin);
    delay(3);
  }

  emgAvg = sum / 10;

  Serial.print("EMG: ");
  Serial.print(emgAvg);
  Serial.print("  |  Muscle: ");

  // -------- 強度判斷 --------
  if (emgAvg < 1900) { Serial.println("Relax");}     // 幾乎沒用力  
  else { Serial.println("Strong");}     // 大力收縮或握拳
  
  // --------------------------------

  delay(50);
}
```

### **程式執行結果**

本專案為讀取 EMG 肌電訊號，判斷肌肉是否在瞬間用力。

當肌肉快速收縮時，EMG 數值會突然升高並顯示從「Relax 」變到「Strong」；

若只是長時間持續出力，訊號會逐漸趨於穩定，視為「Relax」。

因此，本專案主要偵測「瞬間肌肉緊繃」的變化，而非長時間維持的用力狀態。

<figure><img src="/files/WOCwPYmX8VApUeRhwvPD" alt="" width="314"><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cavedu.gitbook.io/cavedu/sheng-wu-yi-xue-cai-liao-bao/grove-ji-dian-tu-emg-gan-ce-qi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
