Measuring Vcc in Photon

i am running my photon using a 3.7v lipo battery, it has a lm35 which reads the temperature. when the battery goes to low voltage, the reading from the lm35 changes because of the reference voltage change. Is there any way to measure the vcc without any additional circuit so that i can make it sent “low voltage” instead of giving an error temperature value ?.
Is there any band gap reference in photon as in the ATmega’s ?.
Measuring Vcc using Band gap in ATmega’s

It appears not, as mentioned in this post. Also, the LM35 is meant to be used with a minimum of 4 volts. Why not use one of the digital output sensors like the DS18B20 or the MCP9808?


@Ric i appreciate the help,thank you. But is there any way to measure vcc of photon ?.
with any simple circuits ?

Sure, you can always set up a voltage divider between vcc and ground, and read the voltage with analogRead. This doesn’t get arount the problem that the LM35 should have a 4 volt minimum. The voltage divider will also drain your battery faster.


Sorry for the late update. By rigging up a basic circuit like this and connecting parallel across the same battery which is powering photon, I was able to measure the voltage in the battery. The led in this circuit are optional, just connect a wire in between the switching diode and green led. then connect it to the analog read of the photon you will be able to get battery voltage data .