Hi,
I trying to mesure the voltage of my 12V battery with arduino , for that I'm using a LM317 DC-DC Voltage Regulator Step Down Module with those features:
- Output Current: 1.5A (min), 2.2A (typ)
- Input-output voltage differential (VI-VO): 40Vdc (max)
- Adjustable output voltage range: 1.2 ~ 37V
- Operating temperature: -55 Celsius ~ +150 Celsius
- Current output: 1.5A
- Voltage Input: 4.2 ~ 40 V
- Operating temperature: 0 Celsius ~ 125 Celsius
- Characteristic frequency: 100MHz
- Module size: 35.6 mm x16.8 mm
- Input Method: VIN input is positive, GND Input Negative
- Output: VOUT output positive, GND output negative
I adapted to have 4.5V at the output of the module.
I attached the diagram of the wirning. For the arduino part I used the analogRead, like this
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.println(analogRead(A2));
delay(5000);
}
Normaly I should had a fixed value aroud 922, But I got differents and variables value in arduino serial monitor, I didn't get what the cause of this problem, if someone have an idea?

