Skip to content

Conversation

@clement-nardi
Copy link

Hello,

I have added the possibility to see the current draw from the battery in mA.
Positive value = charging battery
Negative value = drawing energy from battery

Example 1: USB-C plugged in


Voltage: 3.92V
Current: 1232mA
Battery: 16%
Battery Low

Example 2: unplugged, OS idle


Voltage: 3.70V
Current: -156mA
Battery: 16%
Battery Low

Example 3: unplugged, CPU 100%


Voltage: 3.66V
Current: -410mA
Battery: 16%
Battery Low

Hope this can help!

@majki09
Copy link

majki09 commented Nov 10, 2022

Hi @clement-nardi !
This is awesome what you did, I'm really amazed. I wonder how did you do to get this information, did you get somehow I2C specification for the IP5310? Or it was just reverse-engineering of the I2C on X728 board?

I also wonder is it possible to control somehow this chip, eg. to control battery charging.

I will definitelly use your code improvement in my setup!
Thanks

@clement-nardi
Copy link
Author

Hi @majki09,

I found the I2C register map (in chinese) of a similar chip in a document attached to this topic on eevblog.com.
Then I digged a bit in the available register values, and found what I needed at address 20.

In the register map many variable names start with "set_" and are marked as read/write, so I suppose you could control a few things indeed.

@majki09
Copy link

majki09 commented Nov 14, 2022

Hello @clement-nardi
Thank you for the response. I've also googled for IP5310 I2C specification and I didn't find it, found only other models and it's varies much between models. Getting a proper address without specification is more guessing. I've mailed the manufacturer of this chip for documentation, as far as they respond I will share the manual.

@mano1979
Copy link

I found this data for reading writing the registers.
https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://www.scribd.com/document/713812641/IP5310-REG-V1-2-zh-CN-en&ved=2ahUKEwj7-qGci5iJAxUKfqQEHZGXOScQFnoECBIQAQ&usg=AOvVaw2zlwbd3BGfqO8rFfbiqK_6

I want to disable the auto power off function (when low current is used it shuts off automatically)
Can anyone help me with that?

@Moksh-2000
Copy link

hii can tell me i need 4s module like this is there possible to trigger to 4s voltage or any other module that you know

@einstein1211
Copy link

713812641-IP5310-REG-V1-2-zh-CN-en.pdf
To save everyone the trouble of starting the sribd free trial and immediately cancelling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants