Git Product home page Git Product logo

Comments (5)

biomurph avatar biomurph commented on June 15, 2024 1

@dsiah

  1. When using the hardware timer, you are sure to get a very regular sample rate, which is important for doing DSP on analog signals. That ensures that our derivation of BPM values is accurate. Using a software timer means that the main loop in the program has to check the time to see if it's time to read the sensor. This can cause jitter in the timing of the analog readings, which will effect accuracy of the BPM values. Both our hardware and software timers are set up to read at 500Hz (2mS sample rate). That, according to some science that I read, is good enough to get accurate heart rate data. If you're using the software timer, you have to be mindful in your code not to get too caught up in some activity for more than 2mS to ensure that you don't miss a sample reading.

We do have some statistical analysis code in the Playground to get a baseline of your sample accuracy when running either timer. A tutorial on that is forthcoming.

  1. Right now, I'm wrapping up a tutorial on how to connect Pulse Sensor to Raspberry Pi. When I'm done with that, I will jump on the Teensy family.

from pulsesensorplayground.

biomurph avatar biomurph commented on June 15, 2024

@dsiah Well, the Teensy does have interrupts that would work with Pulse Sensor, but they're not implemented yet. We plan to, and we're working toward this eventual hardware support.
For now, please use the PulseSensor_BPM_Alternative code example to start with. It uses a software timer interrupt, and it can be implemented with very little jitter.

from pulsesensorplayground.

dsiah avatar dsiah commented on June 15, 2024

Lovely, I was able to compile that, as a follow up:

  1. What is the key difference between using the software timer interrupt and the hardware support?
  2. Is there a timeline for the hardware support?

Thank you!

from pulsesensorplayground.

biomurph avatar biomurph commented on June 15, 2024

@dsiah
I'm jumping into this and noticing some things about your original issue.
First, it looks like you're compiling an unsupported code base.
The PulseSensorAmped_Arduino_1.5.0.ino has been superseded by the PulseSensor Playground Library. Right now, the best example sketch to use is the PulseSensor_BPM_Alternative.ino sketch.
This will compile and run on Teensy boards, but we don't have the timer interrupt worked out yet.
Please use the new library.

from pulsesensorplayground.

dsiah avatar dsiah commented on June 15, 2024

Thanks @biomurph I've been using this and hope the issue directs others in my situation to use that sketch.

from pulsesensorplayground.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.