Question about simple arduino circuit


Could somebody please check this arduino circuit, I have a few questions about it.
So basically it’s a circuit to measure the voltage of the cells that much is clear; it uses a voltage divider to get an analog signal voltage in the range of the arduino (up to 5 volts) and then uses an algorithm to calculate the actual voltage of the cells.

So my questions are:

  1. If the voltage to be measured is that of the cells, the current passing through the resistors should be from the batteries. Then in that case what’s the point of connecting the breadboard to the 5V pin of the arduino and another connection from the ground pin to the breadboard. Aren’t these connections only done when the breadboard is powered by the arduino???

2)Instead of using battery holders with connectors is it possible to simply use pins (like those used in connections between the arduino and the breadboard) and place them at the poles of a 2 cell connection in series where the other ends of the pins would be in the breadboard.
Can such a thing also be done with a 9v battery such as this

I know my questions are very basic, I’m just starting to try to learn this stuff. Therefore all the help is highly appreciated.
Thank you all :slight_smile:

Don't try to learn from idiots. Not so much that this circuit won't work, as that it isn't presented or explained well at all. The battery pack looks like 2 cells, but it is intended to power the Arduino, so it is actually a 3 cell holder. I don't understand your description of an alternate circuit in (2). You can use pins, wires, or tinfoil from a cigarette package as long as the circuit is correct, and it will work. It may shake loose after a moment, but it will work. So you need to explain that better. Generally, you could power the Arduino from 9V, but only from the barrel jack. The voltage divider for that would have different values.

In future, please add images as attachments, so I don't have to end up looking at some Hollywood star's facelift.

Could somebody please check this arduino circuit...

... So my questions are: 1) If the voltage to be measured is that of the cells, the current passing through the resistors should be from the batteries.

I see two thing wrong -

+5V and ground are shorted together. That will kill your Arduino... Hopefully only temporarily.

And you're right, the batteries should not be connected to +5V unless you are powering the Arduino from the batteries. And, if you are powering the Arduino from the batteries that voltage becomes the ADC's positive reference and the voltage will be measured/calculated incorrectly.*

...and another connection from the ground pin to the breadboard.

You do need a common ground (i.e. a "ground reference") between the batteries and the Arduino. A voltage is a difference and in this case, it's the difference between the Arduino's ground pin and the analog pin.

You don't need a voltage divider to measure two 1.5V batteries in series. But, you do need one to measure 9V. The Arduino can't measure more than +5V. And, it can be damaged** by voltages greater than +5V or by any negative voltage greater than -0.5V (such as a reversed battery).

2)Instead of using battery holders with connectors is it possible to simply use pins (like those used in connections between the arduino and the breadboard) and place them at the poles of a 2 cell connection in series where the other ends of the pins would be in the breadboard.

You only need to make electrical connections. A battery holder is a convenient way to connect two or more batteries in series and the breadboard is handy for wiring-up a voltage divider.

* You can use the optional 1.1V ADC reference with a voltage divider on the ADC input.

* If you are measuring unknown voltages or if the voltage/battery might be accidentally connected backwards, you can use a [u]protection circuit[/u].

Multimeters have protection circuits built-in so if you are set-up to read a 1.5V battery and you forget to change meter range before connecting it to power line voltage, it won't be damaged. And, they are usually designed to measure positive or negative voltage so your meter won't be damaged if you connect a battery backwards, it will only read negative.