1 Reply Latest reply on May 19, 2016 11:22 AM by vavc

    OPHRM coding

    rineesha.mohammed_1590731

      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.

        • 1. Re: OPHRM coding
          vavc

          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