I am trying to measure voltage & current off a solar charge controller from panel, battery & load simultaneously with my arduino. I have managed to achieve this by tying all the negatives together and using it as GND, however, when I do that the charge controller doesn't function properly and when I switch to off-mode the loads still run. After checking the instruction manual further, I found out that the positives are shared common between Pan, Bat, Load. This was confirmed with a multimeter.
So now what I am thinking of doing is using the positive from the battery as the GND reference and then measuring all other voltages (through voltage dividers with respect to the GND). The voltages should then range between -17V to 0V.
However, I have read that the analog input pins are not able to read negative voltages, and with respect to the positive GND, the Analog inputs will all be negative.
EDIT: I was thinking of using an amplifier to invert positive ground to a negative ground, meaning I could measure all the positive sides of the voltages. But after getting answers from you guys it seems I may not have to use an amplifier and a voltage divider may suffice. I have currently included a 2 resistor voltage divider between each analog input, +5V source, Vmeasure which you can see in the diagram below.
According to my calculations, if this works, @-17V I should see 0.6V @ analog input. @0V I should see 4V at analog input.
I'd appreciate feedback on this circuit, and below in the second image I've also included a piece of another method suggested by @jonk (thanks), and would be interested in knowing what the benefits are of method B) over method A)
Thanks!
Ps. the ameters are there in place of ACS712 current sensors which also go into analog input pins.
Method A)
simulate this circuit – Schematic created using CircuitLab
Method B (EDIT: This method has worked, I am still yet to test method A) thanks @Jonk))