Measuring battery charging level

Dear Toradex Team,
We are using the Apalis imx8 module together with the Ixora carrier board and power it with an external 12V power bank. The battery is connect to the X3 power connector of the carrier board. I wanted to ask if there is an easy way of measuring the approximate charging level of the battery.
We want to do this for these reasons:

  1. Visualize the level in our app
  2. Detect when the battery get’s old, so we can replace it ahead of time before it get’s too old.

My first idea is to measure the voltage of pin 5 of the power out header (X5) with an ADC of the imx8 and estimate the approximate charging level. But according to the datasheet the ADC can only handle voltages up to 1.8V so we would need to put some resistors in series to bring down the voltage.
Does this make sense?
Is there another way you can think of for us to achieve our goal?

Thanks in advance for your thoughts!
Best regards,
Thorbjörn

The Ixora board was not designed with battery support in mind, and you are correct: the Apalis iMX8 ADC voltage range is 1.8V. Therefore, to utilize it for monitoring a 12V battery, you will need to scale the voltage. A simple voltage divider can be used for this purpose with a total resistance (R1+R2) of around 20K or so. For your convenience, you can use this voltage divider calculator.

Hi @alex.tx
Thanks for the response, I will follow this idea.

Best regards,
Thorbjörn

1 Like