I have attached a diagram showing how I am using an Electron with a NEO-M8N connected.
The Electron is powered by an external power supply providing 12vdc/2A via Vin. The NEO GPS module is powered off the 3.3 pin and I am monitoring the supply voltage via A0 through a voltage divider. The sketch writes a value to Blynk app with this code
Blynk.virtualWrite(V5, map(analogRead(batPin), 0, 4095, 0, 14)) ;
and prints a value to serial monitor with this
Serial.println(map(analogRead(batPin), 0, 4095, 0, 100));
When the USB is connected to read serial prints I see 100 on the serial print out and 14 on the value widget of Blynk. When the USB is disconnected and the device is only powered by the external power supply, the value of A0 bounces all over the place in the value widget on the app. It seems to act up when the LiPo calls for a charge. I can see the current change on the power supply from roughly 200mA to 360mA when this happens.Why would the reading on A0 change even though the external power supply is providing a constant voltage? I am not sure what I am missing here. Any help is appreciated.