Post Go back to editing

EVAL-AD5940BIOZ ECG SensorPal and C code example difference

I am using your AD5940-Bioz dev kit to measure ECG (simulator). When I use SensorPal it works acceptable, but when I use your C code example, it does not work at all. 

I wanted to ask what do I need to change in the example (AD5940_ECG) for it to work the same way as it does in SensorPal?

Parents
  • Hi,

    I am getting the same result with both:

    may I know what is your O/P with the C code? 

  • Hi,

    I am not sure if by O/P you mean output or operating processor.

    In case of the processor:

    I use the dev kit (EVAL-AD5940Bioz), original cables.

    To generate signal, I use a simulator (60Bpm)

    In case of the output:

    SensorPal:

      

    C code (original, nothing changed):

    Sometimes when I change some parameters in C code I get something like this:

    I use C code examples from here:

    https://github.com/analogdevicesinc/ad5940-examples

    https://github.com/analogdevicesinc/ad5940lib

  • Hi,

    Are you telling about the x-axis?

    In SensorPal, x-axis is time :

    whereas in C-code used with IDE, the X-axis is measured sample index:

    Also, 

    For the configuration below in C-Code:

    adc_filter.BpNotch = bTRUE; 
    adc_filter.BpSinc3 = bTRUE; 
    adc_filter.Sinc2NotchEnable = bTRUE;

    clks_cal.DataType = DATATYPE_SINC3;

    AD5940_SEQGenInsert(SEQ_WAIT(WaitClks/2)); /*instead of SEQ_WAIT(WaitClks)*/

    the following clearer output is obtained:

    With AD5940_SEQGenInsert(SEQ_WAIT(WaitClks), the below output is obtained:

  • No, I am not talking about the x axis. I do understand sampling and all. Those ripples in both C code pictures are 50 Hz, the peaks in the first one are like 17 Hz, which is so random. In a few days I will try to use:

    AD5940_SEQGenInsert(SEQ_WAIT(WaitClks/2)); /*instead of SEQ_WAIT(WaitClks)*/

    But I have tried other options (filters on/off, output channels) and none of them worked. I have tried using different sampling rate (250 instead of 500), different serial communication speed, nothing helped. 

  • I've tried using AD5940_SEQGenInsert(SEQ_WAIT(WaitClks/2)); but then I would not get any readings at all (no wrong data, just nothing printing out).

    I had somewhat of an advancement, though. When I disconnect an ethernet cable from the laptop (power supply, monitor etc. is always disconnected), I do get somewhat of a signal with the C code, but when the ethernet cable is connected, C code gives those "signals" that I've posted above. SensorPal on the other, gives me pretty much the same - normal signal in both cases.

    Does SensorPal do some additional filtering? Even if that's the case, I feel like there is still some setup configuration that I am missing, since the noise seems to overlap with the ECG spectrum. 

  • Hi,

    Did you check with the above filter settings that I have mentioned?

  • None of the proposed solutions helped. In the end I found out that power supply and overall environment noise was making all the problem. It did not, however, explain how the GUI still managed to record a good quality ECG in the noisy environment, while the C example could not.

Reply
  • None of the proposed solutions helped. In the end I found out that power supply and overall environment noise was making all the problem. It did not, however, explain how the GUI still managed to record a good quality ECG in the noisy environment, while the C example could not.

Children
No Data