LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Peak detection and appropriate response

I have been working on a wireless vital sign monitor. I have signals coming through 8 bits A/D entering the microcontroller and serially sent to Labview where i do my analysis.
I am trying to implement the below algorithm:
1) Detect the peaks above 3 volts (my range of signals is between 0-5 V) for an interval of 6 seconds.
2) For every time I detect a peak, increment counter (Counter starts at 0 and ends at 6)
3) Multiply the total number of detected peaks by 10 which gives beats / minute.
I was initailly trying to accomplish this using the microcontroller (Basic Stamp 2) but have not been succesfull and am therefore wondering if there is an easier way to do this in Labview.
I want to accomplish this in real time. Can anyone suggest an approach??
Thanks
0 Kudos
Message 1 of 5
(3,220 Views)
There are two vis that can be combined :
- the threshold peak detector (in the Analyse/Signal processing/Time domain sub-palette), gives the number of peaks above a threshold value, in an array of data;
- the DataqueuePtbyPt in the Analyse/Point by Point/Other functions sub palette) that builds a queue (array) of a given length. This second vi can be used to collect points from your microcontroller ADC.

Have a look at the attached vi.

CC
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 5
(3,206 Views)
Here is a little mod to Chilly Charly's code to correct for the instances when the number of peaks is less than 6.
Randall Pursley
0 Kudos
Message 3 of 5
(3,195 Views)
Thanks a millions. Appreciate it alot.
0 Kudos
Message 4 of 5
(3,166 Views)
Thanks a millions. Appreciate it alot.
0 Kudos
Message 5 of 5
(3,164 Views)