10bit BAT give me wrong value

General information about BITalino
Gang
Posts: 7
Joined: Tue Jul 05, 2016 2:55 pm

10bit BAT give me wrong value

Postby Gang » Fri Aug 11, 2017 8:24 pm

Hi everyone,

I'm using BITalino revolution board and couldn't get correct battery indicator value from status packet. I use LabVIEW for programming. When the battery is fully charged, I get the maximum value of 645 (10 1000 0101 for 10bit). When the battery is almost drained out, it gave me the value of 511 (01 1111 1111 for 10bit). I couldn't double check if I am wrong about parsing data or the device gives me a wrong number, since the official software couldn't show battery percentage. Any advice to fix it? Thanks.

BITalino
Site Admin
Posts: 554
Joined: Tue Aug 27, 2013 3:47 pm

Re: 10bit BAT give me wrong value

Postby BITalino » Fri Aug 11, 2017 9:33 pm

Hi there,

Given that the ADC on BITalino can only have 0-3.3V at the input (due to the operating voltage of the device), ABAT is the result of a resistive voltage divider.

As such, in principle the values you are obtaining should be correct; 511 would correspond roughly to 3.29V and 645 would correspond roughly to 4.15V... the transfer function can be found here:
http://forum.bitalino.com/viewtopic.php?t=43#p528

To map these voltages to a percentage you can consider that 3.4V is about 5-10% of battery capacity and that a battery voltage of 3.8V is about 90-95% of battery capacity.

Best regards,
The BITalino Team

Gang
Posts: 7
Joined: Tue Jul 05, 2016 2:55 pm

Re: 10bit BAT give me wrong value

Postby Gang » Mon Aug 14, 2017 1:24 pm

Thanks for the explanation. So I can only convert the ADC value to voltage and to a rough percentage indicator. The battery life indicator won't be very accurate, am I right?

BITalino
Site Admin
Posts: 554
Joined: Tue Aug 27, 2013 3:47 pm

Re: 10bit BAT give me wrong value

Postby BITalino » Mon Aug 14, 2017 1:36 pm

Hi Gang,

The battery life indicator will always be an approximation and the depletion generally isn't even linear.

Nevertheless, you can always characterise the depletion curve of your particular setup to make it more accurate.

We don't have a function for this that we could provide as it depends on the sensor set being used.

Best regards,
The BITalino Team

Gang
Posts: 7
Joined: Tue Jul 05, 2016 2:55 pm

Re: 10bit BAT give me wrong value

Postby Gang » Thu Aug 17, 2017 3:15 pm

It makes sense. Thank you very much for the explanation.


Return to “BITalino kits”




cron