/ECG-EOG-game

Simple game controlled by ECG and EOG

Primary LanguageC#

ECG-EOG-game

Simple t-rex game controlled by ECG and EOG

게임 GIF


ECG

3-lead electordes were positioned.

image

We follow the Pan Tompskins Algorithm to implement ECG QRS Complex detector.

image

So bpm come from R-R intervals.

$BPM = \frac{60 * f_s}{mean-of-R-R-intervals}$

EOG

3-lead electoreds were positioned.

The two electrodes were attached to the up-and-down side of left eye.

And theground was on the left side of left eye.

image

The t-rex character move up(down) when the eyeballs go up(down).

Analog Filter

Use the active band-pass filter (0.159Hz ~ 15.9Hz) to pass only LOW frequency.

Digital Filter / MSP 430

sample-rate = 250Hz

ECG : 3rd order Butterworth bandpass filter (5 ~ 30Hz) to remove the power noise

EOG : 3rd order Butterworth bandpass filter (5 ~ 10Hz) to remove the power noise

GUI

C# .NET used. Mitov PlotLab Basic used.

  • The speed of the obstacle is determined by bpm.
  • The character moves with the movement of the eyeballs.

Matlab

At first, We implement the preprocessing algorithm(pan tompkins) in the Matlab.

But, CPU memory was insufficient.


Sensor

Custom analog circuit(+MSP 430) for Bio-signal sensor

OP AMP : TLV2372QDRG4Q (Op Amp Dual Low Power Amplifier)

Software

LTspice(circuit simulation)

Matlab(preprocessing)

C++(MSP430 embedding system)

C# (GUI implementation)

Reference

Biopac(https://www.biopac.com/application-note/ecg-ekg-electrocardiography-12-6-3-lead/)

ECG(https://journals.pan.pl/dlibra/publication/118163/edition/102773/content)

EOG(https://electrooculography.wordpress.com/)

Pan Tomkins(https://kr.mathworks.com/matlabcentral/fileexchange/45840-complete-pan-tompkins-implementation-ecg-qrs-detector)

Mitov Plotlab(https://mitov.com/products/plotlab#overview)

T-rex game(https://github.com/mooict/T-Rex-Endless-Runner-Game-in-Windows-Form)