Go Down

Topic: Help with a pulse detection func (Read 1 time) previous topic - next topic

sven_paul

Hi,

im wondering how i can make a simple funktion that reads the analoge value from a pulse sensor (i bought a premade sensor already), then writes high to a digital port. So lets say that the pulse is moving between 100 & 120, id like the avr to understand that this is the normal pulse, when the pulse leaves the pattern -- either becoming higher or lowe id like the avr to detect the change in the patterns and write high (then low again) to a digital port. After writing low id like to detect the new pulse pattern and then detect when the pulse brakes the pattern.

Thank you
/S

karlok

use them:

analogread
map
digitalwrite
using Arduino Uno Rev 3

PaulS

Quote
(i bought a premade sensor already)

But, you're not going to tell us which one. Well, then, how are we supposed to write your code to read it?

Quote
either becoming higher or lowe id like the avr to detect the change in the patterns and write high (then low again) to a digital port.

Are you going to be able to see an LED that is turned on only for a new nanoseconds? Or is there supposed to be some interval between HIGH and LOW?

You want the same pin lit up for high and low pulse? 100 IS high, by the way. Typical resting pulse is more like 72.

johncc

What sort of speeds are you talking about.  If it's a commercial sensor can you provide a pointer to the model and/or specs?

Also, moving between 100 and 120 "whats"?  Volts, nano-seconds, feet above mean sea level? :)

John

sven_paul

Sorry, quite new to this.

i bought this
http://pulsesensor.com/
The idea is to start with a led then hook up a relay, basically i want to write high and low to a digital port (perhaps keep it as high for one second, before it becomes low again), lets say nr 13.

Ok, i just took 100 as an example. So id like the function to detect when the pulse leaves the resting interval.

I worked a bit with the code found here
http://pulsesensor.myshopify.com/pages/pulse-sensor-amped-arduino-v1dot1
but couldn't figure out how to spot the big changes in the pulse which would trigger pin nr 13.

/S

Go Up