Skip to content

Commit 8255ec6

Browse files
committed
EMG docs: temporal cleanup for merge
1 parent dbd9911 commit 8255ec6

File tree

1 file changed

+2
-78
lines changed

1 file changed

+2
-78
lines changed

docs/Projects/EMG.md

Lines changed: 2 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -126,101 +126,25 @@ Electrode connection to SensEdu
126126

127127
### Amplifier Circuit
128128

129-
As a base of the circuit SensEdu offers Dual-Channel Instrumentation Amplifier [AD8222](https://www.analog.com/media/en/technical-documentation/data-sheets/ad8222.pdf). On the shield we have x2 of them, which allows having **up to x4 EMG channels**. All channels are accessible from female 2.54mm sockets:
130-
* J9: 1st Channel of U5 → outputs MIC5 - A0 - ADC12_INP4
131-
* J11: 2nd Channel of U5 → outputs MIC6 - A2 - ADC12_INP9
132-
* J12: 1st Channel of U6 → outputs MIC7 - A11 - ADC12_INP0
133-
* J20: 2nd Channel of U6 → outputs MIC8 - A7 - ADC1_INP16
134-
135-
refer to table in Arduino
136-
137-
Give here details about ADCs for Arduino sketch.
138-
139-
<img src="{{site.baseurl}}/assets/images/amp_circuit.png"/>
140-
{: .text-center .mb-1}
141-
142-
SensEdu Amplification Circuit
143-
{: .text-center .mt-0 .fw-500}
144-
145-
Amplifier, script, basic circuit, converter, all required elements
129+
### ADC Configuration
146130

147131
### Data transfer
148132

149-
Page 2747 Figure 793 of [STM32H747 Reference Manual] OTG_FS and USB0 at [Arduino GIGA R1 Schematics].
150-
151-
### Arduino Sketch
152-
153133
## Signal Processing
154134

155-
MATLAB magic
156-
157135
## Testing
158136

159137
## Showcase
160138

161139
## Possible improvements
162140

163-
## Sources
164-
165-
## Appendix: data recordings for improvements
166-
167-
168-
SensEdu is equipped with x2 [AD8222] Instrumentation Amplifier ([datasheet]).
169-
170-
Each Amplifier is dual-channel, so we have 4 channels in total. All channels are accessible from the following Jumpers:
171-
* J9: 1st Channel of U5 → outputs MIC5 - A0 - ADC12_INP4
172-
* J11: 2nd Channel of U5 → outputs MIC6 - A2 - ADC12_INP9
173-
* J12: 1st Channel of U6 → outputs MIC7 - A11 - ADC12_INP0
174-
* J20: 2nd Channel of U6 → outputs MIC8 - A7 - ADC1_INP16
175-
176-
Refer to the [ADC mapping table](/SensEdu/Library/ADC/#adc_mapping) for better understanding.
177-
178-
Circuit for each of the amplifier:
179-
180-
<img src="{{site.baseurl}}/assets/images/amp_circuit.png"/>
181-
{: .text-center}
182-
183-
Electrode mapping:
184-
* Tip: Red
185-
* Ring: Blue
186-
* Sleeve: Black
187-
188-
## Test
189-
190-
WASD Dark Souls for 4 channels?
191-
192-
## Capacitive input
193-
ignore some of the first samples for ADC stabilization
194-
195-
https://devzone.nordicsemi.com/f/nordic-q-a/80796/adc---first-read-is-always-wrong/336435
196-
197-
## History
198-
A 1-second history allows the filter to capture multiple cycles of low-frequency components, such as 10Hz (1 cycle every 100ms) or even lower frequencies (e.g., motion artifacts below 10Hz). This improves:
199-
200-
The filter's ability to attenuate noise and artifacts.
201-
The preservation of desired signal components, especially in the lower frequency band.
202-
203-
A longer history allows low-pass filters (used in envelope detection) to smooth the rectified signal over a larger time frame, resulting in a more robust and stable envelope.
204-
For example, a 5Hz low-pass filter requires at least 200ms of data for one full cycle. With a 1-second history, the envelope will be less sensitive to short-term fluctuations or noise.
205-
206-
Sliding Overlapping Windows
207-
208-
Use a 1-second buffer for filtering and envelope detection, but process overlapping chunks (e.g., update every 40ms). This ensures that decisions are updated frequently without sacrificing the filtering accuracy of the longer window.
209-
210-
## Good study on perfect high pass value
211-
https://www.bu.edu/nmrc/files/2010/06/103.pdf
212-
213-
## Good Resources:
141+
## Resources:
214142
* https://www.nature.com/articles/s41597-022-01484-2
215143

216144
## Sources:
217145
* https://youtu.be/_k6QINRcdV4?si=rnil7B-ZlqmRCGSN
218146
* https://youtu.be/ApaPlKPb4ek?si=rHncr0b2XipqN83i
219147

220-
## Improvements
221-
* Implement filtering in hardware, you can extend SensEdu with another custom shield which will make half of current signal processing unnecessary greatly reducing latency and required computations. In addition, use right leg drive to decrease noise and offset.
222-
* mkm
223-
224148
[Byte Size Med]: https://www.youtube.com/channel/UCZghvlgylH3r_CWfA18eFRg
225149
[Action Potential]: (https://en.wikipedia.org/wiki/Action_potential)
226150
[AD8222]: https://www.analog.com/en/products/ad8222.html?doc=ad8222-KGD.pdf

0 commit comments

Comments
 (0)