You are here

OPHRM coding | Cypress Semiconductor

OPHRM coding

Summary: 1 Reply, Latest post by VAVC on 19 May 2016 11:22 AM PDT
Verified Answers: 1
Last post
Log in to post new comments.

How is heart beat and battery level  is calculated in Optical heart rate monitor? i have attached .c and .h files of battery level and heart rate deduction.

Please help me.

VAVC's picture
Cypress Employee
506 posts

Hi Rineesha,

The details about the battery measurement is already given in the heart rate example project document available in PSOC creator examples.


a) We have VREF pin which can be used as an reference voltage for ADC. To measure the voltage of the battery, we have to measure the voltage level with some constant reference voltage.


When writing to the register we enable the connection between internal bandgap regulator and the VREF pin which always the cap connected to VREF to charge to 1.204V. Once the cap is charged(waiting for some fixed amount time), we change the reference voltage back to internal VDDA/2 which reflects the battery voltage directly. So by comparing VDDA/2 with fixed VREF voltage we easure the battery level.


For heart rate:

refer the function description above the function HeartRate_Measure(). It cleary explains the process and way we measure heart rate.




Log in to post new comments.