I'm currently doing a project where I'm supposed to measure the current and the voltage from a solar panel and am unsure of how I should ground all the components in the circuit (since electrical engineering is not my field). I'm wondering whether I should connect all my devices' GND (ADC, Arduino, Hall sensor) to the minus side of the solar panel and load, or if I should connect the devices to the Arduino GND and the load plus voltage divider to the minus side of the solar panel (as picture #2 shows).
Since I've seen both versions in different Arduino battery measurement examples, I want to make sure I don't make any big mistakes and ruin components/measurements. Initially, I was going with version 1 (everything using the same GND in order to get the reference voltages correct), but after some googling I'm unsure. I apologize if my question is badly phrased. I'd also be glad if someone could explain why any/both of the measurement circuits are okay/not okay.