Measuring Vcc in Photon


#1

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


#2

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?


#3

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


#4

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.