0
\$\begingroup\$

We have a IOT design that runs its normal operation with 12 V DC. Without the 12 V DC, we have a 2-cell Li-ion battery pack which outputs 6-8.4 V.

As a Li-ion charger we use Microchip's MCP73213.

We are also reading the battery voltage on ESP32's SENSOR_VP port. This port is using for ADC voltage reading.

When we are running the card with a battery, we can read the ADC value between 6-8.4 V correctly.

With 12 V DC connected to the board, the ADC readings between 8.0-8.4 V are correct, but between 6-7.9 V they are inconsistent. The voltage the ADC reads varies and gives us wrong values. Can anyone tell us what is wrong?

Voltage Divider for SENSOR_VP Pin

Battery Management Page

\$\endgroup\$
6
  • 1
    \$\begingroup\$ Do you take a voltage reading while the MCP73213 is doing a fast charge on the battery cells, or do you stop the charging to get a true voltage reading? If you don't stop the charging when you take your reading, this could be causing the noise you are seeing. \$\endgroup\$
    – Puffafish
    Commented Oct 4, 2022 at 13:53
  • \$\begingroup\$ Welcome! How does the rest of the circuit look and what’s your PCB layout? At 1.8 Mohm input, it will be sensitive to noise. \$\endgroup\$
    – winny
    Commented Oct 4, 2022 at 13:54
  • \$\begingroup\$ I didn't dive into data sheets and didn't trace all your schematics ... but at first glance, it seems like you are measuring the voltage controlled by the charger chip that is used to charge the cells? \$\endgroup\$
    – orithena
    Commented Oct 4, 2022 at 13:54
  • \$\begingroup\$ Try to put a 100nf cap between the adc pin and gnd. It sometimes improves stability while reading. \$\endgroup\$
    – RemyHx
    Commented Oct 4, 2022 at 14:02
  • \$\begingroup\$ You won't be able to charge a 2S1P Li-ion pack properly with less than about 9V once you allow for the drop in the device. I'd expect it to behave erratically below that. \$\endgroup\$
    – Finbarr
    Commented Oct 4, 2022 at 14:22

1 Answer 1

0
\$\begingroup\$

You are measuring a mix of cell voltage and charging voltage.

Li-Ion chargers start with a constant current phase, where charging voltage is varied in order to achieve a constant current (I'd expect that the constant current circuit in the chip uses PWM, adding ripples to the voltage). Then, when the cell voltage has reached the cut-off voltage at around 3.7..4V (depending on the charger circuit), the charger switches to constant voltage, varying the current in order to achieve a constant voltage. This is called "CC-CV charging". Here's an example graph (source):

Li-Ion charging graph

Double the cut-off voltage (because you have two cells in series) and it matches your measurements: Below 8V you're measuring the constant current charging phase with all the ripples in the voltage -- above 8V you're measuring the constant voltage charging phase, where the voltage is stable.

It may be that you can reduce the noise by reducing the values of the voltage divider (R32/R38) without changing their ratio, as winny suggested in the comments. I'd also try a 100nF capacitor in parallel to R38, as RemyHx suggested.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.