LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ECG labview wireless xbee s1 and arduino uno interface

Hi
My group and I are currently doing a project which requires the transmission
of wireless ECG signal to labview. The components which we decided to use complete the task are:
2 x Xbee (Zigbee S1) modules,
1 x Arduino uno
 
1 Xbee module attached to the Arduino had been programmed with Arduino. However, due to our
lack of understanding of how Arduino functions, we are unsure if the coding for the interface is valid
for transmitting the Analog ECG signal wirelessly to the other Xbee module connected (USB cable) to
the computer and later displayed onto waveform using labview.
 
The coding used is as follow:
 
#include "LabVIEWInterface.h"
int dato =0;
const int analogInPin = A0;
int sensorValue = 0;
void setup()
{
Serial.begin
(9
600);
}
void loop()
{
sensorValue = analogRead(analogInPin);
Serial.println(sensorValue);
delay(1);
checkForCommand();
{
dato = analogRead(0);
String cadena ="S0>";
String cadena1 = cadena + dato;
Serial.println (cadena1);
delay (10);
}
if(acqMode==1)
{
sampleContinously();
}
}
 
 
the labview which we have constructed is attached, but we are unclear which
works for the coding as stated earlier in the post.
 
We hope to get some enlightenment.
 
Thank you.
Download All
0 Kudos
Message 1 of 3
(4,070 Views)

How is the signal wired in on both sides?  I'm assuming you've got a sensor going into an analog-input on the "remote" XBee? 

How are you reading that data on the arduino?  Is the arduino being used as a serial port?

 

There's no analog-out on those XBees (only non-digital output is a PWM signal), so you'll need to read/parse the data packet coming back from the remote XBee.

0 Kudos
Message 2 of 3
(4,047 Views)

Hi we appreciate your prompt reply!

 

 We connected the output of our ecg signal directly from the circuit to the Analog input of the Arduino via Analog IN A0 port, no sensor is used before that. We only have connection on one side there is no analog out connection, because we are using the arduino shield to connect to the arduino board.I have attached the photo of the ECG circuit connected with arduino. 

Screen Shot 2015-10-28 at 1.14.14 PM.png

 

Both Xbees are configured in AT mode to make them transparent at baud rate of 9600 and the other xbee with USB serial connector is plugged into the PC. Looking at the LED indicator on the arduino shield, the DIN and DOUT lights up and it indicates information transmitted. But when we check the signal received by the Xbee in the USB explorer we get random numbers displayed in the serial monitor. We connected the arduino-xbee to PC to verify the type of analog signal we get from the circuit and we realized that we get random numbers from both transmitter side(arduino) and receiver side(xbee-usb).I have also attached the output data we get from both the XBee -arduino(transmitter) and Xbee-(receiver) USB explorer. Now we are not sure if we are transmitting and receiving correctly.

Screen_Shot_2015-10-28_at_1.jpg

We are not sure if we are doing it correctly and we desperately need help! We would appreciate your help in guiding us! 

 

0 Kudos
Message 3 of 3
(4,024 Views)