Re: Heart rate sensor MAX30102
Quote:
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
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
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. :)
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
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
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