I would like to measure the voltage of a battery that varies from 4,5V to 3V.
To do so I'm planning to connect this source to a STM32F4 DISCO board and one of its ADCs, which will be set to a VREF+ of 3V. The conversion speed will be very low.
As the voltage from the source is higher than the STM32F4 Vref pin I need to add a voltage divider so that, taking into account I'll use 3V as Vref, the source maximum voltage (4,5V) is converted to 3V, something similar to the following schematic:
simulate this circuit – Schematic created using CircuitLab
I'm trying to understand how to proceed to have a real measurement voltage value at the ADC_IN if I'm dealing with multiple grounds in the signal conditiong path, Battery GND, 12V GND and Microcontroller GND.
So, I have to main questions:
How should I connect the ground nets to have a measurement as accurate as possible?
If I have multiple sources to read from and, each source has different ground, could I still have accurate measurements from all sources? How should these grounds be connected?