Measure battery level

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

cross mob
Anonymous
Not applicable

I am trying to implement battery measurment by connecting vref to SAR_ADC internally but get un expected results.

   

I must connect externally between VREF pin to P1[7].

   

I have 1uF on VREF pin and 1uF on P1[7], i used the firmware code inorder to connect VREF and delay for a few miliseconds, then reconnect VDD. The results i get are wrong until i connect externally between VREF and P1[7].

   

I am using PSOC 4 BLE?

0 Likes
9 Replies
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Please post your code so we can check it.

0 Likes
lock attach
Attachments are accessible only for community members.
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Here is a program example that my help you.  There is a PDF in the program that explains it.

0 Likes
Anonymous
Not applicable

I am using the same code as yours, I tried the code you sent but i get the same results.

   

I need to connect externally between VREF (pin 45) to P3[0] (which you define as Vref). I thought it will be inside PSOC.

   

I am using PSOC 4, CY8C4247LQI_BL483 from EVB and CY8C4248LQI_BL483 on my board.

   

Is it related to the chip version?

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Should connect to pin 45 not pin P1 pin 7 also you only need one Cap not Two. Please post your code so we can check the design.

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

One other thing one of the Battery Levels is a Battery Simulation the other one is the real battery level.

0 Likes
Anonymous
Not applicable

I didn't send my code because it is the same as you sent, i have downloaded this example already. I only changed VREG from P3[0] to P1[7], there i have 1u capacitor in my HW.

   

I also tried again with the code you sent on the EVB.

   

I thought i will not need to short externally between VREF and ADC input.

0 Likes
EmHo_296241
Level 5
Level 5
10 solutions authored 50 replies posted 25 replies posted

Hey,

How did you change VREF pin. For PSoC 4 BLE there is a dedicated VREF pin, unlike PSoC 4 Pioneer kit where pin p1[7] is used.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

I am using CY8C4248LQI_BL483 chip on my PCB and CY8C4247LQI_BL483 on Pioneer kit.

   

I am using the following code on both units and got the same results, wrong reading without external connection of VREF to P1[7].

   

I recently find in Cypress documentation "BLE_battery_level" document asking to connect external short between p3[0] to VREF.

   

So what is the right way? with or without external connection ?

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi,

External connection is necessary. The kit has dedicated VREF pin, which comes from Vref component an integral part of the ADC. There is no way to route that to ADC internally and the whole battery voltage measurement is based on this voltage. So external connection is necessary in measurement.

Best Regards,
VSRS

0 Likes