CubeCell Capsule Battery Monitoring

I was just wondering if battery voltage monitoring is supported for the capsule? When I call the getBatteryVoltage function I get ~0.2V even though there is enough battery voltage for the board to function. For the CubeCell Board-Plus I know the ADC is used for battery monitoring, is this also true for the capsule? Thanks!

hi,

The anwser is Yes!

Thanks Jason.

Why do I see ~0V for the battery voltage? Do I need to solder something to hook this up? Looking at the code, it is running the following:

	pinMode(VBAT_ADC_CTL,OUTPUT);
	digitalWrite(VBAT_ADC_CTL,LOW);
	uint16_t volt=analogRead(ADC)*2;
	/*
	 * Board, BoardPlus, Capsule, GPS and HalfAA variants
	 * have external 10K VDD pullup resistor
	 * connected to GPIO7 (USER_KEY / VBAT_ADC_CTL) pin
	 */
	pinMode(VBAT_ADC_CTL, INPUT);

hi,

You can use this code:

I have tested this code and it work well. Please refer my serial print log:
%E5%9B%BE%E7%89%87

Hi Jason,
When I run this example I get the following:

12
12
12
12
12
12
12
12
12
12
12

Is there a solder joint I need to make on the Capsule PCB to monitor the battery, or is the unit faulty?
Many thanks.

hi,

I guess maybe the capsule is bad.

Could you check this location:
%E5%9B%BE%E7%89%87
%E5%9B%BE%E7%89%87

Or you can directly test the ADC with the chip: