Olimex EKG/EMG sheild unable to analysis the data

Started by vamshi krishna reddy, August 28, 2016, 02:33:43 PM

Previous topic - Next topic

vamshi krishna reddy

Hello ,
What is Demo Arduino code going to do ?
(because in my case it is showing a garbage value with weird symbols which is not human readable ,even after setting up the baud rate to 57600 )
Should something ,which is meaningful have to be printed on serial monitor? or is it encrypted such that only Electric guru can understand it ?
because i need to work with the Raw data !!
can you please help me getting the proper serial out(human understandable) put from Arduino serial monitor (from original demo code)?

Thanks in advance,

svan

Would it be possible to post the code which is causing the problem?

LubOlimex

You are probably extracting the data improperly and/or then trying to read it incorrectly. The protocol from our demo program is the same as OpenEEG's firmware 2. This is not standard serial protocol which probably leads to the strange characters. The same protocol is used in EEG-SMT. I haven't done tests with SHIELD-EKG-EMG (or I don't remember if I did) but I remember testing EEG-SMT. I attach a screenshot - it shows a proper stream of data coming from EEG-SMT (it should be similar with SHIELD-EKG-EMG).



I used this terminal program: http://www.der-hammer.info/terminal/

The required settings are visible in the attached screenshot (most importantly the baud rate should be 57 600 and the data should be set to hex).

The demo code that we have provided follows this protocol: http://openeeg.sourceforge.net/doc/modeeg/firmware/modeeg-p2.c

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

svan

> can you please help me getting the proper serial out(human understandable) put from Arduino serial monitor

This code will print 'raw' data from an UNO with Olimex EKG/EMG shield to the Arduino serial monitor.  If you want smaller values so that the data may be displayed on a 320x240 lcd, then divide the values by 4 (i.e.,>>2).  Note that AIN SEL on the Olimex shield is set to A5 (11,12 closed).

/*
* Prints ECG output in Arduino serial monitor
*/

const int analogInPin = A5;
unsigned long LoopTimer = 0;

int sensorValue = 0;

const int LoopTime10000 = 10000;

void setup() {
   Serial.begin(9600);
}

void loop() {
  if (micros() > LoopTimer)
  {
   LoopTimer += LoopTime10000;
   sensorValue = analogRead(analogInPin);           
  // sensorValue = sensorValue >> 2;
   Serial.println(sensorValue);
  }
}

vamshi krishna reddy

Lub/OLIMEX,
I am glad and thanks for your instant reply I can see 'herm.exe' working but is there any way to decode the HEX to numerical(instantaneously to numbers decoded from protocol) to see the patterns and apply some logic/algorithm to analyze.
can you please tell me whether it is possible to actually analyze some actions/movements of EMG(muscular movements) with this module ?

Thanks in advance.




 

vamshi krishna reddy

svan,
Thanks for your reply.
in spite of trying this, I couldn't find the solution to my problem .
the data(numbers) printing on the screen are having a lot of variation even if there is no movement in the organ .(around +/- 250 ) this means something is wrong , either the hardware (or) my usage. 
is there any setting to be done on the board ?
it is being operated in 3.3 v and D9 pin(last two pins) are connected,and the last two vertical pins are also connected.
and anything else ?
should I tune the blue potentiometer kind of thing on the board ?

svan

>in spite of trying this, I couldn't find the solution to my problem

Well, it definitely 'works'.  I know absolutely nothing about emg procurement, but after a few minutes of trying I got the results shown in the following folder: https://www.dropbox.com/s/3ty2c6z377ziozc/emg_1.zip?dl=0.  I used the Olimex settings and arduino ecg code shown in the folder (identical to previous post with >>2 unREMmed).  I used adhesive electrodes; lead placement is shown.  The tracings show baseline, supination/pronation of right forearm, and biceps flexing of the right arm.  They were obtained from a homemade Java app compiled with Processing 3.2.3.  I used a Mac, but the code is cross platform and should also run on Windows if you are unhappy with what you are currently using.

>should I tune the blue potentiometer kind of thing on the board ?
I never found it to be too helpful, mainly because I never understood what it was doing and there seems to be no endpoint.  I tend to leave it alone for that reason.

>3.3 v and D9
For whatever it's worth,  I used 5 v and D4