# Measure 2 diffrent battery voltages on arduino

Is it possible to measure the voltage of 2 different batteries on arduino? Currently I am able to use a resistor divider / voltage divider of 2x 10K resistors to an analog pin to read the voltage of the battery supplying the arduino.

Currently the system looks like 6v battery -> 5v power regulator to Arduino -> resistor divider attached to 6v (unregulated) battery. GND is common throughout.

How could I measure the voltage of another battery given that it will be on a different circuit? e.g. different ground loop.

• could you upload a drawing of what your circuit looks like? Whats stopping you from using the same ground for both batteries? Commented Aug 14, 2016 at 19:58
• each battery has its own ground e.g. black wire, no? you can't chain grounds together if they are separate circuits... they arnt in parallel or in series...
– Alex
Commented Aug 15, 2016 at 14:42

You cannot measure a voltage if you don't have any reference to measure it.

So you have to connect the two wire of your second battery to your arduino circuit : just connect the ground of the second battery to the common ground and apply the same technique for the voltage measurement.

Here is an image to show how you can do :

• B1 is your main battery
• R2 and R1 make the voltage division for measurement on ANA_1 (any analog pin of the arduino is OK)
• B2 is your second battery
• R4 and R3 make the voltage division for measurement on ANA_2 (any analog pin of the arduino is OK)
• Thank you very much! Side note, what software do you use for your circuit mockups?
– Alex
Commented Aug 21, 2016 at 22:40
• It is LTSpice IV, a free software used for simulating electronics Commented Aug 22, 2016 at 8:36