RFBee supply voltage monitor

Hi,

I would like to measure the supply voltage of batteries for lifetime expectations of RFBee, but every analogRead made gets the same 1023, even the batteries have lower voltage than 3.3 V. I don´t know what is wrong. Anyone can help me ?

Thanks in advance.

The reference voltage of analog ports are supply voltage :wink:
If supply voltage is lower also reference is lower. So you always measure 100%

You can set analog reference to 1.1V (internal reference) and increase the measurement voltage with voltage divider to max 1.1V (CAUTION! May damage your controller if you dont know what you do).
Now you should measure the power supply voltage.

edit
If you set the analog reference to 1.1V this is for all analog ports (5V sensors don’t work)

edit2
arduino.cc/en/Reference/AnalogReference

OK. Thank you very much.

I will try (analogReference(2)) with voltage divider.