Nicla Sense ME Charging

Is there anything that needs to be done in code to enable charging of a LiPO on the Sense ME?
I have a battery connected and the device is powered fine from the battery. However the USB connection is not charging the battery

Please read the topic "How to get the best out of this forum".
Your schematics is missing to begin with...

I’m having the same issue. I’m sure if the it’s just not charging it or if the usb is killing the battery.

Hi @cpinnock32 and @etl_jim. I see there is a recent fix for a bug related to Nicla Sense ME charging in the repository of the "Arduino Mbed OS Nicla Boards" platform:

and the follow up commit to fix a regression introduced by the charging fix:

There hasn't been a new release of the platform since the fix was made, so you would need to apply that patch manually. If you need instructions for doing that, let us know and I'm sure one of the forum members will be able to help out.

Or you can just wait for the next release of the platform and then update using the Arduino IDE Boards Manager.

1 Like

That I will take a look, the battery is charging, but with what appears to be very little current. The patch suggests it would charge at 20mA which seems low, but may just be the limitation

Thanks

20 is only the default parameter value. So if you do this:

nicla::enableCharge();

Then it will indeed be set to 20 mA.

But you can also pass a custom value in the call. For example, if you wanted 100 mA:

nicla::enableCharge(100);

Thanks! Those links and the statement worked!

For some reason I thought the batteries were charging before then but I guess they were working off of what charge they already had, strange smh.

Is there a command for the battery status to add to the "loop()"? Just curious.

You are welcome. I'm glad it is working now.

I don't think the library provides a convenient function for it, but it looks like the BQ25120A battery charger chip itself does.

You can check the datasheet for the chip to see what is possible. Table 9.6 lists the registers.

The Nicla_System library does provide some lower level convenience interface for working with the registers:

You can use the library's functions that work with them as a reference:

For example, here is the nicla::enableCharge function:

I am currently having the same problem. As I am new to Arduino I would be very happy if you could share further instructions on how to apply that patch manually.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.