Having trouble fitering sensor signals and getting BPM

Hey.
I’m hoping someone has an idea to help me out. This has been wrecking my head for a while now, and I can’t seem to get it right. Keep in mind I have been teaching myself how to use VVVV over the past few month, so I still don’t know that a lot of the nodes even exist yet and could be using things in the wrong way or missing something obvious.

I’m using an ECG sensor (built by bitalino) to get my heart rate. I’m trying to filter out the noise and get a normal looking heartbeat, in a graph for the moment, but I am also using it to control inputs of textures.
I’ve included a screen grab of what the graphs look like when I’m running the bitalino too.
The data coming in from the sensor has a range of 0 - 1023 but it sits around 470 - 530 (or there abouts)
I have mapped for all of these graphs. There is also a conversion to change it into voltage.
Which I have tried to use as well.

ECG [-1.5 mV : 1.5 mV](-1.5 mV : 1.5 mV)

ECGV = (ECGB * Vcc / (2^n - 1) - Vcc / 2) / GECG
ECGmV = ECGV * 1000

If anyone has any ideas at all it would be great. I’m hoping I don’t know about a nice simple way to do get a clean signal and the bpm. At a loss with this one.

heartbeatexample.v4p (69.8 kB)

sounds like a job for: fighting-noise-with-the-1EUR-filter

the filter is in the latest vvvv version included.

Hey.
I had already tried the euro filter, IIR fiter, queueing + averaging.
Anyway long story short, I have it at a usable level. But… this is only when I create a new clean patch and run nothing else. Once I put it in as a sub patch in my main file everything slows down and the heart beat graph is useless.

Any ideas? I do have a lot going on in this file, but I have tried to keep everything as clean as possible with sub patchs.

You could run the filter in a separate vvvv-process and send the data over to you your main vvvv-instance. this way the filtering should be unaffected by your heavy patch.

check “allowmultiple”:
commandline parameters

Hey.
Got that going, seems to have done the trick. Thanks very much!
One question, I’m sending the data over via shared memory. Is that the best option? or is there another way?