M60 - battery not charging?

Hi There,

I added a battery to my m60 keyboard recently, found a 3000mah with the correct connector, and it does power the keyboard perfectly.

The issue I am having is with charging, it seems like the battery is not charging when plugged in USB.
I do use a powered hub to connect to my computer, and battery levels stays around 44-47%.
I also left the keyboard overnight on a wall charger, nothing changed.

To get an idea of the battery level I did modified code.py, updated python-keyboard library with the latest one from the github repo, adding the macro as such:

def macro_handler(dev, n, is_down):
if is_down:
print(“Battery %r” % dev.kbd.battery.level)

Am I missing something ? Can you tell me how to charge the battery with the keyboard ?

Firmware is Adafruit CircuitPython 6.0.0-alpha.1-110-g121d78ec9-dirty on 2020-09-03; Makerdiary M60 Keyboard with nRF52840

The battery I am using is https://www.ebay.com/itm/173602816497

Just tested on the latest firmware Adafruit CircuitPython 6.0.0-alpha.1-110-ga7a4315e5 on 2021-01-17; Makerdiary M60 Keyboard with nRF52840, still the same thing,
battery.level starts at 51% when first plugged, then goes down to 47% in the first minute, and finally stays at 44% forever.

I also added a reading on pin p0_03, and it seems to be “True”, that means no charging if I read the doc properly.

Did I miss some documentation on how to use a battery with that keyboard ?

Thank you in advance

so i did more checking, and the ntc on the battery reads 10k ohms, all seems good there.

I also checked with a multimeter, the voltage reading on the battery is correct too, and reads exactly like the voltage that I read from battery_level() (3.8v )

the only question now, is how do I trigger a charge to get the battery to 4.2v ?

Is there any debugging you’d like me to do to troubleshoot this ?

Thank you for your help

Hi there,
I have noticed that the battery you found has the incorrect polarity. The incorrent polarity will damage the charger ic. Please double-check the polarity of your battery. Here is the corrent connector that M60 should use (3p JST 1.25plug):

Thank you Zelin for that, but this is not the issue, as I replied on the github issue, I corrected that before even the first plug while making sure everything was going to work.

I wish the problem with not charging was that obvious :slight_smile:

Do you have any other lead that could help by any chance ?

@Tristan The charger should be triggered to charge automatically after plugging the usb. Can you see the current through the usb vbus? I will help you figure out the issue here.
BTW, we have a 1200mAh battery designed for M60 and it works very well over about 1 year.

Hi @Zelin ,

I would have loved to have the option to buy the battery with the keyboard when I got keyboard and plate :slight_smile:

I just measured 3v at vbus on the left side of the connector on the board, tried different cables, and different usb ports, seems to stay around 3.07 - 3.05V ( battery plugged or unplugged ).

Taking the measure on the cable this time, I can see 5V, weird…

Concerning the current now, I am a bit puzzled, my multimeter shows 0, with or without battery.
I must be having an issue with it, it is impossible to read 0 ( even at 200u scale ), keyboard is working with the multimeter inline…

( obviously took a picture with the wires unplugged, but everything was plugged when I was trying to measure ).

Is there specific points on the pcb you would like me to measure ?

@Zelin I just confirmed my multimeter is faulty and I cannot measure the current at the moment. Voltage and resistance works, not ammeter. Is there any other diagnostic you would like me to try while I source another multimeter ?

Can you take a picture of the battery connector wih battery plugged? Also check the voltage of battery via the test point of VBAT.

@Zelin Sorry for the delay, but got more news. I am starting to think my board is defective. A contact of mine reported a working board and charging, so so far out of the people around, that is 2 boards working ( including yours ) and two not working. I wonder if I need to return the board to makerdiary or if there’s a way to fix it from here. Shipping takes forever…

Here is the picture requested, and voltage is 4.02V on the battery as well as the test points next to the connector ( battery was charged with an external charger ).

So, I ended up here from the github thread, as I’m suffering the same issue. Reading through this thread, and seeing your comment @Zelin about the charger IC, there’s definitely a non-zero chance that I could have damaged mine. See picture below, I can’t get it to pull anything more than ~30 mA.

Would I just need to replace the charger IC if it was damaged? Or would there be other components I’d need to replace, too?

@cmd You only need to replace the charger IC if it was damaged. The IC part NO. is BQ24075 from TI.
However, before you want to replace the IC, double check that if your battery’s NTC(the mid pin of battery) works. You can pull down the NTC pin with a 10k resistor and connect the battery without using its internal NTC. The wrong NTC value will also cause discharging. Double check this, it may help!

Okay, here’s my update:

I powered my usb power meter externally to try and get the most accurate readings I could. It looks like just attached to the USB (no battery attached), it was pulling ~4 mA. Photo:

I attached a 10k resistor between the negative pad and the thermistor, as in photo below. (I was having a tough time getting it directly on the pin coming from the connector, so I beeped to find that pad near the IC there.)

I de-pinned the thermistor from my connecter, and tried it. But even then, I was still only seeing ~3 mA it looked like:

I measured resistance between the thermistor and - on the battery, just to see, and I’m seeing 8.6 kΩ at an ambient temperature of 75 degrees F (~24 degrees C), so I’m thinking that’s probably in range?

Anything else I should check/try?

(Thanks for the super speedy response before btw, I only just had time to get to it today!)