Heart rate sensor MAX30102 - Page 3


+ Reply to Thread
Page 3 of 3 FirstFirst 123
Results 81 to 85 of 85
  1. #81
    Join Date
    May 2013
    Location
    australia
    Posts
    2,090


    Did you find this post helpful? Yes | No

    Default Re: Heart rate sensor MAX30102

    I think the LPF should not be so aggressive.
    if you want automatic pulse measurement that remains to be seen, a pretty picture is a different story


    you can adjust filter as you see fit


    Quote Originally Posted by richard View Post
    the filter is not really the issue, its the variability of the data that is problematical, every 128 sample is subtly different.
    light leakage, finger pressure and position and even finger compression time lead to wildly variable readings. my max30102 housing is probable not ideal either
    i use for this filter
    fv = fv*x + nv*(y)

    where x+y = 1, fv = average nv = new value

    in pbp terms x y
    ave = (ave ** 60000) + (buffer[index] ** 5535 ) ;60000 + 5535 = 65535

    or
    ave = (ave */ 250) + (buffer[index] */ 5 ) ;250+ 5 = 255

    depending on finesse required, the introduced phase shift has no bearing on the result either.
    it may not be as fast as your method but has better control and in this case speed is of no importance



    @ PutMulResult?D _average ;RED AVERAGE
    ave = DIV32 128 ;RED AVERAGE
    reg = OVF_COUNTER
    i2cread sda,scl,ADDR,reg,[reg ]
    DEBUG 13,10,"OverFlows ",DEC reg,9,dec ave,9,hex ave
    FOR index = 0 TO 255 step 2
    ave = (ave ** 57000) + (buffer[index] ** 8535 )
    lpfdata[index>>1]=ave
    ;.....lpf..;;;;----red-----;;;;======-ir-========
    DEBUG 13,10,dec ave,9,dec buffer[index],9,dec buffer[index+1]

    NEXT
    ' RETURN
    Warning I'm not a teacher , prose like a gushing embroilment is not my style

  2. #82
    Join Date
    Oct 2010
    Posts
    401


    Did you find this post helpful? Yes | No

    Default Re: Heart rate sensor MAX30102

    sorry for my late response. I was really busy these days.

    thanks for the info. I will do some changes and tests.

  3. #83
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,237


    Did you find this post helpful? Yes | No

    Default Re: Heart rate sensor MAX30102

    I do not know if it is suitable for this project, but I had good results with Darrels Taylor ADC oversampling routines (http://dt.picbasic.co.uk/CODEX/AnalogueOverSampling).

    Also Kalman filters maybe of use. I find them difficult to implement though.

    Ioannis

  4. #84
    Join Date
    May 2013
    Location
    australia
    Posts
    2,090


    Did you find this post helpful? Yes | No

    Default Re: Heart rate sensor MAX30102

    no amount of low pass filtering will remove the dc component, ultimately it just makes it worse.
    the dc component needs to be removed to make detection of the beat peaks reliable.
    there is plenty of raw data posted, you can always ask for more. feel free to have a go
    Warning I'm not a teacher , prose like a gushing embroilment is not my style

  5. #85
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,237


    Did you find this post helpful? Yes | No

    Default Re: Heart rate sensor MAX30102

    I am not currently on this project. Was disappointed and set it aside. Removing DC component with firmware I think is too difficult.

    The oversampling of DT routines were tested and applied on other projects with amazing results (costing in program speed of course, nothing is free).

    Ioannis

Similar Threads

  1. New PIC failure rate
    By timmers in forum General
    Replies: 5
    Last Post: - 26th March 2009, 12:11
  2. Rf module baud rate
    By tazntex in forum Serial
    Replies: 4
    Last Post: - 5th August 2008, 18:47
  3. Replies: 6
    Last Post: - 18th January 2008, 08:17
  4. SHIFTOUT Clock rate
    By Brock in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 8th July 2006, 23:42
  5. Detect baud rate
    By Dick M in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd July 2005, 21:10

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts