OPHRM coding

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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.

0 Likes
1 Solution
Anonymous
Not applicable

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.

   

 

   

Regards,

   

Vikas

View solution in original post

0 Likes
1 Reply
Anonymous
Not applicable

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.

   

 

   

Regards,

   

Vikas

0 Likes