1
\$\begingroup\$

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.

Non-linear behavior of ESP32 ADCs: enter image description here

\$\endgroup\$
2
  • 1
    \$\begingroup\$ All - The long comment chain has exceeded what is reasonable for comments. Therefore it has been moved to chat and should be continued there (link below). --- As this bulk moving of comments to chat can only be done once per question, any further comments posted here might be deleted without notice. Keep it in chat now, please! When someone has got enough information from the chat to post an answer, then please do that as usual. Any updates to the question which are decided during the chat, should be made via an edit to the question (not in a comment). Thanks. \$\endgroup\$
    – SamGibson
    Oct 20, 2021 at 17:59
  • 1
    \$\begingroup\$ Comments are not for extended discussion; this conversation has been moved to chat. \$\endgroup\$
    – SamGibson
    Oct 20, 2021 at 17:59

1 Answer 1

2
\$\begingroup\$

Your choice of implementation is derived from your reasoned "specifications" which are TBD and the ability of any configuration to meet those requirements. MPPT , SOC and CC/CV/cutoff with matched impedances can be measured by Coulomb counting for efficiency and SoC together with Voc and load pulse measurement of ESR for battery, but PV MPPT is critical for charging efficiency.

The 1st challenge is to define TBD specifications for your monitoring system with realistic expectations of performance and tolerances.

  • Using one to 3 PD's (photodiodes 0.5mA/mW ) amplified as sensors might be a useful indicators of solarity in 3 angles for sun position with the middle one in the same orientation as the PV to correlate expected Solarity power.

  • define all the input variables, output variables and the transfer functions if possible to optimize your specification.

Then errors in implementation accuracy become part of optimizing the design to eliminate causes of errors.

\$\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.