Infra or Red Led


what differences between infra led , super bright red led in detecting pulse?
who of 2 better one?
are 2 still needing amplifiers detecting pulse?
does 2 of them required specific photodiode or phototransistor?

btw using super bright red led , photo diode in detecting pulse.
do need use dual amplifier or 1 amplifier enough?

i'm going feed output of amplifier arduino decimila.
here's code sample:
int ledpin = 13;
int sensorpin = 0;

double alpha =0.75;
int period = 20;
double change = 0.0;

void setup()
{
pinmode(ledpin,output);
serial.begin(115200);
}

void loop()
{
static double oldvalue = 0;
static double oldchange = 0;
int rawvalue = analogread(sensorpin);
double value = alpha * oldvalue + (1-alpha)*rawvalue;

digitalwrite(ledpin,(change<0.0 && oldchange >0.0));

serial.println(value);

oldvalue= value;
oldchange =change;
delay(period);
}

i have week finish project... time running out.. =(
please help..
thanks in advance...

please use code tags when posting code == # button

a quick reveals change never assigned value,




double value = alpha * oldvalue + (1-alpha)*rawvalue;

can written as

double value = oldvalue - beta * (oldvalue - rawvalue);  // beta = 1-alpha;

takes less math , has 1 "beta" iso 2 "alpha" in formula.


your turn


Arduino Forum > Using Arduino > Sensors > Infra or Red Led


arduino

Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial