3 Replies Latest reply on Jun 15, 2017 3:08 PM by epr_1639216

    CYBLE-022001 Battery Level Measurement


      I am attempting to measure the battery level using the 1uF capacitor method. There is an example project BLE_Temperature_Measurement doing exactly this. The project uses the CYB10563-56LQXI with a jumper from p3[0] to VREF and works flawlessly. However when I select the CYBLE-022001 with a jumper from p5[0] to VREF (and change the pins) the measurements no longer work. At 3.3 V in I am getting a reading of 1137mV and at 2.8V in I read 1024mV. What am I missing? What configuration changes need to be made to port the example project to the CYBLE-022001?


      Thanks in advance for the help!


      I have attached a simplified project to demonstrate the issue

        • 1. Re: CYBLE-022001 Battery Level Measurement

          If you mouse over the Yellow Square next to the P5[0] pin selection, the compiler gives a warning:


          "Function SARADC.vplus is reachable through the analog routing fabric, but using this pin may lead to routing congestion or failure"


          I wouldn't think that is the issue, but it is a possibility.


          Keep in mind that the example project you are using is using math to convert the raw ADC value into a voltage, it could be those constants need to be adjusted or something :)


          Also, the components in the project are not up-to-date; Try updating all of the components to the latest ones.

          • 2. Re: CYBLE-022001 Battery Level Measurement

            Thank you for the response, I tried moving to p3[5] same result.


            It looks like I have the most up to date components, same result.


            Yeah it could be adjusting the math... but even so, the readings are far more variable then with CYBL10563, which makes me think something else is going on :/

            • 3. Re: CYBLE-022001 Battery Level Measurement

              You could try adjusting the ADC precision bits between 12,10,11,8 bits etc. to see if the fluctuation is less pronounced due to less bits of information. That would at least give an indication that it is reading the ADC properly :)