Arduino power up and measuring battery voltage

Hi folks,
I am using a power source of 7.4v for my project. I have to power up Arduino uno and gsm from this source. For gsm I am connecting the battery to it using DC Jack. For arduino I am supposed to connect it to analog pin and GND to measure the battery voltage.
For this I am using one voltage divider circuit of 100E and 680K resistor.

The thing I am unable to understand is that,

without the arduino cable, the voltage measured across the analog pin A1 and GND is 3.6v and also it is not working as it is supposed to work(it needs to send the battery voltage to database). But when I am connecting the cable and opening serial monitor, the voltage reading is coming as 5v and the data is being sent to database also.

Why is it happening?

I feel that it is not reading the analog values.

How do I solve this problem?

Anyone can clear my doubts?

Thanks in Advance.

First, how are you connecting the 100k and 680k resistors? If the 100k is connected between 7.4v and the 680k resistor, and the other lead of the 680k resistor is connected to ground, the battery at full charge will give you 6.45v (too high for the arduino inputs!).

Second, remember that the analog pins output values from 0 to 1024, corresponding to 0v to 5v. Assuming your batteries are LiIon or LiPo, they should work between 8.4v at full charge and 7.4v when fully (and safely) discharged. That gives you a range of 1v to work with. Using a voltage divider you can offset that 1v range to something the arduino can handle, but will remain as a 1v range. In your code you’ll have to identify where this range lies in the 0-1024 output of the analog read and map that to 0% - 100% range.