If you want to measure the voltage between two points in a circuit or measure the voltage of a battery, you must use the voltage sensor module, which can measure voltage from 0 to 25 volts.
In this tutorial, we will learn to interface the 0-25V DC voltage sensor module with Arduino and program it for voltage measurement and we will display the voltage on your computer.
Connect the wires between the voltage sensor module and the Arduino, as shown in the image below.
Connections from the voltage sensor module to arduino :
• + (vcc) → Arduino 5V pin
• - (GND) → Arduino GND pin
• S (signal) → Arduino pin A0
Now access the serial monitor on your Arduino IDE by clicking on the magnifying glass icon at the top right corner.
Now, as shown in the image below, the serial monitor displays voltage of the battery.