getBatteryVoltage() Hookup Question

Hi,

I am supplying 3.5V of power (2xAA non-recharge) through VDD.

Am I correct that to use getBatteryVoltage() to read correctly I need to also add the following connection for the respective boards:

  • VDD to GPIO7 (HTCC-AB01)
  • VDD to GPIO16 (HTCC-AB02)

The goal being when I call getBatteryVoltage()/1000 I get the ~3.5V as a result.

Thank you.

Is there a built in voltage divider on the AB01 board?

hi ,
i didn’t add any extra electronics and when i call getBatteryVoltage i get the correct battery value…

take a look at my code here:

@jayjay thank you for the reply.

When I supply the ADC pin with the 3.5V from my two AA batteries in series it maxes out. When I apply the voltage of one of the batteries (~1.75v) the reading is representative of the total voltage for the two batteries. I can use this as a workaround for now.

It is confusing what the resistances are for the actual AB01 board based on the documentation. From the block diagram for the AB01 it appears there are two resistors R16 and R17 that are utilized to create the voltage divider for the ADC pin.

image

Based on this documentation the ADC input voltage is capped at 2.4V, which is why I am confused why my 3.5V is overloading the ADC based on the math.

image

I must be missing something?

Thanks!