Powering the Arduino with a battery and reading the battery voltage I am trying to display the battery level as it is being used to power the arduino.

I have tried powering the arduino through the USB and the battery voltage is read accurately, when compared to the multimeter reading.
But when the battery is powering the arduino and being read, it keeps displaying 5.00V, when it should not be. 

Just wondering what might be happening and how I can go about resolving this issue. 

I have been trying to research some answers, and came across something about an 1.1V reference voltage, but not entirely sure what they mean.

Would appreciate any answers!
Thanks! 

Here is my code for reference.

#include &lt;SoftwareSerial.h&gt;
SoftwareSerial BTserial(10,11);

int battPin = A1;

void setup() {
  pinMode(battPin, INPUT);
  BTserial.begin(9600);
  Serial.begin(9600);
}
void loop() 
{
  int voltReading = analogRead(battPin);
  float volts = (voltReading/204.6);
  BTserial.print(volts);
  BTserial.print(";"); 
  Serial.println(volts);
}


I am using a 3.7V Lipo battery. It is connected to A1 and also Vin.
AFAIK, Arduinos are set up to use their operating voltage as the analogRead reference voltage by default.

So, what I think is happening is that you are trying to measure the battery voltage with the battery itself as a reference voltage.

This will, of course, always show "full scale".

You could use a voltage divider to bring the measured battery voltage down to about 1V (max) and use the internal reference of 1.1V for measuring.

Note that the 1.1V internal reference is stable, but not necessarily exactly 1.1V.