Using Battery Monitor in QN9080

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using Battery Monitor in QN9080

3,093 Views
karim_osama
Contributor II

Hello All,

I am Using QN9080 and want to use the Battery Monitor to be able to get battery levels at any time

I am trying to edit ADC Temperature senor Example  but I think it is not as simple as just changing the ADC Channel  fromm13 to 14, 

So I wish to know the Battery Monitor ADC Configuration or If available an Example that actually use this feature,

Thanks in advance

Labels (3)
9 Replies

2,895 Views
garciaerin2020
Contributor I

I did not found anything in my configuration.

0 Kudos

2,895 Views
karim_osama
Contributor II

Thanks, Sebastian for your Reply,

for my current configurations which are:

- Using VCC as Ref Voltage, and Gain = 1, and the readings for 3 volts is 2.9V and for the 2.5 volts and less they are 3V!, 
So, I want to ensure some Points:

1- Should I use the internal 1.2 as ref or VCC or it does not matter?
2- The result of ADC_ConversionResult2Mv should be Multiplied by 4 to get the Actual Battery Level?

Best Regards,

Karim

0 Kudos

2,895 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Karim,

 

As some additional notes, and to answer your questions:

  • The readings from channel 14 correspond to VCC/4, so to get the actual VCC value, the reading would need to be multiplied by 4.
  • If the supply voltage for the MCU is regulated to maintain a constant value, the VCC/4 reading is constant and cannot be used to tell battery level. If this is the case for your application, another ADC channel will have to be used to monitor the battery, which may involve connecting an additional voltage divider circuit to divide the supply voltage to fit in the dynamic range of the ADC.
  • Reference for the Battery Monitor channel should be GND.

 

Please let me know if you need any more information.

 

Best regards,

Sebastian

2,895 Views
karim_osama
Contributor II

Hello Sebastian,

Could you please what do you mean by Reference for the Battery Monitor channel should be GND

I've tried another QN9080 Board to check the Readings 

When it is connected by Cable the Battery Monitor gives me 3.2 Volts (after multiplying by 4)

when applying 3 Volts signal to the Battery Terminals on board the reading is 2.8 volts,

any notes on why the readings drop~ 200 mV

0 Kudos

2,895 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Karim,

 

The reference is the voltage against which the ADC will compare the input voltage to get a reading.

 

The reading on the battery terminal is accurate to a certain degree, and could vary because of additional resistors connected to the power line. There may be a resistor on the path causing a voltage loss, thus reducing the reading by the 200 mV

 

Best regards,

Sebastian

0 Kudos

2,895 Views
karim_osama
Contributor II

Hi Sebastian,
Thanks for your Information,
I've started with the normal ADC basic example to try to measure an external voltage applied to pins 8 and 9 

but ALL values are shifted 200 mV
when the actual readings were 1.2 volts, the ADC output was 1.4 and the offset is linear, although I used the same calibration APIs as in the example, any clue why that offset exists? cause I think I faced that in Battery monitor too

Thanks in advance,

Best Regards,

Karim

0 Kudos

2,782 Views
davideferrario
Contributor II

Hello Karim.

I am working on a project based on QN9080 and I need to read battery voltage on PA01.

Did you solved your problem?

0 Kudos

2,895 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Karim,

 

I ran the ADC example, and the readings I got were accurate with an error of approximately +-5mV:

pastedImage_1.png

Was the ADC reference changed in any way? Or is the example unchanged?

 

Please let me know if you continue to have issues.

 

Best regards,

Sebastian

0 Kudos

2,895 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Karim, I hope you're doing well!

 

The battery monitor is a regular ADC channel, and measurements are taken like on any other ADC channel. It is connected to the equivalent of VCC/4, and the measurement can indicate fall of voltage from the battery, assuming VCC is the current voltage of the connected battery.

 

If the voltage value is critically low, as set by the application, the MCU can be instructed to act a certain way, or to perform a certain set of actions.

 

More information about the ADC peripheral of the QN9080 can be read in the QN0908x user manual, which can be found here.

 

There's also a QN908x ADC configuration guide Application Note, which can be found here, explaining other considerations related to ADC use on this MCU.

 

Please let me know if you need any more information.

 

Best regards,

Sebastian