# Arduino Voltage Divider Connection

Can anyone explain the connection of the voltage divider in this image, why it's connected to A0? I put a red circle on the section that i don't understand.

The voltage divider reduces the battery voltage by a factor of $$\\frac{R2}{R2+R3} = \frac{1000}{2500} = 0.40\$$. This puts it in a range that allows the Arduino to measure it. 0 to 12.6 V (minus the diode drop) becomes 0 to 4.8 V, which can be measured by the ADC, which accepts 0 to 5 V.

• Is the resistors R2 and R3 considered as the load between the positive and negative terminals of the battery, so no short circuit?! – Salman Mohamed Feb 9 at 12:55
• Why would there be a short circuit? The current through the resistors will be about $\frac{12\text{ V}}{2500\Omega} = 4.8\text{ mA}$. – Dave Tweed Feb 9 at 12:57
• Thanks for this clarity. Another question, for what is this diode and how much the voltage drop on it? – Salman Mohamed Feb 9 at 12:59
• Two things: First, without the diode, the range of the battery voltage would slightly exceed the range of the ADC. And second, it somewhat protects the Arduino from short-term voltage sags caused by the motors, allowing it to run from the energy stored in its Vin capacitors. Adding additional capacitance between Vin and ground would help in this regard. – Dave Tweed Feb 9 at 13:02
• This diode is 1N4001 which operate to 1A, means it limits the current? – Salman Mohamed Feb 9 at 13:04