So I'm trying to make a pulse sensor using IR sensor and arduino UNO (giving out 4.8V really from 5V pin) , and I'm supposed to get a pulse plot like this
As you can see, absolutely no pulse is noticeable.
Where am I going wrong?
So I'm trying to make a pulse sensor using IR sensor and arduino UNO (giving out 4.8V really from 5V pin) , and I'm supposed to get a pulse plot like this
As you can see, absolutely no pulse is noticeable.
Where am I going wrong?
the 1KΩ pot was likely tuned to give (with R1) a specific current in the LED, driving a specific output to the HPF stage.
By fixing 1KΩ you might not be in similar conditions.
as the article shows the various looks at each stage, you probably should proceed in steps. Get something that looks like Fig 3. out of the first stage before going any further.
Once that works, make sure the HPF stage does something similar to Fig 4. etc...
Ok, so the pot might not be set to 1k at all?
I'll get a 1k Pot and try getting Figure 3.
How about my baudrate of 19200? It shouldn't be at any fault, should it?
And how do I get -ve voltage from Arduino?
The traces are seen from an oscilloscope
Do you mean you use analogRead() to check the voltage and print that out to the Serial Plotter built into the IDE ?
Yes, I used an analog read
at 19200 you won't print very fast - 1920 characters per second. assuming ~5 characters for a measure it means you sample at 384 Hz as print will become blocking and thus the limiting factor.
try this code
const unsigned long sampleCount = 1000ul;
void setup() {
Serial.begin(19200); // try 115200, 1000000, 2000000
uint32_t t0 = micros();
for (uint32_t n = 0; n < sampleCount; n++) Serial.println(analogRead(A0));
uint32_t deltaT = micros() - t0;
Serial.print(sampleCount);
Serial.print(" samples in ∆t = ");
Serial.print(deltaT);
Serial.println("µs");
Serial.print("Average Sampling Frequency = ");
Serial.print((1000000ul * sampleCount) / deltaT);
Serial.println(" Hz");
}
void loop() {}
now try the same code but change 19200 into various other bauds and you'll see that you'll get a way better sampling frequency
Update: I was able to achieve similar patterns to figure A, but not to figure B. I am wondering whether it could be because I am attaching pin 11 to GND of Arduino and not -5V. How do I achieve -5V?
You can use a TC7660 converter chip to get -5V. It supplies enough current to run an op-amp.
If you dont want to buy the chip search the web for other charge pump circuits, there are various designs out there.
Make a battery pack with 3 AA (or AAA) cells in series, that's >= 4.5V (close enough).
This battery pack's Negative wire goes to "Pin 11" - and its Positive wire goes to the project's GND.
And then we can stress over the absence (??) of decoupling capacitors (and what they accomplish, what value to use, and where they would be placed, and so on).
What are decoupling capacitors? Please tell, I'd rather stress before than after lest I damage something.
Nothing will be damaged, with or without, but things may not work well otherwise.
At any rate, a web-search is in order.
Simple answer: add 0.1 uF (100 nF) caps between chip power and ground pins, as close as possible, for all chips.
Got it, thanks, will try it out and let know
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.