This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Connections on AFE4400 kit to see the outputs of IR, Red, and heart rate signals in lab view.

Other Parts Discussed in Thread: AFE4400, AFE4490

Hello,

I have a TI-AFE4400 Evaluation kit and I am using the TI provided AFE44X0SP02EVM GUI to check the HR and SPO2.In the GUI, I am able to see the IR, Red, IR (ambient), Red (ambient) and heart rate signals.            

Now I am planning to check the IR, Red and Heart Rate signals coming out from the AFE4400 board in lab view.       

Can anyone explain me a way to do this I mean where to connect and acquire the signals to get the required signals(IR,Red,HeartRate) in lab view.

Thanks.

  • Hi,

    Can anyone suggest a way to do this.

    Thanks.

  • can someone suggest a method to implement this?

  • Hello Govardhan,

    Unfortunately we do not support LabVIEW.

    The USB of the AFE4400 evaluation module interfaces to the PC as a virtual COM port.

    For implementation using LabVIEW, refer to NI.com for building applications using the VISA serial interface. VISA is a standard for configuring, programming numerous instrumentation systems especially serial interface. You should be able to browse for application examples. 

    I have provided the link for the message communication protocol with AFE4400 evaluation module.

    http://e2e.ti.com/support/applications/high_reliability/f/30/p/273490/955180.aspx#955180

    You can use the message communication protocol to query the evaluation module for configuring the AFE, capture the ADC data (IR, Red pleth data)

    Best Regards.

  • Hello Praveen,

    Yes,I will look into Labview VISA implementation but I am not clear of

    1)How this message protocol(in particular) can be used to make different settings(controls) as it is provided by the TI-AFE4400-GUI.

    2)Can you please try to explain me more clearly about this message protocol utilization for my requirements(To get ADC data continuoulsy (realtime) and how to extract IR,Red signal data,Heart Rate signal data) so that I can plot plot in Labview.

    Thankyou.

  • Hello,
    To use the following communication protocol, you will have to setup a virtual COM port, and write into it serially the settings that you want to change in the EVM. 
    Eg. If you want to change the LED current then you have to send the command to write register in the LED current register according to the communication protocol.

    Secondly, Continuous ADC data reading is not supported in the EVM firmware. But You can achieve this by sending the ADC read command with the highest number of package supported(0xFF), such that it appears to be continuous, or you can send the ADC read command again and again to read continuously.
    To get the data from the received packages, you will have to decode the package using the same communication protocol. In that package you will find the all the channel data each consisting of 3 bytes.


    Hope this helps.

    Regards
    Atul

  • Thanks Atul for the information.

    The AFE4400 GUI has the following register map but 

    Can someone suggest me flow of steps(address and commands ) that are needed

    1)if only the heart rate signal is to be read using the serial communication from Labview,

    2)Timing information (like the waiting time after sending each "Write Register Command")

    3) also what is the difference between LED2STC [15:0] and LED2LEDSTC[15:0].

    4) What baudrate should be used for the serial communication.

    Thanks.

  • Hello,

    I have not implemented this on LABVIEW but I am sure you can implement on any software with serial communication.

    Regarding your queries:
    1. If you just want to read the heart rate signals, you don't need to change any register settings. Just send the ADCREAD command in the communication protocol.
    Eg. To implement a nearly continuous reading send 0x01 0x2A 0xFF 0xFF 0xFF 0xFF 0xFF 0x0D

    2. There is no waiting time after write register. At least I have done it.

    3. Sorry, no idea.

    4. I used the default baud rate(9600).

    Hope it helps.

    Regards,
    Atul

  • Thnaks for clarifying most of the things.

    If possible can you answer this :

    If I send 0x01 0x2A 0xFF 0xFF 0xFF 0xFF 0xFF 0x0D this thorugh serial port then the received will be  

    0x01 0x02 <18 bytes of 6 channel data with LSB first> 0x03 0x0D (as stated in message comm protocol -EVM sends N packets with each packet having this  format  ->EVM to PC: 0x01 0x02 <18 bytes of 6 channel data with LSB first> 0x03 0x0D)

    How to decode(extract) the heart rate signal(data) information from this 18byte data.What this 18byte data information of 6channel corresponds to.

  • The data from each channel comes in 3 byte each, in this order, RED,Ambient,IR,Ambient, REDAmbient,IRAmbient.

    Divide the data into six equal groups each consisting of 3 bytes. Then arrange the data in order(MSB first). Convert the hexadecimal to decimal to get channel code. 
    You can find the formula to convert ADC code to data somewhere in the forum.

    http://e2e.ti.com/support/applications/high_reliability/f/30/t/340964.aspx

  • Hi Atul,

    Are you sure abotu this :To implement a nearly continuous reading send 0x01 0x2A 0xFF 0xFF 0xFF 0xFF 0xFF 0x0D.

    The msg comm protocol pdf says 

    PC to EVM: 0x01 0x2A <4 bytes of N packets with MSB first> 0x0D
    Example1: to capture 1024 packets, PC sends: “0x01 0x2A 0x00 0x00 0x04 0x00 0x0D”
    Example2: to capture 70000 packets, PC sends: “0x01 0x2A 0x00 0x01 0x11 0x70 0x0D”

    I tried sending this but my communication shows up some error.Can You say from where you found this.

    Have successfully received data form EVM by continuously sending this data 0x01 0x2A 0xFF 0xFF 0xFF 0xFF 0xFF 0x0D.

    thanks.

  • Sorry,
    I mistakenly typed another extra byte. 
    Try sending 0x01 0x2A 0xFF 0xFF 0xFF 0xFF 0x0D (0xFF 4 times). The command is 4 bytes, i accidently wrote 5 bytes.

    This is still not continuous, however it is very large and can be considered continuous.

    I have implemented this on matlab, and it is working fine.

  • Hello Atul,

    Are you sure that the received information of 18bytes will be in this format RED,Ambient,IR,Ambient, REDAmbient,IRAmbient.

    If possible can post your plotted data images as I want to see the heart rate signal or a conitnous received data plot looks like.

    Because I am sending this conitnously form Labview 0x01 0x2A 0xFF 0xFF 0xFF 0xFF 0x0D and able to get the data in this format B500 BD93 1DCF 491F 030D 0102 19FF 1F9B 5D02 19FF 1F19 dispalyed in hexa format.

    Here it can be observed that after 0102 is the 18byte information each three bytes representing data of a channel.

    And here I observed that the IR channel bytes are 3bytes =19FF1F (and also the Red 3bytes =19FF 1F)are always being constant whereas others are changing.

    can someone explain the reason and help me out with the correct information.

     

     

  • Hello Govardhan,

    I have attached the message communication protocol for the AFE4400 / AFE4490 Evaluation module.

    6305.Message Communication Protocol v3.0 - AFE44x0EVM.pdf

    Note that this message communication protocol applies to AFE4400 / AFE4490 EVM with firmware revision 1.3 or higher in conjunction with AFE44x0SPO2EVM GUI version 2.0 or higher.

    The latest version of the firmware does support continuous ADC capture mode. Refer to the document for more details.

    Your observation of the channel data is incorrect. The data is sent LSB first so the IR data you received is 0x1FFF19. The ADC data corresponding to IR (LED1) and Red (LED2) channel is saturated and that is the reason why you are getting 0x1FFF19. It is not full scale (0x1FFFFF) due to the radix 2 division for ADC averaging. You may want to reduce the channel gain by reducing the TIA gain or second stage gain (if enabled) to ensure the signal is not saturated before it reaches the ADC.

      

     Regards

    Praveen.

  • Hello Praveen,

    In this same post you said “The raw data is sent through a band-pass filter before display. What you see in the plot is the filtered data.”

    1) Can I know where TI has implemented the band pass filter and where actual filtering of raw data is taking place. Is it in Labview or on microcontroller?

    2) What I need to do to get the HR signal from ADC volts( values got after converting ADC codes).

    Can anyone help me out in finding answers for these.

    Thankyou.

  • 1. The band pass filter was implemented in LabVIEW. The filter is a 3rd order Butterworth band pass filter between 0.5 and 2.5Hz.

    2, In the filtered PPG data, the number of peaks correspond to the heartbeat rate.

    There are several techniques to calculate the heart rate.

    One technique is to calculate the heart beats per minute using a three beat average. First detect the presence of beats by comparing the outputs against a set threshold. Once you detect three beats, the heartbeat rate can be calculated as follows:

    Heart rate per minute = sampling frequency (PRF) * 60 * 3 / number of samples in 3 beats