Skip to content

Commit

Permalink
Merge pull request #445 from dtischler/main
Browse files Browse the repository at this point in the history
hr-hrv block fixes
  • Loading branch information
dtischler authored Feb 7, 2025
2 parents 0ff7ce2 + bde1f48 commit a0a6c59
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions novel-sensor-projects/ecg-hrv-block-arduino-portenta.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ The ECG signal can also be combined with data from an accelerometer for enhanced

The pads should be connected as follow:

Yellow pad to the left
Red pad to the right
Green pad below the red pad
- Yellow pad to the left.
- Red pad to the right.
- Green pad below the red pad.

> Note: Remember to disconnect the AC from the laptop before sampling.
Expand All @@ -80,7 +80,7 @@ Close the Serial Monitor and run `edge-impulse-data-forwarder`.

Select the Edge Impulse project and check that the frequency shows `[SER] Detected data frequency: 50Hz`.

Go to https://studio.edgeimpulse.com/studio/<Your-Project-ID>/acquisition/training
Go to [https://studio.edgeimpulse.com/studio/Your-Project-ID/acquisition/training](https://studio.edgeimpulse.com/studio/Your-Project-ID/acquisition/training)

Select **Length 120.000 ms** and take around 10 to 20 samples for each category to classify. For example, regular working versus stressed. Set aside 10% of the samples for testing.

Expand All @@ -102,8 +102,6 @@ Frequency-domain features are: Raw VLF Energy, Raw LF Energy, Raw HF Energy, Raw

I have used ECG, filter preset 1, window size 40 and no HRV features.

![](../.gitbook/assets/ecg-hrv-block-arduino-portenta/wearable-1.jpg)

## Model Training

The training could require some parameters to be modified from the defaults. I have found the following parameters to work well for my dataset, with a 89.3% accuracy. Training cycles **40**, learning rate **0.005**, bacth size **30** and no auto weight.
Expand All @@ -130,6 +128,8 @@ Now you will be able to use the model library with your own code. A sample ECG m

> Note: If Arduino Portenta shows `Exit status 74`, double click "Reset", and select the correct port.
![](../.gitbook/assets/ecg-hrv-block-arduino-portenta/wearable-1.jpg)

## Final Notes

Thanks to machine learning, monitoring ECG signals no longer requires transmitting data to a remote computer for expert analysis. Instead, subtle health conditions can be detected by small, offline, wearable devices equipped with machine learning capabilities. These devices can identify over-stressed workers who may be unable to perform their tasks effectively, thus preventing serious harm or consequences.
Expand Down

0 comments on commit a0a6c59

Please sign in to comment.