Biomedical User Group Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

ECG/EMG signal transmission to labview using arduino + xbee

Hello to all

For a university course project Im currently trying to use a combination of arduino & Xbee to wirelessly transmit EMG/ECG signals to labview and using serial communication/ VISA read function to obtain the sent EMG/ECG data (in serial form, ranging from 0 to 1023). If this part works im planning to process the aquired data using the Biomedical start up kit. Please do give me any tips, hints & suggestions Here are the steps I have taken:

1) I  constructed the EMG circuit using INA128 and OPA2604 (EMG_circuit.pdf). I limited the gain of the circuit so that the signal voltage is within 0 to 3.3V. I also added an offset op amp so that the signal will be within 0 to 3.3V. The Xbee version im using can transmit signals within 0 to 3.3V only.

2) I used 2 arduino boards, 2 xbee shields and 2 xbee radios. A voltage divider circuit is connected to the first arduino. I used the following code to read the voltage values from the voltage divider circuit. Voltage values are converted into serial data ranging from 0 (0V) to 675 (3.3V). This serial data will be transmitted wirelessly.

int potPin = 0;    // select the input pin for the potentiometer

int val = 0;       // variable to store the value coming from the sensor

void setup()

{

  Serial.begin(9600);    // opens serial port, sets data rate to 9600 bps

}

void loop() {

  val = analogRead(potPin); // read the value from the voltage divider

  Serial.println(val);

  delay(1);

}

*The last 'delay' in the code determines the sampling rate we are using for the EMG signal. I have used 1000 samples/sec in order to adhere to Nyquist sampling theory. The max frequency for EMG signal is 500Hz.

3) After uploading the code, I changed the jumpers on the first arduino shield from USB to Xbee. (xbee shield has two jumpers, while uploading code the jumpers need to be placed in the USB position. When transmitting data wirelessly, the jumpers must be placed in the Xbee position). I removed the arduino-USB cable from the computer and powered the arduino using a 9V battery.

4) The second (arduino board + xbee with shield) which serves as the receiver is connected to the computer using the arduino to USB cable. Make sure the atmel atmega328 chip is removed first and the jumpers of the xbee shield are placed on the usb position before connecting the arduino-USB cable to the computer.

5) The following VI (serial_arduino3.vi) reads serial data from the particular COM port where the second (arduino + xbee) is connected to.

Please do give me any tips, hints & suggestions.  I have yet to try transmitting a biosignal.

*In the 3rd attachment (good_reading.jpg) the voltage divider output because the voltage i provided is not stable.

Regards,

Jazlan

Download All
0 Kudos
Message 1 of 6
(19,156 Views)

Very cool posting - thanks for contributing!

Also, check out this nice video article about interfacing an Nonin oximeter module to the Arduino and to a LabVIEW user interface on a PC:

http://www.instructables.com/id/Arduino-Interfaced-with-Nonin-Pulse-Oximeter-OEM/

0 Kudos
Message 2 of 6
(5,179 Views)

Hey,

Cool application!

Could you please also attach sample data file here for us to have a look? For EMG, you could refer to http://decibel.ni.com/content/docs/DOC-8206 for analysis.

ZJ Gu

Thanks!

0 Kudos
Message 3 of 6
(5,180 Views)

Thanks steve & zhijungu.

I have yet to get the whole setup working, as soon as I obtain some results I will post them.The goal of this project is to wirelessly measure EMG signals from  two forearm muscles (extensor carpi radialis longus and flexor digitorum superficialis) while gripping a hand dynamometer. Im interested to see how the power spectrum of the EMG signal from the forearm changes when a person grips a hand dynamometer at various hand grip strength levels, 20%, 50% and 80% of his maximum hand grip strength.

0 Kudos
Message 4 of 6
(5,180 Views)

Hello,

I'm working on a similar project, except that the EMG data is transmitted from the Arduino via Bluetooth and a Bluetooth dongle attached to the laptop will be read as a serial port. I've tested your VI to receive test voltages and graph them out, it worked. I have yet to test the VI when sending actual EMG signals. Was this VI successful in receiving your biosignals?

0 Kudos
Message 5 of 6
(5,180 Views)

hi Jazlan,

       i m also working on same project but instead of EMG m using ECG n planning to go for EEG, i have set  D4 pin of remote xbee as analog i/p also i set IT and IS commands but still i am not geting remote request command response frame and waveform in labview properly...actually right noe i m just sending analog signal ..still not getting..i m giving all AT cmds to remote xbee using labview only..in xctu it os working but i wanna do it in labview.

is there any setting for base xbee to do like IU (UART).. i need ur help..

0 Kudos
Message 6 of 6
(5,180 Views)