I am looking for some help changing the Power Management IC battery charging voltage & current settings.
From my testing it looks like the battery is charged to 4v and not much more which is safe but it never brings the fuel gauge up to 100% full because the battery charge voltage is not brought up high enough.
I would also like to raise the charging current limit since the chip is able to charge up to 4 Amps of charge current, it looks to be set at 500mA for now. I want to charge higher capacity batteries quicker.
This TI chip is a good one and I’m happy they choose to use it.
From the firmware reference docs I found the code to make the changes but I need some guidance on how to use this properly. See below:
Do I just put a new voltage in the () brackets? Like bool setChargeVoltage(4.20 or 4200); ?
And I really need help with understanding the code that set’s the charging current.
If anybody can provide examples I would love to see it.
I would love to use LiFePo4 type battery cells due to their long lifespan and I can by changing the charge voltage settings but I’m think the fuel gauge is designed for reading LiPo cell voltage curves only which would make it useless with the LiFePo4 cells.
YES I did but nothing happened like I wanted so I reverted back to the original settings. The Red charging LED started going crazy and the charge voltage didn’t change.
I played around with the charge current/voltage and had a medium amount of success. I have a 5000mAh lipo battery so charging it at 500mA (default) takes much longer than desired. I increased the charge current to 1024mA and was happy with the results. You will have to increase input current limit (I set to 1500mA) for this to work. You will not be able to go any higher than 1500mA due to the 330ohm resistor soldered to the chip. Pay attention to the PMIC status word as there is some good info in there about the charging status and input voltage limitations. I was charging from my iPad charger which puts out 2A, however there was significant voltage drop at the end of my 28AWG USB cable. The PMIC will automatically adjust the charge current if it sees too much voltage drop. I found a nice 22AWG USB cable and that does the trick.
I had less luck adjusting the charge voltage register. The chip datasheet allows for many settings, but looking at the .cpp file, it looks to me like there are only two options available. (below)
Adjusting this value works initially, but later gives me a the blinking PMIC LED fault. Maybe their are some other settings I have to adjust.
I’m using a 6600mAh battery in place of the 2200 one that is shipped with the Electron and I’ve been able to get into the 90s charging it with the Electron and a solar panel. I have yet to verify that it is correctly reading the values, but I don’t see why it wouldn’t be.
If you don’t mind me asking; how are you mitigating the risk of overheating your lipo battery? I wish they broke out the thermistor pins on the PMIC chip so we could take advantage of the temperature protection.
I checked what the max allowable charge rate was without temperature sensing for my battery and it’s 1A. The Electron’s max charging rate is 512mA, which is well below 1A. Additional, my 7.4V solar panel shouldn’t get close to the 512mA output. However, if the battery gets damaged I will let you know
hey, to change the charging current I called the below code in my setup.
//set charging current to 1024mA (512 + 512 offset)
pmic.setChargeCurrent(0,0,1,0,0,0);
//set input current limit to 1.5A
pmic.setInputCurrentLimit(1500);
So I’m a little confused on how to call the PMIC functions. I looked through the repo files that @ScruffR shared. Am I supposed to include those files in my app by clicking the + button on the top right hand corner and then call the functions? Or is there some other way I can call these functions? I’m just a little lost here.