I plan on making a high accuracy solar battery monitoring system where I keep track of the voltage of two 12 V batteries in series (using voltage dividers) and the load current in order to determine the state of charge and the overall health of the batteries. I also want to store these values and send them into a cloud database in order to access these data anytime I want using a computer.
These requirements lead me to pick the ESP32 for its multiple IoT functionalities; one big drawback of the ESP32-WROOM model however, is its ADC's non-linear behavior(see pic below) in addition to the noise issues and reference drift (The ADCS have un-calibrated reference voltages and are in general somewhat inaccurate). My question is, Would I be better off using an external ADC ? Or are there other reasons why sticking to the ESP32 might be a better choice? The STM32F103 is an MCU I am quite familiar with; would it be better if I measured the analog values using the STM32 and then sent them over USART to the ESP32 considering that the STM32 has very robust ADCs that are well documented and are programmable through CubeMx?
tld;dr I need advice in regards of the approach I should take to maximize the reliability of this monitoring system.
Note: Both the STM32 and ESP32 models available to me have a 12 bit ADC resolution, the maximum sampling rate for the STM32 in normal mode is 1Ms/s while it is undocumented for the ESP32 ( but is certainly less than the STM's sampling rate).
Requirements: 0.1% Error in Voltage readings.