Battery level indicator

Batteries, Adapters, Charging, etc.
pires
Posts: 32
Joined: Wed Sep 18, 2013 2:20 pm
Contact:

Battery level indicator

Postby pires » Wed Sep 18, 2013 7:22 pm

It could be an RGB led that goes from green to red (from 100 to 0) or a simple command that the MCU will reply with the percentage of battery available.

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

Re: Battery level indicator

Postby BITalino » Wed Sep 18, 2013 10:24 pm

By default you can actually access the battery level from within your application.

Channel #6 measures the battery voltage level, enabling you to analyze the discharge cycles of your BITalino and fine-tune your battery level indications.

Typically, each API has a battery threshold adjustment function that can be used to set the battery threshold under which the MCU should trigger the low battery indication (red LED)

pires
Posts: 32
Joined: Wed Sep 18, 2013 2:20 pm
Contact:

Re: Battery level indicator

Postby pires » Thu Sep 19, 2013 8:30 am

OK, so setting the threshold is the way to go, for now. Can you please help me understand how can I map the possible value range (0-63) to battery %?
Let's say I want to set a threshold of 10% of battery.

zguerreiro
Posts: 1
Joined: Fri Sep 13, 2013 9:59 am

Re: Battery level indicator

Postby zguerreiro » Fri Sep 20, 2013 1:41 pm

The value range (0-63) of the battery threshold adjustment means (3.4V - 3.8V), respectively. By default, the MCU battery indication (red LED) turns on when the battery voltage value is 3.4V and thus, it is about (5 - 10%) of battery capacity. Consequently, if you change the battery threshold within your application to 63, it means that the MCU battery indication (red LED) turns on when the battery voltage value is 3.8V (about 90 - 95% of battery capacity).
Enjoy ;)

bergil0058
Posts: 5
Joined: Mon Oct 06, 2014 3:00 pm

Re: Battery level indicator

Postby bergil0058 » Mon Oct 06, 2014 3:07 pm

Hi,
which are the units that apeears on the .txt file in the channel of the battery? I mean, the column that represents the battery level (channel 6 in my case) is a number around 580 or 570 (that represents the battery level of charge, isn't?) How can i translate this number into voltage units?
Thanks!

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

Re: Battery level indicator

Postby BITalino » Sat Oct 11, 2014 1:44 pm

bergil0058 wrote:Hi,
which are the units that apeears on the .txt file in the channel of the battery? I mean, the column that represents the battery level (channel 6 in my case) is a number around 580 or 570 (that represents the battery level of charge, isn't?) How can i translate this number into voltage units?
Thanks!


Hi,

The transfer function for the battery should be as follows:

ABAT [~3.4 V : ~3.8 V]

ABATV = 2*(ABATB * Vcc / (2^n - 1))

Where:
ABATV – Battery level in Volts (V)
ABATB – ADC value for ABAT obtained from BITalino
Vcc – Operating Voltage (V)
n – number of bits (bit)

Values:
Vcc = 3.3 (V)
n = See Number of Bits section

Number of Bits: The number of bits for each channel depends on its position in the "acquire channel" request (ex. BITalino().start([0,2,3,5])):
- If it is one of the four initial channels, its resolution will be: 10 bit.
- If it is one of the two last channels, its resolution will be: 6 bit.


I hope you found this information useful for your goals; do contact us for any further question you have.

Best regards,
The BITalino Team


Return to “Power”