You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nodes that use an e.g. INA219 for monitoring the battery voltage (explicitly set address in the power settings) could detect the charging status by measuring the current flow across the shunt. The current implementation in AnalogBatteryLevel doesn't make much use of the isCharging() function.
If the current is negative, that indicates the battery is being charged.
I forked the repo and created a minimalistic implementation for the INA219 only (I can expand that to the INA3221 and INA260 classes although I can't test those). It works pretty well on two of my nodes. Link to my fork/branch
The patch includes two defines to either disable or swap the detection direction (for those who wired VIN+/VIN- the opposite way or just have one of those bad designed modules which reference one input directly to gnd).
Thoughts? Should I go ahead and submit a PR?
Pictured: Node with INA219 not charging (left) and charging (right).
The text was updated successfully, but these errors were encountered:
Platform
NRF52, ESP32
Description
Nodes that use an e.g. INA219 for monitoring the battery voltage (explicitly set address in the power settings) could detect the charging status by measuring the current flow across the shunt. The current implementation in AnalogBatteryLevel doesn't make much use of the isCharging() function.
If the current is negative, that indicates the battery is being charged.
I forked the repo and created a minimalistic implementation for the INA219 only (I can expand that to the INA3221 and INA260 classes although I can't test those). It works pretty well on two of my nodes. Link to my fork/branch
The patch includes two defines to either disable or swap the detection direction (for those who wired VIN+/VIN- the opposite way or just have one of those bad designed modules which reference one input directly to gnd).
Thoughts? Should I go ahead and submit a PR?
Pictured: Node with INA219 not charging (left) and charging (right).
The text was updated successfully, but these errors were encountered: