2
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ could you upload a drawing of what your circuit looks like? Whats stopping you from using the same ground for both batteries? $\endgroup$
    – holmeski
    Aug 14, 2016 at 19:58
  • $\begingroup$ 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... $\endgroup$
    – Alex
    Aug 15, 2016 at 14:42

1 Answer 1

1
$\begingroup$

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 : Different bat voltage arduino

  • 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)
$\endgroup$
2
  • $\begingroup$ Thank you very much! Side note, what software do you use for your circuit mockups? $\endgroup$
    – Alex
    Aug 21, 2016 at 22:40
  • $\begingroup$ It is LTSpice IV, a free software used for simulating electronics $\endgroup$
    – Inounx
    Aug 22, 2016 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.