digitaldanny / AudioEffectsGlove

A hand tracking glove that controls parameters of various audio effects.
1 stars 0 forks source link

State of Charge Drivers + Calculation #51

Closed digitaldanny closed 3 years ago

digitaldanny commented 3 years ago

Describe the solution you'd like

Additional context

OCV and Coulomb Counting circuits below: Coulomb Counting Circuits

Pch MOSFET Power Switch: Power Switch

digitaldanny commented 3 years ago

It's important to add a current offset to the calculated current draw due to the MSP432 and TPS63020 loads. As shown below, the MSP_3V3 power rail has some additional current that does not go through the shunt resistor. This would affect the battery charge estimation.

The datasheets for both of these devices show the typical current draw for both of these devices. I just need to add these currents to the calculated current draw.

Current MSP432 (VCORE1) - 80 uA / MHz * 16 MHz = 1.28 mA Current TPS63020 - Negligible

MSP_3V3 Rail Current Draw image

MSP432 Datasheet - Active Mode Current Draw image

This means the current draw conversion in the software will be Vshunt / (0.1 * G_amp) + I_msp + I_tms

digitaldanny commented 3 years ago

This diagram clarifies why separate OCV readings are required. If a load is attached, there is current going through the battery's internal resistance. This means the voltage measured across the battery will have a variable amount of drop as the internal resistance changes. The OCV mode disconnects the load and has minimal current drawn by the low-power mode MSP432 to read the battery's actual voltage levels.

image

digitaldanny commented 3 years ago

Doing a continuity check on the 0.1 ohm resistor makes the buzzer go off. I think there might not be enough voltage drop across the resistor to detect with the 0.1 ohm resistor. I'll try replacing this with a 1 ohm resistor today.

digitaldanny commented 3 years ago

Going to estimate the power consumption based on the datasheet values. If I have extra time, I will look into the in-amp issues and try to get the dynamic SOC estimation working with Coulomb Counting.

digitaldanny commented 3 years ago

The main current variation I will see is from the HC-05 and the flex sensor positions. For the static SOC estimation, I need to find the average current draws of these devices.

This Arduino forum says that the HC-05 takes about 34 mA running and <1mA while sleeping. From my uC testing, the main glove loop iterated 10-12 times before receiving an ACK from the slave device. I am going to guess from this testing that the MSP432 can process the data to be sent much quicker than the HC-05 can send / receive over a baud rate of 9600 bps, so the HC-05 is likely in active mode most of the time. I will use the value of 34 mA for this device.

Based on my flex sensor measurements, the resistance range is 25 - 100 kOhms. This range should be added to the 22 kOhm resistors in series to determine the current consumption for 1 flex sensor. The current being fed to the microcontroller for the ADC reading is negligible, so I will 0 this out.

digitaldanny commented 3 years ago

Copying over the power consumption estimations from the #30 issue. Also adding the new flex sensor estimations.

digitaldanny commented 3 years ago

Static current consumption = (Mpu6050 + Flex sensor divider + hc05 + oled + msp432) / Buck-Boost Efficiency = (3.3 mA + 90.9 uA + 35 mA + 15 mA + 1.28 mA) / 0.933 = 58.49 mA.

digitaldanny commented 3 years ago

Typical relationship between LiPo SOC and OCV. Notice that it is nearly linear at the beginning and becomes exponential towards the bottom 40-50% of the battery life (3 - 3.4/3.5 V).

image