Closed digitaldanny closed 3 years ago
I will estimate the battery’s remaining charge or “State of Charge (SOC)” using a method called “Coulomb Counting.” This method involves estimating the state of charge by subtracting the current consumption from the initial capacity. The battery percentage can be estimated with the following formula:
(Q_previous - i_current deltaTime) / Q_total 100%
However, the error in this estimation will increase each time the battery is recharged. My goal is just to provide a rough estimation so the user knows to plug it in when it’s in the 10-25% range, so this will work well for my application.
An alternative that I considered is Open Circuit Voltage (OCV) estimation. With this approach, the battery charge can be estimated by comparing the battery’s open circuit voltage to the linear portion of the battery’s discharge curve. This would be simpler and more accurate; however, the battery would have to be an open circuit for each measurement. This would power off the microcontroller, disabling the necessary ADC pin along with the rest of the glove’s functionality.
I switched to using the AD8226 instrumental amplifier instead of the INA114AP because it is a single supply rail-to-rail amp that can operate at 3.3V, which will work for my glove's 3.3V power source. I have the new in-amp hooked up on a breadboard to make sure it will sense voltage drops across the shunt resistor. My test is described below.
Powered with 5V (Working correctly)
Powered with 3.3V (Not functional)
Results:
Current sensing circuit changed from original design with INA114AP in the first figure below to the following design with the AD8226ARZ. Adding some voltage dividers to halve the voltage before going into the in-amp fixed the problem I was seeing in the previous comment.
Original (INA114AP)
New (AD8226ARZ)
Current circuits being used for Coulomb Counting included below.
Describe the solution you'd like
Additional context Research for this issue was completed in #26.