MKRWAN 1310 Battery charging mode is not working.

Hey Guys,

Thanks in advance.

My Li-ion battery is not getting Recharged

  • I'm testing the recharging capacity of MKR WAN 1310
  • Trying to read battery status

1.I'm testing the recharging capacity of MKR WAN 1310

My MKRWAN 1310 is connected with Li-Ion battery(For JST connector) and used USB for external power supply. But my battery is not getting recharged. There is no output voltage at JST connector. Just wondering what is my mistake.

2. Trying to read battery status
I can see in variant.cpp of MKRWIFI 1010. We have support for reading Battery Status by using ADC_BATTERY.

void initVariant() {
#if defined(USE_BQ24195L_PMIC)
  pinMode(ADC_BATTERY, OUTPUT);
  digitalWrite(ADC_BATTERY, LOW);
  delay(10);
  pinMode(ADC_BATTERY, INPUT);
  delay(100);

  bool batteryPresent = analogRead(ADC_BATTERY) > 600;
  if (batteryPresent) {
    enable_battery_charging();
  }
  disable_battery_fet(!batteryPresent);
#endif

  // NINA - SPI boot
  pinMode(NINA_GPIO0, OUTPUT);
  digitalWrite(NINA_GPIO0, HIGH);

  // disable NINA
  pinMode(NINA_RESETN, OUTPUT);
  digitalWrite(NINA_RESETN, HIGH);
}

But in MKRWAN 1310 ADC_BATTERY is connected as FLASH_CS, Still is that possible to read battery status.

Looking for your valuable suggestions :slight_smile: :slight_smile: :slight_smile:

Hi 03sarath,

any news about this case? I'm currently searching also for detailed information about using the MKR 1310 with battery.

THX

The battery connection to a dedicated ADC channel is not provided on the MKR WAN 1310. This is because the MKR WAN reallocated the pin used to measure the battery voltage to now be a chip select for a flash chip (there is a 16Mbit flash memory on the MKR WAN now).

You would need to manually connect the battery through a resistive divider to one of the analog pins on the MKR WAN to measure the battery voltage.

Is it also possible to charging the Li-Po over 5V on VIN? Or is battery charging only possible over USB? I didn't try it yet and until now I didn't found any information about this.
THX in advance.

sslupsky:
The battery connection to a dedicated ADC channel is not provided on the MKR WAN 1310. This is because the MKR WAN reallocated the pin used to measure the battery voltage to now be a chip select for a flash chip (there is a 16Mbit flash memory on the MKR WAN now).

You would need to manually connect the battery through a resistive divider to one of the analog pins on the MKR WAN to measure the battery voltage.

Could you give an example on how one would build this @sslupsky?

TomStein,

Apologies, I have been working on a different project and have not been active here lately. If you are still interested, I could put something together.

sslupsky:
TomStein,

If you are still interested, I could put something together.

Please share the details. Will be quite helpful, working on similar project.
Regards.

I am also interested in this.